I done this & successfully run the code. I want to ask that, can it possible to create client through view instead of command prompt?
On Sunday, 24 October 2010 07:54:15 UTC+5:30, Scott Hebert wrote: > > Ricko - > > You may have already gotten your answer. I believe your problem is > related to Django's CSRF protection. If that's the case, you'll want > to import csrf_exempt from django.views.decorators.csrf into your > views and then wrap the call to MySOAPService in it. > > For example: > > # views.py > from django.views.decorators.csrf import csrf_exempt > > <snip> > > my_soap_service = csrf_exempt(MySOAPService([DjangoSoapService], > DjangoSoapService.__tns__)) > > In my testing that seemed to work: > > $ python2.5 > Python 2.5.5 (r255:77872, Sep 7 2010, 10:18:54) > [GCC 4.0.1 (Apple Inc. build 5490)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> from suds.client import Client > > >>> client = Client("http://127.0.0.1:8000/hello_world/service.wsdl", > cache=None, faults=False) > >>> response = client.service.hello_world(hello_string="hi") > >>> print response > (200, hi) > > Let us know if that works for you. > > -- > Scott Hebert > http://slaptijack.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/SCZExelxyEoJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.