Python
This requires a "pip install suds" to get the python suds 0.4 package.
#!/bin/env python
from suds.client import Client
from suds.bindings import binding
from suds.wsse import Security, UsernameToken
library = "https://library.company.com/WebService/1.0.0"
# This could be cached to a local file for efficiency
wsdl = "http://library.company.com/WebService/1.0.0?WSDL"
# Use SOAP 1.2
binding.envns = ('SOAP-ENV', 'http://www.w3.org/2003/05/soap-envelope')
proxy = Client(url=wsdl, location=library,
headers={'Content-Type': 'application/soap+xml'})
security = Security()
token = UsernameToken('admin', 'password1')
security.tokens.append(token)
proxy.set_options(wsse=security)
response = proxy.service.ping()
print "Ping responded with: "
print response, "\n"
response = proxy.service.getRobots(libraryId = 1)
print "Robots: "
print response, "\n"
response = proxy.service.getDevice(deviceId = response[0].parentDeviceId)
print "Rail: "
print response, "\n"