help with soap, please (java axis)

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
 
A

Alan Kennedy

[Yurj]
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:

I don't have time to answer this in detail, but I do have one
suggestion:

That error looks like it's coming from Axis (from the
"org.xml.sax.SAXException"). Looking through my Axis config file, I
see no mention of the namespace you mentioned, namely

http://www.w3.org/1999/XMLSchema

However, the 2001 schema is listed in the axis config file
(webapps/axis/WEB-INF/server-config.wsdd).

http://www.w3.org/2001/XMLSchema

If I'm right that this is the cause of the error, you have two options
to resolve the problem

1. Make SOAPpy generate calls in the 2001/XMLSchema namespace.

2. Configure Axis to have a deserializer for the 1999/XMLSchema
namespace.

Sorry, don't have time to help with either option right now.

HTH,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top