473,657 Members | 2,626 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SOAPPy helloworld-ish problem

2 New Member
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 1966

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

Similar topics

0
2421
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 a .NET server. I'm trying to build my program with Python as I've got to deploy on both Linux and Sun/Solaris platforms. I'm developing on RedHat Linux 8.0 using Python 2.2.1 and SOAPpy 0.10.2. My experimental program almost works, but it isn't...
0
2724
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 SOAPpy.URLopener. However, I am unclear what the relationship is between SOAPpy.URLopener and SOAPpy.WSDL is. Is it as straightforward as this? > from SOAPpy import WSDL
0
1872
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 hoping someone in python land had done this with SOAPpy before. The server works fine as simple SOAP server and client pair on localhost. But when I try to put it under xinetd, it fails. Using "xinetd -d" I can see it is failing due to address...
1
1956
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, corresponding to dynamic "meta-data" discovering nature of SOAP/WSDL. BUT i read sometimes threads saying that SOAPpy is "dead" and we should
0
1177
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. My code : from SOAPpy import WSDL
1
7688
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 code so far: #!/usr/bin/python from SOAPpy import WSDL
4
2088
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
1336
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() var._addItem("code", u"XysZjd") var._addItem("value", 1) when i send the var variable SOAPpy prints this
0
1101
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 change to ZSI or something else if it made this conversion easier. I have tried with the arrayType and structType methods in SOAPpy.Types, yet they don't seem to do what I need. I suspect there might not be just a single method call, so, I wrote...
1
4307
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): File "setup.py", line 8, in <module> from SOAPpy.version import __version__ File "/Users/username/Desktop/SOAPpy-0.12.0/SOAPpy/__init__.py",
0
8385
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8303
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
8602
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7316
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
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
5632
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
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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
1601
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.