Reputation: 489
Can anyone make a webservice client in python from the following JAX-WS API?
https://109.231.73.12:8090/API?wsdl
As I'm running this of a virtual server it's self signed. Both the username and password are 'querty123'
We can get it to work in php just fine not python.
So a working example explaining how you managed to do it would be great
Thanks
Upvotes: 6
Views: 3954
Reputation: 13117
The suds
library makes this a snap in Python:
>>> from suds.client import Client
>>> url = 'https://109.231.73.12:8090/API?wsdl'
>>> client = Client(url, username='qwerty123', password='qwerty123')
>>> client.service.addition(1, 2)
3
>>> client.service.hello('John')
HelloJohn
>>> client.service.xToThePowerOfy(2, 16)
18
>>> print client # automagic documentation
Suds ( https://fedorahosted.org/suds/ ) version: 0.4 (beta) build: R685-20100513
Service ( BasicService ) tns="http://service.basic.com/"
Prefixes (1)
ns0 = "http://service.basic.com/"
Ports (1):
(BasicPort)
Methods (3):
addition(xs:int x, xs:int y, )
hello(xs:string name, )
xToThePowerOfy(xs:int x, xs:int y, )
Types (6):
addition
additionResponse
hello
helloResponse
xToThePowerOfy
xToThePowerOfyResponse
Upvotes: 5