473,387 Members | 1,545 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 - 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 GetWebServicesMethods(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 "\tUnexpected 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.getmembers(wsdlObject)

MethodCount = 1

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

ci = wsdlObject.methods[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.getmembers (param)

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

input_parameter_values = ''

for p in ci.getInParameters (): # save the parameters to a
string
input_parameter_values = '%s\t\t Name : %s\n' %
(input_parameter_values, p.name)
input_parameter_values = '%s\t\t Type : %s\n\n' %
(input_parameter_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.ParameterInfo instance at 0x00D4E198>>

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

__module__ = SOAPpy.wstools.WSDLTools
default = None
element_type = 0
name = getLastPromoOrSlottingDateReturn
namespace = None
type = (u'http://www.site.com/offerperf',
u'ArrayOfPerfPromoInfo')
Input Parameters :

Name : in0
Type : ArrayOf_xsd_int
Thanks!

Steve

Dec 6 '06 #1
0 1153

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

Similar topics

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...
0
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), ...
0
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:...
0
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...
0
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...
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...
0
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...
1
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...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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,...
0
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...

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.