best practices for SOAP client in Django

1,050 views
Skip to first unread message

wynfred

unread,
Dec 4, 2008, 4:39:06 PM12/4/08
to Django users
Hi, all. I am new to Django/Python. For one project, I need to be
posting data to a .NET SOAP web service. I've read about the various
Python SOAP libraries, mainly SOAPpy (http://diveintopython.org/
soap_web_services/). What is not clear yet is how best to use a tool
like SOAPpy within the Django framework.

Our application should have the following routine:
1) Our django app would pull data from our database
2) We'd take that data and format the SOAP XML message
3) We'd post the SOAP XML message to the .NET SOAP web service
4) When the response verifies a successful post to the SOAP web
service, we'd record that transaction as successful in our database

Anyway, I'm learning how to do all these steps as isolated pieces of
code, but what's not clear is how best to achieve this task flow
within our Django application.

This whole routine will need to run as a cron job...and I suppose that
might make some question whether Django is the right tool for this
task. I'd prefer to standardize using one framework/language though.

Any pointers/suggestions would be most appreciated. Thank you in
advance.

Stephen


Antoni Aloy

unread,
Dec 5, 2008, 3:03:49 AM12/5/08
to django...@googlegroups.com
2008/12/4 wynfred <stephen...@gmail.com>:

>
> Hi, all. I am new to Django/Python. For one project, I need to be
> posting data to a .NET SOAP web service. I've read about the various
> Python SOAP libraries, mainly SOAPpy (http://diveintopython.org/
> soap_web_services/). What is not clear yet is how best to use a tool
> like SOAPpy within the Django framework.
>
> Our application should have the following routine:
> 1) Our django app would pull data from our database
> 2) We'd take that data and format the SOAP XML message
> 3) We'd post the SOAP XML message to the .NET SOAP web service
> 4) When the response verifies a successful post to the SOAP web
> service, we'd record that transaction as successful in our database
>
> Anyway, I'm learning how to do all these steps as isolated pieces of
> code, but what's not clear is how best to achieve this task flow
> within our Django application.
>
d to the Google Groups "Django users" group.
> To post to this group, send email to django...@googlegroups.com
> To unsubscribe from this group, send email to django-users...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>
We use ZSI to consume web services from our Django application. What
we have made is make a pythonic lawer for the web service, adding
caches when appropiated, connection pooling etc

For the Django point of view is just another library, in the form of a
service we instatiate in the application __init__.py.

I don't know if this is the best way to do it, but it works quite well for us.

Best regards,

--
Antoni Aloy López
Blog: http://trespams.com
Site: http://apsl.net

Reply all
Reply to author
Forward
0 new messages