Bucky Wolfe
Bucky Wolfe

Reputation: 1

Savon appends "Input" to the operation that I'm calling

I've been tasked with writing some checks around a soap api, and I'm having a bit of trouble.

I've imported the wsdl into SoapUI to test with. SoapUI parsed out the wsdl and generated a sample request for the operation I want to call (PerfmonOpenSession). Here's a sample of what it generated.. when I submitted the request, it came back successful.

When I try to do the same thing with Savon in Ruby, it returns this. I noticed that savon is using the tns namespace, and also appends the word "Input" to the operation name. So rather than calling soap:PermonOpenSession, I'm calling tns:PerfmonOpenSessionInput (which doesn't exist).

I'm even further confused by the fact that the wsdl actually defines an "Input" message for the port (seen here at line 224). So.. is Savon doing the right thing here? If so, how does SoapUI know how to properly form the soap request? How do I make savon's request look like the one that SoapUI generates?

Upvotes: 0

Views: 227

Answers (1)

Steffen Roller
Steffen Roller

Reputation: 3492

I cases like this I usually skip the WSDL and create a client without it. That works with Savon v1 and v2. You have to set

endpoint

and

namespace

You might also want to set

soap_action

explicitely. The documentation at http://savonrb.com explains what to do. In case you need further help let us know.

Upvotes: 0

Related Questions