2

I am looking for a complete example of how to use Soap4r to send a request to document/literal style web service request? The very same question on SOAP::RPC::Driver formatting problems. How can I change it? on Stackoverflow is there, but I couldn't find the way to call the method. Below is how my current request is generated.

<env:Body>
<n1:GetUserContact xmlns:n1="xmlns:http://foo.bar.baz.com/faz" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
 <userID xsi:type="xsd:string">
    0123456 
 </userID>
</n1:GetUserContact>
</env:Body> 

but I want my request to be in the following format, which is document/literal

<env:Body>
<n1:GetUserContact xmlns:n1="xmlns:http://foo.bar.baz.com/faz" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

 <n1:userID xsi:type="xsd:string">
    0123456 
 </n1:userID>

</n1:GetUserContact>
</env:Body>

Or

<env:Body>
<GetUserContact xmlns="http://foo.bar.baz.com/faz" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

 <userID xsi:type="xsd:string">
    0123456 
 </userID>

</GetUserContact>
</env:Body>

I also looked at this but I couldn't set the elementformdefault in my application because my Soap4r does not support this element name. I am not good at Ruby so excuse me if I am making any mistake. I am using ruby 1.8.6 on Ubuntu 8.04 and I installed soap4r-1.5.8 but even without that gem, my application runs(default soap4r library may be at work)

I don't know how to get ruby soap4r-1.5.8 lib to work instead of default soap4r library. You might wonder what my question is, and desperately all I want is to get this working anyway by any means.

Community
  • 1
  • 1
user1177489
  • 157
  • 2
  • 7
  • 1
    Finally I switched from Soap4r to Savon because Savon provides greater flexibility in customizing the request. – user1177489 Mar 15 '12 at 06:40

0 Answers0