I’m trying to consume a webservice from my rails application and have
discovered an interesting problem. I can call webservice functions
just fine, as long as they do not require any arguments, but function
that do require arguments do not work. The arguments are sent as
either null or an empty string.
Calling test works perfectly. When I try to call otherFunction from
my controller, after setting up the soap_client:
soap_client.otherFunction(‘name’)
Somehow the username parameter is not being filled out properly. Has
anyone else ran into this? Is there anyway to test the request that
Rails is sending out?
I’m trying to consume a webservice from my rails application and have
discovered an interesting problem.
…
Is there anyway to test the request that Rails is sending out?
I’m trying to consume a webservice from my rails application and have
discovered an interesting problem.
…
Is there anyway to test the request that Rails is sending out?
soap_client.wiredump_dev = STDERR
wiredump_dev does not seem to be a valid method…
What SOAP client library are you using?
Is there another solution?
Use Ethereal to capture a test session. Select a packet and ‘Analyze’
-> ‘Follow TCP Stream’.
Ah, that’s a great tool. I see the problem is that the generated soap
request has alot of strange xml namespace problems. I don’t know what
to make of it yet, but I guess it’s a start.
I’m using the
ActionWebService::Client::Soap.new(UmkcApi, “http://…”,
:namespace=>“https://…mynamespace”,
:driver_options=>{:default_encodingstyle =>
SOAP::EncodingStyle::ASPDotNetHandler::Namespace })
Any ideas on what might be causing this, and how I might be able to
fix it? I’ve been looking through the documentation for:
ActionWebService::Client::Soap, but it certainly appears that I’ve
done everything correctly… The webservice I’m calling without
parameters works perfectly.
Yes it is; I had to use the same method last night to help track down
a bug in a .net SOAP service.
I see the problem is that the generated soap
request has alot of strange xml namespace problems. I don’t know what
to make of it yet, but I guess it’s a start.
I had a problem awhile back that was namespace related in SOAP client.
In my case the problem was I was just sending a Hash as the parameter
for the SOAP call instead of an instance of the Request class that
wsdl2ruby (soap4r) generated for me from the WSDL.
I’m using the
ActionWebService::Client::Soap.new(UmkcApi, “http://…”,
:namespace=>“https://…mynamespace”,
:driver_options=>{:default_encodingstyle =>
SOAP::EncodingStyle::ASPDotNetHandler::Namespace })
I later thought that might be the case; explains why soap4r’s
wiredump_dev didn’t work.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.