I have to construct a SOUP method Agw_typeGenerarDespachoIn from wsdl
<xsd:complexType name="Agw_typeGenerarDespachoIn">
<xsd:all>
<xsd:element name="guias" type="soap-enc:Array"/>
<xsd:element name="margen_izquierdo" type="xsd:float"/>
<xsd:element name="margen_superior" type="xsd:float"/>
<xsd:element name="tipo_impresion" type="xsd:string"/>
<xsd:element name="usuario" type="xsd:string"/>
<xsd:element name="clave" type="xsd:string"/>
</xsd:all>
</xsd:complexType>
I construct the param guias of type soap-enc:Array
array_type = self.client.get_type('ns1:Array')
guias = array_type()
values = xsd.AnyObject(array_type, array_type(_attr_1={'guias': '98516000037'}))
Agw_typeGenerarDespachoIn = self.factory.Agw_typeGenerarDespachoIn(guias=values,
margen_izquierdo=float(0),
margen_superior=float(0),
tipo_impresion=unicode('LASER'),
usuario=unicode(self.usuario),
clave=unicode(self.clave))
I get return
'`list`' object has no attribute '`_xsd_name`'
If i try with other value for param guias like
guia = dict(item='98516000056')
i get the return error
TypeError: {http://schemas.xmlsoap.org/soap/encoding/}Array() got an unexpected keyword argument 'item'. Signature: `_value_1: ANY[], arrayType: xsd:string, offset: {http://schemas.xmlsoap.org/soap/encoding/}arrayCoordinate, id: xsd:ID, href: xsd:anyURI, _attr_1: {}`
So i try with the sugered value "_value_1"
guia = dict(_value_1=['98516000056'])
And get the error
Any element received object of type 'unicode', expected lxml.etree._Element or __builtin__.dict or zeep.xsd.valueobjects.AnyObject
I have tried different ways to build the soup-enc:Array parameter but I always get an error. You know how I can fix it. I appreciate all the help you can give me