[Soap-Python] soaplib-2.0.0-beta2 namespace problems in responses

Dave Dodd dave at ci.com.au
Tue Mar 22 07:25:35 CET 2011


Gentlefolk,

I have been tasked with replacing an existing set of SOAP services and I have
been experimenting with the using soaplib-2.0.0 beta 2 to do so via a wgsi
handler talking to a Mongrel2 webserver. My handler is using the m2wsgi
python library programatically and is retrieving data from MongoDB instance
via pymongo.  Not too shabby for someone without any real experience with
python or SOAP :)

I have been using soapUI to do my testing which all works as expected,
except I am getting odd namespace prefixes in the responses generated by
soaplib.

I think I have set the namespace for my services correctly in my use of the
soaplib.core.Application function as follows:

	soapapplication = soaplib.core.Application([ClientService], 'eas')

The guts of a request looks like this:

	<eas:RequestLetterStatus>
		<eas:Account>TESTACC</eas:Account>
		<eas:LetterReference>12345</eas:LetterReference>
	</eas:RequestLetterStatus>

The response I get includes:

	<tns:RequestLetterStatusResponse>
		<tns:RequestLetterStatusResult>
			<s1:LetterStatus>
				<s1:Status>Unknown</s1:Status>
			</s1:LetterStatus>
		</tns:RequestLetterStatusResult>
	</tns:RequestLetterStatusResponse>

Are the tns & s1 namespaces shwoing in the response correct ?

I expected to see the eas namespace I had specified in the call to
soaplib.core.Application().

I have attahced the script I am using.

-- Dave
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dgdsoaptest.py
Type: text/x-python
Size: 2727 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/soap/attachments/20110322/d571246a/attachment.py>


More information about the Soap mailing list