1

Re: Using web services in Python

Hi all,

Does anyone have any experience in using the NBN web services in python? I have tried using most of the available SOAP libraries (suds, SOAPpy and others) and I cannot tell whether it is my bad coding or problems with the libraries that is causing my issues.

With suds I get a recursion problem which appears to be a bug with the library that has been there for a few years.

With SOAPpy I can get the methods names (GetSpeciesList, GetHabitatQuery etc) but I am unsure how to progress from here as I cannot find an example that helps me. I have this code using SOAPpy to find the methods:

url = 'http://www.nbnws.net/ws_3_5/GatewayWebService?wsdl'
proxy = SOAPpy.WSDL.Proxy(url)
text =  '%d methods in WSDL:' % len(proxy.methods) + '\n'
for key in proxy.methods.keys():
    print key
print

This link (http://www.ibm.com/developerworks/webservices/library/ws-pyth16/) contains some information but I cannot work out how to make this work for the NBN web services.

Any pointers on this would be most appreciated.

James

2

Re: Using web services in Python

I have managed to get this working but not using any of the python soap libraries. I have used the following method in the attached python file. I tried to copy the code here but it said I had to many links in my post.

Hope this helps someone else.

Post's attachments

NBN Webservices Python.py 2.56 kb, 5 downloads since 2012-08-15 

You don't have the permssions to download the attachments of this post.