0

(Note: I'm new to SOAP and so may be missing something obvious)

My currently generated request looks like:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://service.com/services/base" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <tns:someOperation>
         <tns:suppliedParameterInstances>
            <tns:paramName>param_name</tns:paramName>
            <tns:instanceName>?</tns:instanceName>
            <tns:value>Value</tns:value>
         </tns:suppliedParameterInstances>
      </tns:someOperation>
   </soapenv:Body>
</soapenv:Envelope>

and my reference XML from a known-working request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://service.com/services/base" xmlns:typ="http://type.service.com/types">
   <soapenv:Header/>                                                                                               
   <soapenv:Body>                                                                                                  
      <tns:someOperation>                                                                        
         <tns:suppliedParameterInstances>                                                                          
            <typ:paramName>param_name</typ:paramName>                                                       
            <typ:instanceName>?</typ:instanceName>                                                                 
            <typ:value>"Value"</typ:value>                                                        
         </tns:suppliedParameterInstances>     
      </tns:someOperation>
   </soapenv:Body>
</soapenv:Envelope>

I do have a WSDL, but I don't know how to read it well enough to tell if Savon should be picking up the "tns"/"typ" thing (and it's not mine, so I can't hand it out To The Internet). Hell, I don't know SOAP well enough to know how to name this question.... Anyway! I need to poke at Savon until the first XML looks like the second. Any ideas, or names of things I need to read up on?

Narfanator
  • 5,595
  • 3
  • 39
  • 71

1 Answers1

0

Found an answer: Replicating XML Request with Savon/Ruby

"The namespace on GetList is correct. What you probably need to write is

soap_client.call(:get_list,
                 :attributes => {'xmlns:b'=>'http://schemas.datacontract.org/'},
                 message: { 'ListRequest' => { 'tns:id' => 1 } }

That won't be the exact solution for your problem, because I don't have access to your wsdl and can't test. But you should get the key to a solution."

Community
  • 1
  • 1
Narfanator
  • 5,595
  • 3
  • 39
  • 71