Comments (7)
need that !
from pyws.
sorry to say that, but i don't think i will be able to implement this feature in the nearest future (at least a year) as it requires a substantial amount of work and i just don't have enough time for it
from pyws.
whats the update?
from pyws.
How can I help?
from pyws.
sorry, but unfortunately pyws is not very high in my priorities now. i only do some support and bug fixes if it is necessary. if you decide to implement this feature yourself, i can provide some guidance
from pyws.
if you can provide me some guidance I will try to implement and send pull for review :)
from pyws.
Hello again,
Sorry for the late answer, I was moving to another country and it took virtually all my attention.
So, about SOAP 1.2 and WSDL 2.0 support.
First of all, a short notice about SOAP 1.1 support. When I implemented support of SOAP 1.1, my intention was to offer a simple way to expose APIs that would have very high interoperability with various SOAP clients. To meet this requirement, I had to implement a rather narrow subset of SOAP, but test it with as many SOAP clients as possible. I suggest using the same approach with SOAP 1.2.
Since I haven't ever worked with SOAP 1.2, but only with SOAP 1.1, to make things easier, I would try to mimic the behavior of one of the existing SOAP engines, for instance, Apache Axis 2. To do this I would:
- Set up a simple SOAP server with only one function - string concatenation. As far as I can tell, a good starting point is http://axis.apache.org/axis2/java/core/docs/quickstartguide.html. The result of this step should not be a server that can only receive requests and produce responses, but rather it should be a server that is also able to generate its description via WSDL.
- Generate a SOAP client from the WSDL of your service using one of the existing libraries. Since you are interested in a SOAP 1.2 server, I assume you have at least one such library in mind, what is it, by the way?
- Make them work together.
- Write an implementation of this service using pyws.
The last step is, of course, the longest and the most difficult:
- First, make sure that you can run all (or at least suds based) pyws tests, read more about it here - http://stepank.github.io/pyws/dev/running_tests.html. This will guarantee that you can run a test server without any problems.
- Then I suggest creating a new class,
Soap12Protocol
, insrc/pyws/protocols/soap/__init__.py
. You should probably derive it fromSoapProtocol
because they will have quite a lot in common. - Override attributes
name
(set it tosoap12
) andnamespaces
. As far as I understand, the latter should have only one elementhttp://www.w3.org/2003/05/soap-envelope
. - Extend class
SoapServer
insrc/pyws/server.py
so that it defines not only an instance of the existingSoapProtocol
, but also an instance ofSoap12Protocol
. - At this point, provided that you set up everything correctly, you will be able to run a test server (go to
project_root/examples/_wsgi
and runmake run
), and send requests and receive responses. SOAP 1.2 endpoint will be athttp://localhost:8000/api/soap12
. - There is also a chance that the client you generated earlier will be able to work with this server. If not, make it so by fiddling with the code of
Soap12Protocol
. - Make your server generate WSDL. To do this, override the
get_wsdl
function ofSoap12Protocol
and write it the way that it generates the same WSDL as you got from the Axis2 server. You might want to look atsrc/pyws/protocols/soap/wsdl.py
for some inspiration as well. Now you should be able to make the earlier generated client understand the WSDL and work with your server (WSDL will be athttp://localhost:8000/api/soap12/wsdl
). - Finally, you will have to add an automated test for all of this. How exactly you will do this will depend on the client you will use, so we can discuss it later. Some examples can be found here: https://github.com/stepank/pyws/tree/develop/tests. Note however, that without an automated test I will not merge your pull request because such tests are absolutely necessary to ensure interoperability.
If you walk through all of these steps, you will have one function working with strings only implemented. You will have to do this for all other types as well (integers, floats, dicts, lists etc), but it will become a bit easier because you will be quite familiar with the code.
If after reading this remark, you still decide to embark on this venture, you will, I assume, have a lot of questions. Don't hesitate to ask them either here or via my e-mail, I'll try to help as much as I can.
from pyws.
Related Issues (20)
- Function arguments are inferred incorrectly, if they are not specified HOT 1
- Running doctests returns exit code 0 in the case of failure HOT 1
- Unicode support HOT 1
- pyws should check authentication set up if some functions require context HOT 1
- REST protocol must parse arguments according to their specification HOT 1
- Django adapter must return ordinary dicts for GET and POST arguments HOT 1
- Consider adding some response headers
- Boolean support
- Better REST protocol
- I followed the tutorial, but get following error? HOT 3
- The example crashes with a 500 (py2.7, django1.3) HOT 1
- Getting suds.transport.TransportError HOT 1
- long type support
- complex type self referencing (for complex tree) HOT 2
- Fix some issues with datetime support
- Prepare Jenkins to test pyws on various configurations
- It should be possible to specify optional arguments
- Support Django 1.7
- Drop python 2.5 support
- Remove Twisted Web adapter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyws.