SOAP (Air Fare Checker) - Problems building Velocigen's getFare request
Cameron Laird
claird at starbase.neosoft.com
Mon Feb 18 17:16:31 EST 2002
In article <7316200b.0202052047.7584b71 at posting.google.com>,
noel <nce0485 at flashmail.com> wrote:
>I am having problems building the correct request for getFare for the
>following wsdl: http://services.xmltoday.com/vx_engine/wsdl.vep?flight.wsdl.
>
>I can see that I am (at least) receiving the getFareResponse by
>setting dumpSoapIn, but it tells me that I am missing all the
>parameters of the request. I am using SOAPpy097. The following was
>taken off the xmethods site (www.xmethods.com):
.
.
.
Here's a small sample program. I started with one Noel
was working on, and Cayce Ullman made a quick correction.
import SOAP
def getFare(data = None):
proxy = 'http://thor.velocigen.com:80/vx_engine/soap-trigger.pperl'
flights = SOAP.SOAPProxy(proxy)
flights.config.dumpSOAPIn = 1
flights.namespace = 'urn:vgx-flight'
flights.soapaction = 'urn:vgx-flight'
return flights.getFare(search = data)
if __name__ == '__main__':
depart_data = {'depart_airportcode': 'SFO',
'arrive_airportcode': 'LAX',
'depart_year': 2002,
'depart_month': 'Mar',
'depart_day': 22}
return_data = {'return_year': 2002,
'return_month': 'Mar',
'return_day': 26}
print getFare({'depart': depart_data, 'return': return_data})
As on Monday, 18 February 2002, the Fare Checker's telling me
United Airlines has a flight for which it charges $126.50.
--
Cameron Laird <Cameron at Lairds.com>
Business: http://www.Phaseit.net
Personal: http://starbase.neosoft.com/~claird/home.html
More information about the Python-list
mailing list