473,574 Members | 3,176 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SOAPpy - Getting info about the __init__ method

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
def GetWebServicesM ethods(url):
# requires import :
#from SOAPpy import WSDL

# just use the path to the wsdl of your choice

full_url = url + '?WSDL'

try:

wsdlObject = WSDL.Proxy(full _url)

except Exception:
print "\n\nError in Getting WebServices Methods for : %s\n\n" %
full_url
print "\tUnexpect ed error : %s \n \t\t\t %s " %
(sys.exc_info()[0], sys.exc_info()[1])
print
return

print '\nAvailable Methods for : %s\n\n' % (url)

# print 'wsdlObject Raw : ', wsdlObject

# print inspect.getmemb ers(wsdlObject)

MethodCount = 1

for method in wsdlObject.meth ods.keys() :
print '\t %d) %s\n' % (MethodCount, method)

ci = wsdlObject.meth ods[method] # get the details of the current
method

for param in ci.outparams :
# list of the function and type depending of the wsdl...

AllParams = inspect.getmemb ers (param)

for SubParam in AllParams:
ParamName,Param Value = SubParam
# print '%15s = %s' % SubParam
if ParamName == '__init__':
print 'init_info = ', ParamValue
else:
print '%15s = %s' % (ParamName,Para mValue)

input_parameter _values = ''

for p in ci.getInParamet ers (): # save the parameters to a
string
input_parameter _values = '%s\t\t Name : %s\n' %
(input_paramete r_values, p.name)
input_parameter _values = '%s\t\t Type : %s\n\n' %
(input_paramete r_values, p.type[1])

if input_parameter _values: # print only when there are
parameters
print '\n\n\t\tInput Parameters : \n'
print input_parameter _values

print
print
MethodCount = MethodCount + 1
Output :
1) getDate

__doc__ = A ParameterInfo object captures parameter binding
information.

init_info = <bound method ParameterInfo._ _init__ of
<SOAPpy.wstools .WSDLTools.Para meterInfo instance at 0x00D4E198>>

*** How do I get the info out of the __init__ structure ???

__module__ = SOAPpy.wstools. WSDLTools
default = None
element_type = 0
name = getLastPromoOrS lottingDateRetu rn
namespace = None
type = (u'http://www.site.com/offerperf',
u'ArrayOfPerfPr omoInfo')
Input Parameters :

Name : in0
Type : ArrayOf_xsd_int
Thanks!

Steve

Dec 6 '06 #1
0 1173

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1871
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...
0
2297
by: Bartas | last post by:
Hi, I'am writting a simple SOAP client in python (2.4) using SOAPpy lib. I've met with this problem: when I want to send a list of complex type using some method from WebService(java,WAS), I'v got an exception:
0
1785
by: Sameer Deshpande | last post by:
Hi, I am using python SOAPpy module to call a web service. Call to web service gets executed successfully. I am facing a problem if the call to WS results into redirect. I get "HTTPError: <HTTPError 302 Moved Temporarily>" If I enable the debug info, I do get the new redirected url. How do I divert my WS request to new url?
0
1017
by: benboals | last post by:
Note: this is in reply to a message from August 2 which i found searching for help on my own problem. I couldn't seem to reply to it, but a friend suggested that simply using the same subject would put it in that thread. In case he's wrong, i quoted the previous comments . Odd-R. wrote: > I use the following piece of code to contact a...
0
381
by: Jonathan Morgan | last post by:
Hi, I'm just started playing around with Python to trigger a method in a web service. I've been using SOAPpy and it's incredibly badly documented so i'm not getting very far. What I need to do is create the following in my SOAP body: <n1:myMethod xmlns:n1="http://www.csapi.org/schema/etc..."> <n1:address...
1
7681
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
0
1965
by: pion | last post by:
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...
1
5980
by: Christof Winter | last post by:
I am trying to use a webservice with SOAPpy: import SOAPpy intact_wsdl = "http://www.ebi.ac.uk/intact/binary-search-ws/binarysearch?wsdl" intact_serv = SOAPpy.WSDL.Proxy(intact_wsdl) The resulting error message is posted below. If I understand it right, XMLSchema.py complains about the imported XSD namespace being the same as the...
1
4306
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
7842
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...
0
8110
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8273
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...
1
7862
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8138
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...
1
5658
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...
0
3775
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...
0
3794
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2277
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 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.