Savon call to SOAP webservice

141 views
Skip to first unread message

shirle...@gmail.com

unread,
Jun 18, 2015, 5:36:04 AM6/18/15
to sav...@googlegroups.com
I have a SOAP request 

    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" >
    <soap:Header/>
              <soap:Body>
                    <Register>
                         <identifiers>?</identifiers>
                         <userId></userId>
                      <password pwct="?">?</password>
                         <locale>?</locale>
                  </Register>


Fully Formed Request that works is 

        <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
        <soap:Header/>
           <soap:Body>
                 <Register>
                     <identifiers>
                             <DIdentifiers>
                                       <Section name="IDENTIFIERS">
                                             <Property name="Type" value="Support" />
                                             <Property name="Version" value="3.80 Jan 03 2013" />
                                         <Property name="Timestamp" value="2015/06/08 11:57:48 GMT" />
                                            <Property name="SerialNumber" value="00004" />
                                            <Property name="ProductNumber" value="VR" />
                                         <Property name="Model" value="Gen8" />
                                   </Section>
                                        <Section name="INTERFACE_IDENTIFIERS">
                                               <Property name="InterfaceAddress" value="45.34.54.6"/>
                                              <Property name="InterfaceMacAddress" value="00579FGHslkf"/>
                                     </Section>
                              </DIdentifiers>
                     </identifiers>
               <userId>shirley<userId>
        <password pwct="TRUE">shirl123</reg:password>
        <locale>en_US</locale>
        <Register>
        </soap:Body>
        </soap:Envelope>

I have added 

    WSDL client = Savon::client(wsdl: " ")

And calling method

    client.call(:Register, message: { })

How can I send the above parameters in Ruby? Could not figure out the correct way to pass parameters

I'm passing in message
       DeviceIdentifiers: {
:Section     => {
{ :Property    => nil,
  :attributes! => { :Property => { "name" => Type, "value" =>  Remote Support} }
},
But this doesnot work..  As property tag has name and value how do we specify this in ruby?

I referred http://savonrb.com/version1/executing-soap-requests.html for assigning arguments to xml tags

Could someone let me know what could be wrong
 
Posted in Stack overflow too 
Reply all
Reply to author
Forward
0 new messages