Login

Tag "soap"

Snippet List

SOAP web service with soaplib 2.0

I've updated the `DjangoSoapApp` class from [this popular soaplib snippet](http://djangosnippets.org/snippets/2210/) so the snippet will work properly with soaplib 2.0. Usage is the same as before: my_soap_service = DjangoSoapApp([MySOAPService], __name__)

  • soap
  • soaplib
  • wsdl
Read More

SOAP web service with soaplib 0.9+

The popular [soaplib snippet](http://djangosnippets.org/snippets/979/) works only with older soaplib (0.8, for example). This snippet is modifed to work with newer soaplib: it was tested with 0.9.2-alpha3 and 1.0.0-beta4. I've tested suds python client and .NET client.

  • soap
  • soaplib
  • wsdl
Read More

soaplib service integration 2

Based on our [first version of soaplib service integration](http://www.djangosnippets.org/snippets/979/), this second one adds Basic Auth with credentials specified in settings. It can be tested with [django soaplib test cliente](http://www.djangosnippets.org/snippets/1406/)

  • soap
  • soaplib
  • wsdl
Read More

django soaplib test client

This code *monkey patches* soaplib client to allow the usage of django test client for local web service testing (without a running server). It adds *basic* authentication.

  • soap
  • soaplib
  • test-client
Read More

Automatically expose soaplib methods in WSDL

This snippet is a replacement views.py for [SOAP views with on-demand WSDL generation](http://www.djangosnippets.org/snippets/979/) It iterates over your installed apps looking for web_service.py in each one, any methods decorated with @soapmethod within web_service.py will automatically be imported into the local namespace making them visible in the WSDL. It will blindly override local objects of the same name so it's not very safe (could do with some more error checks) but it works very well.

  • soap
  • soaplib
  • wsdl
  • web-services
Read More

SOAP views with on-demand WSDL generation

Optio's [soaplib](http://trac.optio.webfactional.com/wiki/soaplib) makes it really straightforward to write SOAP web service views by using a decorator to specify types. Plus it's the only Python library, as of today, which is able to generate WSDL documents for your web service. You can test it with a soaplib client: >>> from soaplib.client import make_service_client >>> from foo.views import HelloWorldService >>> client = make_service_client('http://localhost:8000/hello_world/', HelloWorldService()) >>> client.say_hello('John', 2) ['Hello, John', 'Hello, John'] And get an WSDL document: >>> client.server.wsdl('') '<?xml version=\'1.0\' encoding=\'utf-8\' ?><definitions name="HelloWorldService" ... </definitions>'

  • soap
  • soaplib
  • wsdl
Read More

7 snippets posted so far.