I am trying to make soap requests but when i use the operation.body
method every array doesnt seems to be in the xml after operation.build
.
Here's part of the WSDL:
<xs:element name="Item" type="ns1:TList_Item"/>
--
<xs:complexType name="TList_Item">
<xs:complexContent>
<xs:restriction base="soapenc:Array">
<xs:sequence/>
<xs:attribute xmlns:n1="http://schemas.xmlsoap.org/wsdl/" ref="soapenc:arrayType" n1:arrayType="ns1:TItem[]"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
--
<xs:complexType name="TItem">
<xs:sequence>
<xs:element name="Item_Name" type="xs:string"/>
<xs:element name="Item_Code" type="xs:string"/>
</xs:sequence>
</xs:complexType>
I tried this:
operation.body = { Item: [item1,item2,..] }
but got this error:
ArgumentError: Expected a Hash for the :Item complex type
I also tried this:
How to pass Array as parameter to SOAP in Ruby
No errors but the content never got into the xml after operation.build
.
How should i approach this?