hi, all:

ask for help.

first of all, i will admire i am a novice to soap.
using some helps from documents and blog, i set up some server-client
successfully, while some are failed.

when use a remote webservice as follow, it failed, please someone can give
a help...

>>> from SOAPpy import WSDL
>>> url = "
http://211.137.45.104:9006/LnXxtCpInterface/services/LNXxtSyncService?wsdl";
>>> server = WSDL.Proxy(url)
/usr/lib/pymodules/python2.6/SOAPpy/wstools/XMLSchema.py:2871:
DeprecationWarning: object.__init__() takes no parameters
  tuple.__init__(self, args)
>>> server = WSDL.Proxy(url)
>>> server.methods.keys()
[u'sendMo', u'syncResponseRpt', u'sendMt', u'syncStaff', u'syncCorp']
>>> server.methods['sendMt']
<SOAPpy.wstools.WSDLTools.SOAPCallInfo instance at 0xeb9ab8>
>>> server.methods['sendMt'].inparams
[<SOAPpy.wstools.WSDLTools.ParameterInfo instance at 0xeb9b00>]
>>> server.methods['sendMt'].inparams[0].type
(u'service.global.v1_0.wsdl.protocol.xxt', u'ArrayOf_soapenc_string')
>>> server.methods['sendMt'].inparams[0].name
u'mtInfo'
>>> server.methods['sendMt'].outparams[0].name
u'sendMtReturn'
>>> server.methods['sendMt'].outparams[0].type
(u'http://schemas.xmlsoap.org/soap/encoding/', u'string')
>>> server.sendMt(['a','b'])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/pymodules/python2.6/SOAPpy/Client.py", line 470, in
__call__
  return self.__r_call(*args, **kw)
  File "/usr/lib/pymodules/python2.6/SOAPpy/Client.py", line 492, in
__r_call
  self.__hd, self.__ma)
  File "/usr/lib/pymodules/python2.6/SOAPpy/Client.py", line 406, in __call
  raise p
SOAPpy.Types.faultType: <Fault soapenv:Server.generalException: :
<SOAPpy.Types.structType detail at 13700416>: {'fault':
<SOAPpy.Types.structType multiRef at 13700272>: {'text': 'SoapHeader is
null', 'messageId': 'SEV_0003'}, 'exceptionName':
'xxt.protocol.obj.v1_0.common.ServiceException', 'hostname': 'ln_xxt_mh01'}>

#NOTE:
1: the url "
http://211.137.45.104:9006/LnXxtCpInterface/services/LNXxtSyncService?wsdl";
is okay, you can have a test!
2: the inparams:
>>> server.methods['sendMt'].inparams[0].type
(u'service.global.v1_0.wsdl.protocol.xxt', u'ArrayOf_soapenc_string')

in java program language, it just means String[], ie, a array with items of
String.
in my view, in python , it can be replaced by ['a','b','c'] or
('a','b','c'), ie, a list or tuple
3: i am a chinese, and the first time to ask question in the maillist, so
point the unfits or mistakes casually.

-- jia xiaolei
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to