A SOAPpy question... (Method Parameters)

G

giblfiz

I'm having difficulty sending out correctly named method parameters to
a php soap server that I am running using SOAPpy. Idealy I would like
to send XML that looks like this (which I cribbed from another client
that works just fine)


<SOAP-ENV:Body>
<ns1:login xmlns:ns1="http://testuri.org">
<user_auth>
<user_name xsi:type="xsd:string">
hpottash
</user_name>

<password xsi:type="xsd:string">
775fd0ac8dcdba0f307e8a2a474f9dce
</password>
<version xsi:type="xsd:string">
.01
</version>
</user_auth>
<application_name xsi:type="xsd:string">
SoapTest
</application_name>
</ns1:login>
</SOAP-ENV:Body>


The closest I can come with SOAPpy is by running the following >>>
remote = SOAPpy.SOAPProxy("http://192.168.0.200/",
"http://testuri.org")
remote.login({"user_auth": {'user_name': 'theusername', 'password':
'thepassword', "version" : ".01"}, "application_name":"SoapTest"});

Which generates XML that looks like this:
<SOAP-ENV:Body>
<ns1:login xmlns:ns1="http://testuri.org" SOAP-ENC:root="1">
<v1>
<application_name xsi:type="xsd:string">
SoapTest
</application_name>
<user_auth>
<password xsi:type="xsd:string">
thepassword
</password>
<user_name xsi:type="xsd:string">
theusername
</user_name>
<version xsi:type="xsd:string">
.01
</version>
</user_auth>
</v1>
</ns1:login>
</SOAP-ENV:Body>

I believe that the Server is unable to parse this correctly because of
the <v1> tag, but I don't know how to specify what the names of the
parameters that are passed to the method should be.

Any help would be deeply appreciated.
-Harry
 

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

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top