Hey-
I am trying to perform a simple POST to a simple XML web service
implemented in Ruby on Rails from ServiceMix. I simply take a
message off a queue and then use the http-provider to send it to the
web service. Here is my xbean:
<http:endpoint service="core:logger" endpoint="save"
role="provider"
locationURI="http://localhost:3000/log_entry/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="false" />
When I put debug tracing on ServiceMix, it seems to be doing the
right thing:
DEBUG - header - >> "POST /log_entry/ HTTP/1.1
[\r][\n]"
DEBUG - header - >> "Content-Type: text/
xml;charset=UTF-8[\r][\n]"
DEBUG - header - >> "Content-Length: 361[\r]
[\n]"
DEBUG - header - >> "User-Agent: Jakarta
Commons-HttpClient/3.0[\r][\n]"
DEBUG - header - >> "Host: localhost:3000[\r]
[\n]"
DEBUG - header - >> "[\r][\n]"
DEBUG - content - >> "<?xml version='1.0'
encoding='UTF-8'?><log_entries xmlns="http://
schemas.funddevelopmentservices.com/dm/1.0">[\n]"
DEBUG - content - >> " <log_entry>[\n]"
DEBUG - content - >> "
<client_code>FDS</client_code>[\n]"
DEBUG - content - >> "
<log_level>FATAL</log_level>[\n]"
DEBUG - content - >> " <logged_by>Price
Maintenance</logged_by>[\n]"
DEBUG - content - >> " <message>Hello
from DR, KS!</message>[\n]"
DEBUG - content - >> " <thread>POST 24</
thread>[\n]"
DEBUG - content - >> " </log_entry>[\n]"
DEBUG - content - >> "</log_entries>"
Unfortunately, the web service keeps insisting that the POST body
contains no data.
I can use XMLHttpRequest and send the exact same message to the web
service and it POSTs just fine.
I am totally clueless as to why this is happening. Even crazier, I
am almost certain that this exact same thing used to work, but
doesn't now.
Any help would be appreciated.
--
Daryl
http://itsallsemantics.com
"2 + 2 = 5, for sufficiently large values of 2."
-- Ron Jeffries