[XML-SIG] Possible SOAP/ZSI bug?

Laszlo Zsolt Nagy gandalf at designaproduct.biz
Tue Dec 6 03:58:10 CET 2005


Olivier Collioud wrote:

>I don't want to go in the detail but for interopability between all
>platform you need this kind of WS:
>Style=document
>Use=literal
>  
>
I'm trying to create python source code for a wsdl.
According to the ZSI documentation, there is a 'wsdl2py' program that 
can create python interfaces for a given wsdl.
But there is no such program in the distribution.

http://pywebsvcs.sourceforge.net/zsi.html#SECTION0012300000000000000000

For this reason, I tried to use the WriteServiceModule function:

import ZSI
import ZSI.wsdl2python
from ZSI.wstools import WSDLTools

fname =  'eBaySvc.wsdl'
reader = WSDLTools.WSDLReader()
wsdl = reader.loadFromFile(fname)
print wsdl
wsm = ZSI.wsdl2python.WriteServiceModule(wsdl)
wsm.write()

Result:

C:/Python24/pythonw.exe -u  
"T:/Python/Projects/eBay-SOAP/create_interfaces.py"
<ZSI.wstools.WSDLTools.WSDL instance at 0x00A2A738>
Traceback (most recent call last):
  File "T:/Python/Projects/eBay-SOAP/create_interfaces.py", line 28, in ?
    wsm.write()
  File "C:\Python24\Lib\site-packages\ZSI\wsdl2python.py", line 213, in 
write
    esuffix=esuffix)
  File "C:\Python24\Lib\site-packages\ZSI\wsdl2python.py", line 264, in 
write_service_types
    esuffix=esuffix)
  File "C:\Python24\Lib\site-packages\ZSI\wsdl2python.py", line 367, in 
write_dependent_schema
    sd.fromWsdl(schema, alternateWriter)
  File "C:\Python24\Lib\site-packages\ZSI\wsdl2python.py", line 1092, in 
fromWsdl
    self.generate(schema.getTypesDict(), alternateWriter)
  File "C:\Python24\Lib\site-packages\ZSI\wsdl2python.py", line 1121, in 
generate
    tw.fromType(tp, ref)
  File "C:\Python24\Lib\site-packages\ZSI\wsdl2python.py", line 1241, in 
fromType
    self._fromComplexType(tp)
  File "C:\Python24\Lib\site-packages\ZSI\wsdl2python.py", line 1459, in 
_fromComplexType
    typecodelist += self._complexTypeAllOrSequence(tp, mg)
  File "C:\Python24\Lib\site-packages\ZSI\wsdl2python.py", line 1672, in 
_complexTypeAllOrSequence
    if e.getType():
  File "C:\Python24\Lib\site-packages\ZSI\wsdlInterface.py", line 1800, 
in getType
    typ = self._dec.getTypeDefinition('type')
  File "C:\Python24\Lib\site-packages\ZSI\wstools\XMLSchema.py", line 
1926, in getTypeDefinition
    raise Warning, 'invalid operation for <%s>' %self.tag
Warning: invalid operation for <any>

It is only a warning but it terminates the operation. What am I doing wrong?
Sorry for the bunch of questions. This is the first time I use SOAP.

   Laszlo



More information about the XML-SIG mailing list