Created
April 12, 2016 09:21
-
-
Save wangyiyang/1e3e7ef8a307e29ae9e5f4f9d7bb8b20 to your computer and use it in GitHub Desktop.
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
# webservice.py | |
from suds import WebFault | |
from suds.client import Client | |
import logging | |
logging.basicConfig(level=logging.INFO) | |
logging.getLogger('suds.transport').setLevel(logging.DEBUG) | |
# url="http://ipatest.shenzhenair.com/sasis/services/PassengerInfoService?wsdl" | |
url = 'http://ipatest.shenzhenair.com/sasis/services/FlightStatusInfoService?wsdl' | |
client = Client(url) | |
para = '<?xml version="1.0" encoding="UTF-8"?><flight><orgCode>SZX</orgCode><destCode>PEK</destCode><fltNum>ZH9801</fltNum><fltDate>2016-03-26</fltDate></flight>' | |
print(para) | |
print (client) | |
print("*"*80) | |
# result = client.service.getFltStatusInfoXML(para) | |
print("-----------result----------------") | |
# print(result) | |
print(client.service.getFltStatusInfoXML(para)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment