[thelist] Python Web Scripting

Tarrant Costelloe taz at madfolk.com
Sun Oct 26 05:05:35 CST 2003


That's great thanks! And although I didn't ask for online book URLS (as
I have a couple and I also have four paper back books) the resource you
posted to help me does not cover web-services, which is what I asked for
help on.

So can I put my original question to the list again please, included for
reference below.

Has anyone on the list managed to successfully execute a ActivePython
Web Service? More specifically the Weather Service available here:
http://aspn.activestate.com/ASPN/WebServices/SWSAPI/pytut

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

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

import WebService

AirportWeather =
WebService.ServiceProxy("http://www.capescience.com/webservices/airportw
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
__call__
    responseobj = parseFromString(responsetext)
  File "D:\Python22\Lib\site-packages\soapy\soap.py", line 50, in
parseFromString
    return reader.fromString(string)
  File
"D:\Python22\Lib\site-packages\_xmlplus\dom\ext\reader\__init__.py",
line 63, in fromString
    return self.fromStream(stream, ownerDoc)
  File
"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.

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Damien COLA
Sent: 26 October 2003 01:33
To: jalam at cc.ysu.edu; thelist at lists.evolt.org
Subject: RE: [thelist] Python Web Scripting


url is http://diveintopython.org

also on codepedia you can find and add information :
http://codepedia.com/1/Python

-----Original Message-----
Here is a free book on Python

http://diveintopyton.org

-- 
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 





More information about the thelist mailing list