Python Soap

184 views
Skip to first unread message

nada...@gmail.com

unread,
Apr 2, 2015, 3:06:02 PM4/2/15
to django...@googlegroups.com
Hi All,

What is the best library of python to consume wsdl soap with client certificate pfx and server certificate cer.

BR


Nikolas Stevenson-Molnar

unread,
Apr 2, 2015, 3:45:55 PM4/2/15
to django...@googlegroups.com
Take a look at suds-jurko: https://bitbucket.org/jurko/suds

_Nik
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACZ2VwTAGB4di-yM3QHmMn6Uxehe4QPUxogo07SemV%3DX89ANBw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

nada...@gmail.com

unread,
Apr 2, 2015, 3:48:44 PM4/2/15
to django...@googlegroups.com
Thanks Nikolas,

Checking will come back to you.


For more options, visit https://groups.google.com/d/optout.



--
Nadae Ivar BADIO

+221 70 644 38 44

nada...@gmail.com

unread,
Apr 2, 2015, 3:58:00 PM4/2/15
to django...@googlegroups.com
I am already using suds but my issue was using suds with ssl and client and server certificate

James Schneider

unread,
Apr 2, 2015, 4:05:49 PM4/2/15
to django...@googlegroups.com

Suds is an old (abandoned) library. suds-jurko is a newer fork of it, and may handle SSL connections better.

You may need to provide more detail as to what you are trying to do, as the SSL portion is handled by underlying libraries in Python, not by suds-jurko directly.

-James

Nikolas Stevenson-Molnar

unread,
Apr 2, 2015, 4:09:44 PM4/2/15
to django...@googlegroups.com
suds-jurko also seems to be actively maintained, so you may have luck with filing an issue for missing functionality.

_Nik

nada...@gmail.com

unread,
Apr 2, 2015, 4:17:34 PM4/2/15
to django...@googlegroups.com
i was doing it using this:

        import logging
        logging.basicConfig(level=logging.INFO)
        logging.getLogger('suds.client').setLevel(logging.DEBUG)
        logging.getLogger('suds.transport').setLevel(logging.DEBUG)

        c = Client('https://10.102.5.81:901/APIService.svc?singleWsdl', transport = HTTPSClientCertTransport('client.pem','server.pem'))

        response11 =  c.service.Login()
        print response11
 
        


For more options, visit https://groups.google.com/d/optout.

Nikolas Stevenson-Molnar

unread,
Apr 2, 2015, 4:25:08 PM4/2/15
to django...@googlegroups.com

nada...@gmail.com

unread,
Apr 2, 2015, 5:11:11 PM4/2/15
to django...@googlegroups.com
Thanks finally using this but getting web.fault:

from sudsssltransport import SudsClientStrictSSL
        c= SudsClientStrictSSL('https://10.102.5.81:901/APIService.svc?singleWsdl', client_cert='cert.pem', verify_ssl='certificate.pem')
        print 'here'
        hoho = c.service.Login(clientID=202, terminalID='657CBC06-B339-432C-8122-F8DE3DDD15A8', authCred='API-0002')
        print hoho



No handlers could be found for logger "suds.client"

Traceback (most recent call last):

  File "oooo.py", line 61, in <module>

    main()

  File "oooo.py", line 52, in main

    hoho = c.service.Login()

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 521, in __call__

    return client.invoke(args, kwargs)

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 581, in invoke

    result = self.send(soapenv)

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 621, in send

    original_soapenv=original_soapenv)

  File "/Users/ivarnadaebadio/Desktop/suds/client.py", line 670, in process_reply

    raise WebFault(fault, replyroot)

suds.WebFault






For more options, visit https://groups.google.com/d/optout.

Nikolas Stevenson-Molnar

unread,
Apr 2, 2015, 7:05:40 PM4/2/15
to django...@googlegroups.com
Did you switch to using suds-jurko?

_Nik

nada...@gmail.com

unread,
Apr 2, 2015, 7:24:11 PM4/2/15
to django...@googlegroups.com
Yes


For more options, visit https://groups.google.com/d/optout.

Nikolas Stevenson-Molnar

unread,
Apr 2, 2015, 8:28:49 PM4/2/15
to django...@googlegroups.com
Make sure your previous suds is completely uninstalled. The code in the stack trace doesn't seem to fit with the current suds-jurko code. If you're still encountering the issue, I'd open an issue on the suds-jurko tracker.

_Nik

nada...@gmail.com

unread,
Apr 2, 2015, 11:38:50 PM4/2/15
to django...@googlegroups.com
Thanks i think it is working issue with the server API keep you updated.

BR


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages