473,738 Members | 8,848 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ws dl'
APIKEY = '....'
_server = WSDL.Proxy(WSDL FILE)

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.framewor k/Versions/2.4/lib/python2.4/site-packages/SOAPpy/WSDL.py",
line 67, in __init__
self.wsdl = reader.loadFrom String(str(wsdl source))
File
"/Library/Frameworks/Python.framewor k/Versions/2.4/lib/python2.4/site-packages/SOAPpy/wstools/WSDLTools.py",
line 47, in loadFromString
return self.loadFromSt ream(StringIO(d ata))
File
"/Library/Frameworks/Python.framewor k/Versions/2.4/lib/python2.4/site-packages/SOAPpy/wstools/WSDLTools.py",
line 28, in loadFromStream
document = DOM.loadDocumen t(stream)
File
"/Library/Frameworks/Python.framewor k/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.framewor k/Versions/2.4/lib/python2.4/site-packages/_xmlplus/dom/minidom.py",
line 1915, in parse
return expatbuilder.pa rse(file)
File
"/Library/Frameworks/Python.framewor k/Versions/2.4/lib/python2.4/site-packages/_xmlplus/dom/expatbuilder.py ",
line 930, in parse
result = builder.parseFi le(file)
File
"/Library/Frameworks/Python.framewor k/Versions/2.4/lib/python2.4/site-packages/_xmlplus/dom/expatbuilder.py ",
line 207, in parseFile
parser.Parse(bu ffer, 0)
xml.parsers.exp at.ExpatError: not well-formed (invalid token): line 1,
column 0

May 31 '06 #1
3 2025

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


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.w sdl' 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.ws dl'
APIKEY = '....'
_server = WSDL.Proxy(WSDL FILE)


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.w sdl' 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*********@gm ail.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.ws dl'
[...]
ackages/_xmlplus/dom/expatbuilder.py ", line 207, in parseFile
parser.Parse(bu ffer, 0)
xml.parsers.exp at.ExpatError: not well-formed (invalid token): line 1,
column 0


Did you check your GoogleSearch.ws dl 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
10474
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 http://groups.google.com/groups?threadm=820%40reed.UUCP]. That is a good 15 years before the problem manifested. Even then, it turned out, we were scrambling for cover when the D-day was approaching. Although the Y2K scare turned out to be vastly overblown, we do...
1
1636
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 log in to a remote machine, the site works fine for me and I'm able to access the aspx pages with no problems. When others try to access the site, it asks them for there login ID, password and domain.
5
9149
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 that way, but i left it in anyway. little did i know it would cause a problem for a forced download routine i have. instead of downloading the .xls attachment, it tried to download the aspx file, and gave an error saying the file could not be...
5
2687
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. But when I installed the app from a CD-ROM (Release folder is in D:), when I remove the app in Control Panel these problems occur: Control Panel does not delete the application folders. When I try to delete them I get message "Cannot delete file:...
13
2875
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 here: http://s161149005.onlinehome.us/DEMOS/FF/RESIZE_PROB/main/frameset.asp It works fine in IE 6, but in Firefox, it is broken. Specifically, when the page/frameset first loads in either browser, it looks correct. But when you click the...
43
2171
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 all the benefit of it? Thank U
1
10736
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
2925
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 statements that the compiler does not process. The good people in the alt.comp.lang.learn.c-c++ newsgroup insist that the preprocessor is just one of many passes. The preprocessor processes a grammer unique to the preprocessor and only that grammer. ...
10
2099
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 the javascript window.open method. Removing the Google Toolbar fixes the problem.
2
3153
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 message as in alert box as " Internet Explorer cannot open the Internet site http://google.citycarrentals.com.au/viewalllocations.php . Operation aborted". It is working in Mozilla . Here i mentioned my code . I am facing this problem several...
0
8788
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6751
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.