Forum: Ruby on Rails Web Services/Invoke Inconsistencies

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Joshua Levinson (Guest)
on 2006-04-24 21:46
Hey all,

Got a bit of a long one here, so bear with me while I try to hash out
the details... better to give too much than not enough.

So we're using the ActionWebService in order to communicate with a
3rd-party software client.  We've created the API as discussed in Agile
Web D., and, in fact, invoke actually works perfectly.

We have three example XML posts... they are in the following formats:

POST /rms/api HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: 384
SOAPAction:
"http://StoreFront.StoreFront/RMSConfirmWS/ImportRM...

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><Impo...
xmlns="http://StoreFront.StoreFront/RMSConfirmWS"><xmlStr...

So, as you can see, it posts to the /rms/api interface.  In order to
post this file, which we call example_xml, we use the following command
on a Linux box:

cat example_xml | netcat localhost 80 -vv

This works for the first two files, but the third one, entitled
ugly_mess, just hangs/gets a 404/not found.  The only real difference is
the length:

POST /rms/api HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: 27100
SOAPAction:
"http://StoreFront.StoreFront/RMSConfirmWS/ImportRM...

And then there's a ton of stuff down here... like.. a lot.  27,000 lines
or so.

So the first two work on the rms_api, and the last one doesn't.

But here's the strange thing... using the rms/invoke (as described in
Agile Web D., invoke is a scaffold for web services)... they
ALL work.

The only thing I have to do in rms/invoke is put the xml files on a
single line of text so I can paste it into the text field that our
invoke method asks for.  If I do this, they ALL work (right now, the
method simply saves the xml string to a file for testing purposes).

So... using rms/invoke, all three files work.  Using rms/api and netcat
to post the xml, only the first two, shorter ones, work.  Can anyone
think of a reason why this wouldn't work?

I've attempted to get this to work using both Apache and WEBrick, so I'm
thinking it's not a simple configuration of the web server (though if
someone thinks this may be the reason, I'd love to know why).

Sorry for the superlong note, but I simply find it much easier to let
all the gory details hang out and find a solution easier than listen to
a bunch of things I've already attempted.

Thanks and please let me know if there's any additional information I
should post (i.e., source files, or the ugly_mess file).

-Josh
This topic is locked and can not be replied to.