472,378 Members | 1,229 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,378 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 1084

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
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...
0
by: F22F35 | last post by:
I am a newbie to Access (most programming for that matter). I need help in creating an Access database that keeps the history of each user in a database. For example, a user might have lesson 1 sent...

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.