Thursday, 14 April 2016

XML : How to pass xs:any element to SOAP service using Savon gem?

I'am using savon 3.x and have a problem with xs:any attribute

XSD schema has an attribute:

  <xs:element name="MessagePrimaryContent" type>    <xs:complexType>      <xs:sequence>        <xs:any namespace="##other" processContents="skip">        </xs:any>      </xs:sequence>    </xs:complexType>  </xs:element>    

Savon requests a hash entry for this attribute.

.example_body shows

  MessagePrimaryContent: {}.    

I am trying to pass an object like

  MessagePrimaryContent: {    ku: 'bla'  }    

But target SOAP service receives body with empty tag <lol1:MessagePrimaryContent/>

How this hash should look like?

Thanks a lot for the help!

No comments:

Post a Comment