Python problem with wsdl2py

User 74d30c678b

18-08-2009 08:46:08

Dear support,


This is the setup: python2.4, ZIS2.1, Webservices 5.2.04
Using wsdl2py I could sucessfully generate the Python files for ChemicalTermsWS and StandardizerWS. I tested the example ChemTermsScript.py and it works fine.


However, when I use wsdl2py.py to convert the MolConvertWS service, I get this error message:


wsdl2py --complexType "http://xxx:xxx/axis2/services/MolConvertWS?wsdl"  
Traceback (most recent call last):
  File "xxx/python/bin/wsdl2py", line 7, in ?
    sys.exit(
  File "xxx/python/lib/python2.4/commands.py", line 147, in wsdl2py
  File "xxx/python/lib/python2.4/commands.py", line 240, in _wsdl2py
  File "build/bdist.linux-i686/egg/ZSI/generate/wsdl2python.py", line 232, in writeTypes
  File "build/bdist.linux-i686/egg/ZSI/generate/wsdl2python.py", line 417, in fromSchema
  File "build/bdist.linux-i686/egg/ZSI/generate/wsdl2python.py", line 544, in fromSchemaItem
  File "build/bdist.linux-i686/egg/ZSI/generate/containers.py", line 2397, in setUp
ZSI.generate.containers.ContainerError: (u'Failure in setUp: <schema targetNamespace="http://io.java/xsd"><complexType name="IOException">', u'Unsupported base((u\'http://webservice.jchem.chemaxon\', u\'Exception\')): <schema targetNamespace="http://io.java/xsd"><complexType name="IOException"><complexContent><extension>')

Any help is appreciated, since the MolConvertWS service is what I am actually interested in.


Thanks and best regards,


Daniel

User c1ce6b3d19

18-08-2009 10:26:40

Daniel,


Thanks for your interest and questions regarding JChem Web Services.


 


The problem was related to the Java exception types, which have been replaced with the simple Exception type.  This new server change has been tested and is working here.


I have also created a new Python script to work with the MolConvert Web Service, attached below.


 


These changes are scheduled to be included in a hotfix release (5.2.4.1) next week.

User c1ce6b3d19

18-08-2009 14:09:44

Daniel,


To aid in your web services evaluation, I also uploaded a quick fix of our server code (~20MB)  to the website at:


http://www.chemaxon.com/shared/jlee/stoffler/JChemWebServices.aar


(This has since been removed, please download the latest version of JChemWebServices)


Place this .aar file in the following directory and restart the server:


<JChemWebServices5.2.4 directory>\tomcat\webapps\axis2\WEB-INF\services


 


We appreciate your questions and comments.


Jonathan Lee


 


 


 

User c1ce6b3d19

24-08-2009 13:21:19

The changes will be included in the 5.2.5 release and can be downloaded from the link in the previous post until the 5.2.5 release. 


At the present time, the proposed 5.2.4.1 hotfix release has been cancelled.

User bf27213fcf

18-09-2009 15:25:45

Hi,


I'm trying to use the MolConvert wsdl as well.  When I enter:


C:\Python26\Scripts\wsdl2py --complexType http://localhost:8180/axis2/services/MolConvertWS?wsdl


I get a similar error as Daniel, but I'm using a version of web services downloaded just this past Monday.  The error message is below.


Traceback (most recent call last):
  File "C:\Python26\Scripts\wsdl2py-script.py", line 8, in <module>
    load_entry_point('ZSI==2.1-a1', 'console_scripts', 'wsdl2py')()
  File "build\bdist.win32\egg\ZSI\generate\commands.py", line 147, in wsdl2py

  File "build\bdist.win32\egg\ZSI\generate\commands.py", line 240, in _wsdl2py

  File "build\bdist.win32\egg\ZSI\generate\wsdl2python.py", line 232, in writeTypes
  File "build\bdist.win32\egg\ZSI\generate\wsdl2python.py", line 417, in fromSchema
  File "build\bdist.win32\egg\ZSI\generate\wsdl2python.py", line 544, in fromSchemaItem
  File "build\bdist.win32\egg\ZSI\generate\containers.py", line 2398, in setUp
ZSI.generate.containers.ContainerError: (u'Failure in setUp: <schema targetNamespace="http://io.java/xsd"><complexType name="IOException">', u'Unsupported base((u\'http://webservice.jchem.chemaxon\', u\'Exception\')): <schema targetNamespace="http://io.java/xsd"><complexType name="IOException"><comp
lexContent><extension>')


Am I doing something wrong?



Thanks


Ben

User c1ce6b3d19

21-09-2009 15:19:21

Ben,


The new 5.2.5 version of JChem Web Services was recently released on September 18th and includes the fix for this problem.


The above issue was not working in the 5.2.4 version.  Please download the new version and try again.


 


Jonathan Lee