Link to home
Start Free TrialLog in
Avatar of aranginw
aranginw

asked on

SOAPpy namespace problem

Experts,
I am attempting to use SOAPpy to send SOAP messages.  Here is a sample of what I'm executing:
from SOAPpy import SOAPProxy

url = 'http://192.168.10.128:8080/ws/SessionLogin?wsdl'

# define the namespace
namespace = 'http://whatever.org'
server = SOAPProxy(url)

print server._ns(namespace).login(String_1 = "<TSSLogin Username='username' Password='password' \>")


Which results in the following string being sent:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/1999/XMLSchema"
>
<SOAP-ENV:Body>
<ns1:login xmlns:ns1="http://www.tamalesoftware.com/ws/SessionLogin" SOAP-ENC:ro
ot="1">
<String_1 xsi:type="xsd:string">&lt;TSSLogin Username="admin" Password="admin" /
&gt;</String_1>
</ns1:login>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


I need the String_1 element to read <ns1:String_1
meaning with the namespace...
How do I accomplish that?

Thanks.
Asim
Avatar of aranginw
aranginw

ASKER

Increase points to 500.  
ASKER CERTIFIED SOLUTION
Avatar of RichieHindle
RichieHindle

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am using SOAPpy.  I have tried similar things, but I will try what you're saying and get back to you.  Thanks.
It doesn't give me what I need.  I need the parameter to be String_1 with the namespace set to ns1

I have still not found anything else, still looking.  Any other suggestions?

Asim
I don't have any more suggestions, I'm afraid.  Have you tried the pywebsvcs mailing list at https://lists.sourceforge.net/lists/listinfo/pywebsvcs-talk ?
No, I haven't tried that.  I'll use that link.  Thanks Richie.
Richie,
You know what... that DID work!  Thanks!