[thelist] Python Web Services

Tarrant Costelloe taz at madfolk.com
Sat Oct 25 17:52:51 CDT 2003

Has anyone on the list managed to successfully execute a ActivePython
Web Service? More specifically the Weather Service available here:

I have installed both pyxml and WebService without any error messages
returned however when I run the following code:

------ START CODE ------ 

import WebService

AirportWeather =
eather/AirportWeather.wsdl", "0f87dd612e9052d5730476ec531f4830")
print AirportWeather.getTemperature("KLAX") # Los Angeles

------ END CODE ------ 

I get the following errors returned:

------ START CODE ------ 

Traceback (most recent call last):
  File "D:\Program Files\ActiveState Komodo 2.5\callkomodo\kdb.py", line
433, in _do_start
    self.kdb.run(code_ob, locals, locals)
  File "D:\Python22\lib\bdb.py", line 349, in run
    exec cmd in globals, locals
  File "D:\Python22\weather.py", line 4, in ?
    print AirportWeather.getTemperature("KLAX") # Los Angeles
  File "D:\Python22\Lib\site-packages\soapy\soap.py", line 225, in
    responseobj = parseFromString(responsetext)
  File "D:\Python22\Lib\site-packages\soapy\soap.py", line 50, in
    return reader.fromString(string)
line 63, in fromString
    return self.fromStream(stream, ownerDoc)
"D:\Python22\Lib\site-packages\_xmlplus\dom\ext\reader\PyExpat.py", line
65, in fromStream
    success = self.parser.ParseFile(stream)
ExpatError: syntax error: line 1, column 49

------ END CODE ------ 

Any help on this would be appreciated.

Tarrant Costelloe
Technical Director
madfolk.com (.co.uk) - Reforming Media 
(+44) 01903 523414.

More information about the thelist mailing list