SOAPpy and ArrayOfString
Edwin.Madari at VerizonWireless.com
Edwin.Madari at VerizonWireless.com
Thu Aug 14 21:02:19 EDT 2008
for someMethod(Field1 ArrayOf_xsd_string, other_parameters)
a call someMethod( ['str1', 'str2', 'str3'], other_parameters) *works for me* with SOAPpy 0.12.0. yes sir it does.
in PERL, let alone array types, even for simple types it was hard for me with all the '->', and '$' prefixing for objects and variables.
I use following snippet to check arguments, and return types from a wsdl for each method. If any on them is not a simple type, check the wsdl manually for details of the data type.
====================================================
import os, sys, glob
from SOAPpy import WSDL
def checkwsdl(file):
if os.path.isfile(file):
print 'wsdl:%s' % file
server = WSDL.Proxy(file)
for ct, k in enumerate(server.methods.keys()):
args =[]
rets = []
callInfo = server.methods[k]
for ct2, name in enumerate(callInfo.inparams):
args.append('%s %s' % (name.name.encode(), name.type[1].encode()))
for ct2, name in enumerate(callInfo.outparams):
rets.append('%s %s' % (name.name.encode(), name.type[1].encode()))
print '%s. %s(%s)\n\treturns(%s)' % ( ct+1, k.encode(),
',\n\t\t'.join(args), ',\n\t\t'.join(rets))
print
if __name__ == '__main__' :
args = sys.argv[1:]
for arg in args:
for file in glob.glob(arg):
checkwsdl(file)
====================================================
Even though a method may be asking for an array, server may be accepting only up to a certain number of elements in the array.
And check the data type for elements in the array.
of course I had to tweak a couple of SOAPpy modules to accept long data type, and work from behind a firewall.
hope that helps...
thanks Edwin
-----Original Message-----
From: python-list-bounces+edwin.madari=verizonwireless.com at python.org [mailto:python-list-bounces+edwin.madari=verizonwireless.com at python.org]On Behalf Of annu miya
Sent: Thursday, August 14, 2008 12:11 PM
To: python-list at python.org
Subject: SOAPpy and ArrayOfString
Hi,
In the article below you mention that you were succesful at doing this through perl. Would it be possible to send me the perl code?
http://mail.python.org/pipermail/python-list/2007-January/423311.html
Thank You
Regards
Sid
The information contained in this message and any attachment may be
proprietary, confidential, and privileged or subject to the work
product doctrine and thus protected from disclosure. If the reader
of this message is not the intended recipient, or an employee or
agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify me
immediately by replying to this message and deleting it and all
copies and backups thereof. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080814/f35dfa56/attachment-0001.html>
More information about the Python-list
mailing list