Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create python soap server based on wsdl

Tags:

python

soap

wsdl

I have an wsdl file describing the communication server-client on a Java product. I'm implementing a new server based on Python that will implement the same services.

Do you know of any method to create the Python server code based on the wsdl, that does not requires me to write all of the complextypes involved?

Also, what Api do you recommend?

like image 850
inversus Avatar asked Dec 27 '12 18:12

inversus


People also ask

Can we create SOAP API using Python?

SOAP stands for Simple Object Access Protocol, as the name suggests nothing but a protocol for exchanging structured data between nodes. It uses XML instead of JSON.

Does SOAP require WSDL?

The WSDL Generator component is not essential for using SOAP. Administrators can still write service calls to Content Server in SOAP if needed. The WSDL Generator provides flexibility in altering existing client applications.


1 Answers

This question has not received enough attention.

The currently accepted answer is good, but its answer is 'no'. Is there really no reasonably maintained and general solution?

Unfortunately, I don't think the negative answer is due to lack of attention to the question. There really is no support for WSDL in python. If you want to avoid the complexities of building your own soap envelope from scratch the only thing I can recommend you is building a sample envelope using any of the many soap webservices tools (soapui for instance) and then use it as a template string (I know, horrible) in your python code

UPDATE you could use spyne. It's a python RPC toolkit that among other protocols supports SOAP. It will create the WSDL for you, but if your objective is implementing the service described by the WSDL you already have then you'll have to fine tune your spyne service (written in python) until the generated WSDL matches the original

like image 156
Francisco Meza Avatar answered Sep 18 '22 19:09

Francisco Meza