472,333 Members | 2,307 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

SOAPPy helloworld-ish problem

2
Hello

I'm trying to make a web service client in python, and so to start out, I found this simple example that are supposed to parse an wsdl file using SOAPPy. I'm using Windows and got SOAPPy installed using the Enthought Python Distribution. I've tried several wsdl files and commenting out parts of the code etc. but I just can't twist my head around what's the problem here. Any help would be greatly appreciated.

soappyTest.py:
Expand|Select|Wrap|Line Numbers
  1. from SOAPpy import WSDL
  2.  
  3. url = 'GoogleSearch.wsdl' # from http://api.google.com/GoogleSearch.wsdl
  4.  
  5. # just use the path to the wsdl of your choice
  6. wsdlObject = WSDL.Proxy(url + '?WSDL')
  7.  
  8. print 'Available methods:'
  9. for method in wsdlObject.methods.keys() :
  10.   print method
  11.   ci = wsdlObject.methods[method]
  12.   # you can also use ci.inparams
  13.   for param in ci.outparams :
  14.     # list of the function and type 
  15.     # depending of the wsdl...
  16.     print param.name.ljust(20) , param.type
  17.   print
  18.  
output at command prompt / terminal:
Expand|Select|Wrap|Line Numbers
  1. Traceback (most recent call last):
  2.   File "C:\jostein\matlab_med_webservice\soappyTest.py", line 6, in <module>
  3.     wsdlObject = WSDL.Proxy(url + '?WSDL')
  4.   File "C:\Python25\lib\site-packages\soappy-0.11.6.0001-py2.5-win32.egg\SOAPpy\WSDL.py", line 67, in __init__
  5.     self.wsdl = reader.loadFromString(str(wsdlsource))
  6.   File "C:\Python25\lib\site-packages\soappy-0.11.6.0001-py2.5-win32.egg\SOAPpy\wstools\WSDLTools.py", line 47, in loadFromString
  7.     return self.loadFromStream(StringIO(data))
  8.   File "C:\Python25\lib\site-packages\soappy-0.11.6.0001-py2.5-win32.egg\SOAPpy\wstools\WSDLTools.py", line 28, in loadFromStream
  9.     document = DOM.loadDocument(stream)
  10.   File "C:\Python25\lib\site-packages\soappy-0.11.6.0001-py2.5-win32.egg\SOAPpy\wstools\Utility.py", line 572, in loadDocument
  11.     return xml.dom.minidom.parse(data)
  12.   File "C:\Python25\lib\site-packages\pyxml-0.8.4.0002-py2.5-win32.egg\_xmlplus\dom\minidom.py", line 1915, in parse
  13.     return expatbuilder.parse(file)
  14.   File "C:\Python25\lib\site-packages\pyxml-0.8.4.0002-py2.5-win32.egg\_xmlplus\dom\expatbuilder.py", line 930, in parse
  15.     result = builder.parseFile(file)
  16.   File "C:\Python25\lib\site-packages\pyxml-0.8.4.0002-py2.5-win32.egg\_xmlplus\dom\expatbuilder.py", line 207, in parseFile
  17.     parser.Parse(buffer, 0)
  18. xml.parsers.expat.ExpatError: syntax error: line 1, column 0
Thanks in advance for any help!
Jun 30 '08 #1
0 1877

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Doug Farrell | last post by:
Hi everyone, I'm trying to build a program to interface to a SOAP/XML interface provided by one of our vendors. This interface is built with MS...
0
by: Vivek | last post by:
Hi, Can anyone provide me with sample code that will allow me to use SOAPpy with a WSDL file using HTTP basic authentication? The only thing...
0
by: Harry George | last post by:
I'm trying to setup a SOAPpy service under xinetd. Has someone done this sort of thing? Didn't find it from google searches or documentation. ...
1
by: m.banaouas | last post by:
Hello Pythoneers: I would like to ask you a simple question: Are you satisfied by SOAPpy module? Actually, I use this module since a year and...
0
by: Steve | last post by:
Hi All, I have a Python script that uses SOAPpy and I'm outputting all of the methods and info about the parameters... I'm having trouble getting...
1
by: icius | last post by:
Hello all, I am trying to use a web services API with Python and SOAPpy as a client. Some of the method paramters in this web service's WSDL are...
4
by: Steve | last post by:
Hi All, What are the required version of the SOAPpy, PyXML, fpconst that are needed to run under the Python 2.5 environment on Windows? ...
0
by: linuxprog | last post by:
hi all i'm building a webservice client with soappy when i send some informations it's returns an error here is the informations that...
0
by: Alex Ezell | last post by:
Can anyone offer any assistance as to how to convert a basic python dictionary, list, or even tuple into the SOAP type "ArrayOfKeyValue"? I am...
1
by: neridaj | last post by:
Hello, I'm going through the SOAP Web Services portion of Mark Pilgrim's tutorial and I'm getting this error when trying to build: python...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...

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.