Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from suds.xsd.doctor import ImportDoctor, Import
from suds.client import Client
def connect_to_soap_service():
url = 'https://cgmix.uscg.mil/xml/PSIXData.asmx?WSDL'
imp = Import('http://www.w3.org/2001/XMLSchema', location='http://www.w3.org/2001/XMLSchema.xsd')
imp.filter.add('http://cgmix.uscg.mil')
doctor = ImportDoctor(imp)
return Client(url, doctor=doctor)
if __name__ == '__main__':
client = connect_to_soap_service()
print client.service.getAllVINSXMLString(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.