Hi,

I'm just started playing around with Python to trigger a method in a web 
service.  I've been using SOAPpy and it's incredibly badly documented so i'm 
not getting very far.

What I need to do is create the following in my SOAP body:

        <n1:myMethod xmlns:n1="http://www.csapi.org/schema/etc...";>
                <n1:address 
xmlns:n1="http://www.csapi.org/schema/etc...";>MyAddress</n1:address>
        </n1:myMethod >

I've managed to kinda do something similar to this with the following piece of 
code:

        from SOAPpy import SOAPProxy

        wsdlurl = 'http://192.168.30.91:6062/mywebservice'

        # define the namespace 
        namespace = 'http://www.csapi.org/schema/etc...'

        server = SOAPProxy(wsdlurl) 

        print 'Test: ' + server._ns(namespace).myMethod(address = "MyAddress")

This creates the following SOAP XML:

        <ns1:myMethod xmlns:ns1="http://www.csapi.org/schema/etc..."; 
SOAP-ENC:root="1">
        <address xsi:type="xsd:string">MyAddress</address>
        </ns1:myMethod>

I need to be able to add a namespace to the address parameter so it matches the 
previous SOAP XML above (n1:address, xmlns, etc.) and, what with Python being 
new to me and SOAPpy having awful docs, I can't figure out how to do this. 

Could anyone please help here?

Cheers,

Jon.








Information contained in this e-mail and any attachments are intended for the 
use of the addressee only, and may contain confidential information of Ubiquity 
Software Corporation.  All unauthorized use, disclosure or distribution is 
strictly prohibited.  If you are not the addressee, please notify the sender 
immediately and destroy all copies of this email.  Unless otherwise expressly 
agreed in writing signed by an officer of Ubiquity Software Corporation, 
nothing in this communication shall be deemed to be legally binding.  Thank you.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to