Created
December 9, 2014 19:27
-
-
Save abelsonlive/b0cec3b89f514884c716 to your computer and use it in GitHub Desktop.
connect to https://cgmix.uscg.mil/xml/PSIXData.asmx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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