Y
Yurj
Hi all!
I've to produce this xml as a soap request (I'm using SOAPpy):
<soapenv:Body>
<request
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<arg0>
<item>
<key xsi:type="xsd:string">titolo</key>
<value xsi:type="xsd:string">titolo_ws</value>
</item>
<item>
<key xsi:type="xsd:string">tipoIid</key>
<value xsi:type="xsd:string">tipoIid_ws</value>
</item>
<item>
<key xsi:type="xsd:string">autore</key>
<value xsi:type="xsd:string">autore_ws</value>
</item>
<item>
<key xsi:type="xsd:string">iid</key>
<value xsi:type="xsd:string">iid_ws</value>
</item>
<item>
<key xsi:type="xsd:string">*links*</key>
<value xsi:type="soapenc:Array" soapenc:arrayType="ns1:Map[2]">
<item>
<item>
<key xsi:type="xsd:string">dataProvider</key>
<value xsi:type="xsd:string">ps_ws1</value>
</item>
<item>
<key xsi:type="xsd:string">url</key>
<value xsi:type="xsd:string">url_ws1</value>
</item>
<item>
<key xsi:type="xsd:string">diritti</key>
<value xsi:type="xsd:string">diritti_ws1</value>
</item>
</item>
<item>
<item>
<key xsi:type="xsd:string">dataProvider</key>
<value xsi:type="xsd:string">ps_ws0</value>
</item>
<item>
<key xsi:type="xsd:string">url</key>
<value xsi:type="xsd:string">url_ws0</value>
</item>
<item>
<key xsi:type="xsd:string">diritti</key>
<value xsi:type="xsd:string">diritti_ws0</value>
</item>
</item>
</value>
</item>
</arg0>
</request>
</soapenv:Body>
I can the first part (without *links*) with:
import SOAPpy
server = SOAPpy.SOAPProxy("http://myserver.com/service")
a=[{'key':'titolo','value':'I Promessi
Sposi'},{'key':'tipoIid','value':'isbn'
{'key':'autore','value':'Alessandro
Manzoni'},{'key':'iid','value':'566669'}]
a1=SOAPpy.structType()
a1._addItem('id0',a)
print server.request(a1)
========
this works. The server is Java Axis.
But, when I try the *links* part, I've failed. Can someone explain me how to
create a python object that can used by SOAPpy to send the full request?
I've tried with:
links=[{'key':'dataProvider','value':'DATA
PROVIDER'},{'key':'url','value':'ht
://dafnedb.cab.unipd.it/repository/123458'},{'key':'diritti','value':'stringa
n i diritti'}]
link1=SOAPpy.arrayType()
link1=[links]
a=[{'key':'titolo','value':'I Promessi Sposi'},{'key':'tipoIid','value':'is
{'key':'autore','value':'Alessandro Manzoni'},{'key':'iid','value':'566669'
ey':'*links*','value':link1}]
but I receive a:
SOAPpy.Types.faultType: <Fault soapenv:Server.userException:
org.xml.sax.SAXException: No deserializer defined for array type
{http://www.w3.org/1999/XMLSchema}list: >
Help!
P.S. I'm not subscrive, please CC me... thanks!
________________________________________________
Message sent using ALFANET Caorle WEBMAIL 1.0
I've to produce this xml as a soap request (I'm using SOAPpy):
<soapenv:Body>
<request
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<arg0>
<item>
<key xsi:type="xsd:string">titolo</key>
<value xsi:type="xsd:string">titolo_ws</value>
</item>
<item>
<key xsi:type="xsd:string">tipoIid</key>
<value xsi:type="xsd:string">tipoIid_ws</value>
</item>
<item>
<key xsi:type="xsd:string">autore</key>
<value xsi:type="xsd:string">autore_ws</value>
</item>
<item>
<key xsi:type="xsd:string">iid</key>
<value xsi:type="xsd:string">iid_ws</value>
</item>
<item>
<key xsi:type="xsd:string">*links*</key>
<value xsi:type="soapenc:Array" soapenc:arrayType="ns1:Map[2]">
<item>
<item>
<key xsi:type="xsd:string">dataProvider</key>
<value xsi:type="xsd:string">ps_ws1</value>
</item>
<item>
<key xsi:type="xsd:string">url</key>
<value xsi:type="xsd:string">url_ws1</value>
</item>
<item>
<key xsi:type="xsd:string">diritti</key>
<value xsi:type="xsd:string">diritti_ws1</value>
</item>
</item>
<item>
<item>
<key xsi:type="xsd:string">dataProvider</key>
<value xsi:type="xsd:string">ps_ws0</value>
</item>
<item>
<key xsi:type="xsd:string">url</key>
<value xsi:type="xsd:string">url_ws0</value>
</item>
<item>
<key xsi:type="xsd:string">diritti</key>
<value xsi:type="xsd:string">diritti_ws0</value>
</item>
</item>
</value>
</item>
</arg0>
</request>
</soapenv:Body>
I can the first part (without *links*) with:
import SOAPpy
server = SOAPpy.SOAPProxy("http://myserver.com/service")
a=[{'key':'titolo','value':'I Promessi
Sposi'},{'key':'tipoIid','value':'isbn'
{'key':'autore','value':'Alessandro
Manzoni'},{'key':'iid','value':'566669'}]
a1=SOAPpy.structType()
a1._addItem('id0',a)
print server.request(a1)
========
this works. The server is Java Axis.
But, when I try the *links* part, I've failed. Can someone explain me how to
create a python object that can used by SOAPpy to send the full request?
I've tried with:
links=[{'key':'dataProvider','value':'DATA
PROVIDER'},{'key':'url','value':'ht
://dafnedb.cab.unipd.it/repository/123458'},{'key':'diritti','value':'stringa
n i diritti'}]
link1=SOAPpy.arrayType()
link1=[links]
a=[{'key':'titolo','value':'I Promessi Sposi'},{'key':'tipoIid','value':'is
{'key':'autore','value':'Alessandro Manzoni'},{'key':'iid','value':'566669'
ey':'*links*','value':link1}]
but I receive a:
SOAPpy.Types.faultType: <Fault soapenv:Server.userException:
org.xml.sax.SAXException: No deserializer defined for array type
{http://www.w3.org/1999/XMLSchema}list: >
Help!
P.S. I'm not subscrive, please CC me... thanks!
________________________________________________
Message sent using ALFANET Caorle WEBMAIL 1.0