473,406 Members | 2,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

problem with google api / xml

hello,

i installed SOAPpy 0.12.0 and pyXML 0.8.4 in order to try out the
google-search example in diveintopython
http://diveintopython.org/soap_web_services/index.html
however, i'v been trying and trying and won't get it to work :-(
whenever i run this code, i get the attached exception...

from SOAPpy import WSDL
WSDLFILE = '/pathtomy/googleapi/GoogleSearch.wsdl'
APIKEY = '....'
_server = WSDL.Proxy(WSDLFILE)

any help would be very much appreciated!
thanks in advance,
robin

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/SOAPpy/WSDL.py",
line 67, in __init__
self.wsdl = reader.loadFromString(str(wsdlsource))
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/SOAPpy/wstools/WSDLTools.py",
line 47, in loadFromString
return self.loadFromStream(StringIO(data))
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/SOAPpy/wstools/WSDLTools.py",
line 28, in loadFromStream
document = DOM.loadDocument(stream)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/SOAPpy/wstools/Utility.py",
line 602, in loadDocument
return xml.dom.minidom.parse(data)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/_xmlplus/dom/minidom.py",
line 1915, in parse
return expatbuilder.parse(file)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/_xmlplus/dom/expatbuilder.py",
line 930, in parse
result = builder.parseFile(file)
File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/_xmlplus/dom/expatbuilder.py",
line 207, in parseFile
parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1,
column 0

May 31 '06 #1
3 2007

robin wrote:
from SOAPpy import WSDL
WSDLFILE = '/pathtomy/googleapi/GoogleSearch.wsdl'
APIKEY = '....'
_server = WSDL.Proxy(WSDLFILE)


Robin, note this part of the URI set in WSDLFILE:
'/pathtomy/googleapi'. Get it? 'path to my google api'. You must set
this part to the actual path where the file 'GoogleSearch.wsdl' is
found. In addition, doesn't APIKEY = '....' look a bit odd to you?
Hmm, what could this mean. APIKEY. Perhaps you need to get an API key
from Google in order to use their search API, and fill it in there?

;-)

May 31 '06 #2
hi kent,

thanks for your reply. in fact it was me who put "pathtomy" into the
path and exchanged my apikey with "...."
i prefer not everyone to know the name of my directories and even less
my apikey. so the problem isn't there :-(
hope to find some other solution....
thanks!!

robin
Mike Kent wrote:
robin wrote:
from SOAPpy import WSDL
WSDLFILE = '/pathtomy/googleapi/GoogleSearch.wsdl'
APIKEY = '....'
_server = WSDL.Proxy(WSDLFILE)


Robin, note this part of the URI set in WSDLFILE:
'/pathtomy/googleapi'. Get it? 'path to my google api'. You must set
this part to the actual path where the file 'GoogleSearch.wsdl' is
found. In addition, doesn't APIKEY = '....' look a bit odd to you?
Hmm, what could this mean. APIKEY. Perhaps you need to get an API key
from Google in order to use their search API, and fill it in there?

;-)


May 31 '06 #3
"robin" <ro*********@gmail.com> wrote:
hello,

i installed SOAPpy 0.12.0 and pyXML 0.8.4 in order to try out the
google-search example in diveintopython
http://diveintopython.org/soap_web_services/index.html
however, i'v been trying and trying and won't get it to work :-(
whenever i run this code, i get the attached exception...

from SOAPpy import WSDL
WSDLFILE = '/pathtomy/googleapi/GoogleSearch.wsdl'
[...]
ackages/_xmlplus/dom/expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1,
column 0


Did you check your GoogleSearch.wsdl file? From the error I guess that
something is wrong with the file itself. I Recommend to check it, or
download it again:

http://api.google.com/GoogleSearch.wsdl

No experience with SOAPpy, but with SOAP::Lite (Perl), I can give the uri
to that file (OTOH, hosting it localy might be faster).

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
May 31 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

248
by: Generic Usenet Account | last post by:
As per Google's Usenet archives http://groups.google.com/googlegroups/archive_announce_20.html], the first discussion of the Y2K problem on the Usenet was on January 18 1985...
1
by: George | last post by:
Hi. I've deployed a web application on a desktop computer running W2K and IIS. I'm using the desktop as a server. When I try to access the site, either from my development computer or if I...
5
by: Tim_Mac | last post by:
hi, i read that by adding the following code to by aspx pages, it would not store temporary internet files: Response.Cache.SetCacheability(HttpCacheability.NoCache); it didn't actually work...
5
by: George | last post by:
VB.net 2003 standard, XP windows home edition. Installed first application OK today. When I removed the application via Control Panel, there were no problems and the app folders were deleted. ...
13
by: Giggle Girl | last post by:
Hi there, I am having a problem with the behavior of Firefox, where lefthand column content is not resized properly after it is "collapsed" and then "re-expanded". An online demo is available...
43
by: balakrishnan.dinesh | last post by:
Hi all, Im working in javascript, I want to use Ajax in javcascript, Can u tel me how to use ajax in javascript, whether i have to include any code as like to include *css or *.js file, what are...
1
by: Rebecca Tsukalas | last post by:
Hello, I have a problem concerning removeChild. This is the XML structure I use with php: <xml_thing <language1 <site>bla1</site <site>bla2</site <site>bla3</site </language1
31
by: Sam of California | last post by:
Is it accurate to say that "the preprocessor is just a pass in the parsing of the source file"? I responded to that comment by saying that the preprocessor is not just a pass. It processes...
10
by: Steve | last post by:
Just a warning to the group. The Google Toolbar causes Firebug to issue lots of "Too much recursion" errors in the toolbar.js and eventual causes my Firefox browser to stop responding when using...
2
by: swethak | last post by:
Hi, I am getting the problem the problem with google map in Internet Explorer. This map worked fine in mozilla . When i opened the same map in Internet Explorer i am getting the error...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.