473,387 Members | 1,497 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,387 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 1953

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 SOAP Toolkit 3.0, so I'm guessig they are running...
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 I've been able to find on the net is...
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. This is probably a sockets-level issue, but I was...
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 i immediately found it very well-implemented,...
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 information out of the __init__ parameter. ...
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 asking for an "ArrayOfString" type. Here is my...
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? Locations for the downloads? Thanks! Steve
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 generates the error var = SOAPpy.structType()...
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 currently using SOAPpy, but would be willing to...
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 setup.py build Traceback (most recent call last):...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.