Code

Opened 9 years ago

Closed 9 years ago

Last modified 5 years ago

#552 closed defect (duplicate)

[patch] SOAP support for django

Reported by: upadhyay@… Owned by: adrian
Component: Tools Version:
Severity: normal Keywords:
Cc: upadhyay@…, oliver@… Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In line with XMLRPC support for django I have a work in progress for SOAP support, semantics is very much similer to what is described there, the service is a view, you map the view in urlconf, and use a callable instance SimpleSOAPView. Register methods/instances to be served by using the SOAPpy's Server API. Eg:

from django.contrib.soap import SimpleSOAPView
soap = SimpleSOAPView()
def f2():
    return 'f2'
soap.registerFunction(f2)

This has a dependency requirement of SOAPpy.

One thing to note is the API's for SimpleXMLRPCView and SimpleSOAPView are not compatible, function names are different, one support unregistering while other does not etc; one of the reasons is that serves as a reminder that XMLRPC and SOAP are actually different, SOAP is much more configurable, supports authentication etc, which I have not used myself so have little idea, but they are different, and anyone knowing SOAPpy or xmlrpc will not have to learn anything new while using them over django. Practicality beats purity?

Attachments (2)

soap.py (11.9 KB) - added by upadhyay@… 9 years ago.
soap.py, put it in django/contrib
soap.2.py (15.8 KB) - added by bethmcnany 5 years ago.
soap.py - updated WSDL generator (see comments)

Download all attachments as: .zip

Change History (9)

Changed 9 years ago by upadhyay@…

soap.py, put it in django/contrib

comment:1 Changed 9 years ago by anonymous

  • Cc upadhyay@… added

comment:2 Changed 9 years ago by adrian

  • milestone Version 1.0 deleted

This isn't necessary for 1.0.

comment:3 Changed 9 years ago by jacob

  • Resolution set to duplicate
  • Status changed from new to closed

This is a subset of #115.

comment:4 Changed 8 years ago by adrian

  • Version 1.0 deleted

comment:5 Changed 7 years ago by anonymous

  • Cc oliver@… added

CC'd self

comment:6 Changed 7 years ago by Mike <mpede@…>

I'm just about to try this out. I've used SOAPpy, and initially I really liked it.
I've been directed by new management to use SOAP with everything now.

I'm willing to contribute to this project, if not get others here at the university involved.

Please let me know where I can fit into this initiative.

Changed 5 years ago by bethmcnany

soap.py - updated WSDL generator (see comments)

comment:7 Changed 5 years ago by bethmcnany

Added the second soap.py attachment. I know the ticket is closed, but if you search for "Django SOAP server" this is one of the oft-mentioned links. I am using this file, and the WSDL generator was not working (at least for Python 2.6). So I figured if anyone else comes across this in the future this may be helpful.
You have to read the comments though, or it won't work! I'm sure I coded inefficiently so feel free to fix that, also.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.