[Soap-Python] soaplib and .net compatibility

Alexander Kolesnikov rocker.yandex at gmail.com
Tue Sep 21 07:46:16 CEST 2010


Burak, I experimented yesterday and rewrote my service and client, and now
they work without "strange" patching.
However, I added Int and Long for further goals: auto-generate valid .net
code by wsdl.

I can suggest some recommendations for interaction between soaplib service
and .net client.
1. Do not generate client contract code by svcutil (or VS built-in GUI,
which use svcutil): generator adds redundant MessageContracts for input and
output parameters and it doesn't work.
2. Use XmlSerializer instead of DataContractSerializer (which is by
default). Add [XmlSerializerFormat] attribute to service contract
(interface, marked with [ServiceContract] attribute).
3. Explicitly specify service namespace in [ServiceContract] attribute.
4. Do not change Style and Use in [XmlSerializerFormat] attribute (which
are OperationFormatStyle.Document and OperationFormatUse.Literal by
default).

It works fine. Now contract code as simple as possible. My previous code was
full of experimental tricks.
I go on with implementing test case.

Wrong code generation is the subject of investigation. svcutil haven't
option to not use message contracts. May be WSDL can contain hint for code
generation?

Also I think specifying service name and default namespace for all service
types will be usefull things.

Thanks,
Alexander.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/soap/attachments/20100921/5ed749b0/attachment.html>


More information about the Soap mailing list