Skip to content

Instantly share code, notes, and snippets.

@abelsonlive
Created December 9, 2014 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abelsonlive/b0cec3b89f514884c716 to your computer and use it in GitHub Desktop.
Save abelsonlive/b0cec3b89f514884c716 to your computer and use it in GitHub Desktop.
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