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: - from SOAPpy import WSDL
-
-
url = 'GoogleSearch.wsdl' # from http://api.google.com/GoogleSearch.wsdl
-
-
# just use the path to the wsdl of your choice
-
wsdlObject = WSDL.Proxy(url + '?WSDL')
-
-
print 'Available methods:'
-
for method in wsdlObject.methods.keys() :
-
print method
-
ci = wsdlObject.methods[method]
-
# you can also use ci.inparams
-
for param in ci.outparams :
-
# list of the function and type
-
# depending of the wsdl...
-
print param.name.ljust(20) , param.type
-
print
-
output at command prompt / terminal: - Traceback (most recent call last):
-
File "C:\jostein\matlab_med_webservice\soappyTest.py", line 6, in <module>
-
wsdlObject = WSDL.Proxy(url + '?WSDL')
-
File "C:\Python25\lib\site-packages\soappy-0.11.6.0001-py2.5-win32.egg\SOAPpy\WSDL.py", line 67, in __init__
-
self.wsdl = reader.loadFromString(str(wsdlsource))
-
File "C:\Python25\lib\site-packages\soappy-0.11.6.0001-py2.5-win32.egg\SOAPpy\wstools\WSDLTools.py", line 47, in loadFromString
-
return self.loadFromStream(StringIO(data))
-
File "C:\Python25\lib\site-packages\soappy-0.11.6.0001-py2.5-win32.egg\SOAPpy\wstools\WSDLTools.py", line 28, in loadFromStream
-
document = DOM.loadDocument(stream)
-
File "C:\Python25\lib\site-packages\soappy-0.11.6.0001-py2.5-win32.egg\SOAPpy\wstools\Utility.py", line 572, in loadDocument
-
return xml.dom.minidom.parse(data)
-
File "C:\Python25\lib\site-packages\pyxml-0.8.4.0002-py2.5-win32.egg\_xmlplus\dom\minidom.py", line 1915, in parse
-
return expatbuilder.parse(file)
-
File "C:\Python25\lib\site-packages\pyxml-0.8.4.0002-py2.5-win32.egg\_xmlplus\dom\expatbuilder.py", line 930, in parse
-
result = builder.parseFile(file)
-
File "C:\Python25\lib\site-packages\pyxml-0.8.4.0002-py2.5-win32.egg\_xmlplus\dom\expatbuilder.py", line 207, in parseFile
-
parser.Parse(buffer, 0)
-
xml.parsers.expat.ExpatError: syntax error: line 1, column 0
Thanks in advance for any help!
0 1966 Sign in to post your reply or Sign up for a free account.
Similar topics |
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...
|
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
|
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...
|
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
|
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
| |
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
|
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
|
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
|
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...
|
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",
|
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...
| |
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,...
|
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...
|
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
|
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...
| |