I'm using suds 0.4
I'm trying to create a node like this (from example SOAP request):
<id xsi:type="xs:int">123456</id>
It is a parameter of a SOAP call and merely passing an int generates this:
<int>123456</int>
which gives me
Expected: class java.lang.Integer, got class org.apache.xerces.dom.ElementNSImpl
So what I need is a way of creating the right type. I've tried creating an instance of xsd:int which works but then there is no way I can see of setting the value.
Anyone got any ideas?
EDIT
Code:
findResult = self.client.service.find(self._getSession(), 'Candidate', 123456)
or
find = self.client.factory.create('find')
find.session = self._getSession()
find.entityName = 'Candidate'
find.id = 123456
findResult = self.client.service.find(find)
Same result both times. It seems that it passes the id as text field. I've checked the type and I am definitely using an int type. In the WSDL schema the parameter type is:
<xs:complexType name="find">
<xs:sequence>
<xs:element name="session" type="xs:string" minOccurs="0"/>
<xs:element name="entityName" type="xs:string" minOccurs="0"/>
<xs:element name="id" type="xs:anyType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
Id anyType the problem here?