[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Fedora-suds-list] Fixed a Bug to make jython 2.5 work



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I tried to use suds with jython and ran into two small obstacles for which I would like to
provide a fix:

Versions:
  python-suds-0.3.6 package from https://fedorahosted.org/suds/
  jython 2.5.0 (Release_2_5_0:6476)
  OS: Linux, Ubuntu 8.04.3


1. Problem
==========
I tried installing with easy_install, but an error message occurred. It seemed though that
the package was correctly installed. This is the command sequence and output:


mkdir /tmp/python-site
export PYTHONPATH=/tmp/python-site/
easy_install -H None -f /tmp/ -d /tmp/python-site/ python-suds

- ------------------------------------------------
Creating /tmp/python-site/site.py
Searching for python-suds
Best match: python-suds 0.3.6
Processing python-suds-0.3.6.tar.gz
Running python-suds-0.3.6/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-Wip7VV/python-suds-0.3.6/egg-dist-tmp-tvd4ft
Unknown option: O
usage: jython [option] ... [-c cmd | -m mod | file | -] [arg] ...
Options and arguments:
- -c cmd   : program passed in as string (terminates option list)
- -Dprop=v : Set the property `prop' to value `v'
- -C codec : Use a different codec when reading from the console.
- -h       : print this help message and exit (also --help)
- -i       : inspect interactively after running script
           and force prompts, even if stdin does not appear to be a terminal
- -jar jar : program read from __run__.py in jar file
- -m mod   : run library module as a script (terminates option list)
- -Q arg   : division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew
- -S       : don't imply 'import site' on initialization
- -u       : unbuffered binary stdout and stderr
- -v       : verbose (trace import statements)
- -V       : print the Python version number and exit (also --version)
- -W arg   : warning control (arg is action:message:category:module:lineno)
file     : program read from script file
- -        : program read from stdin (default; interactive mode if a tty)
arg ...  : arguments passed to program in sys.argv[1:]
Other environment variables:
JYTHONPATH: ':'-separated list of directories prefixed to the default module
            search path.  The result is sys.path.
zip_safe flag not set; analyzing archive contents...
Unable to analyze compiled code on this platform.
Please ask the author to include a 'zip_safe' setting (either True or False) in the
package's setup.py
Adding suds 0.3.6 to easy-install.pth file

Installed /tmp/python-site/suds-0.3.6-py2.5.egg
Skipping dependencies for suds 0.3.6
- -----------------------------------------------

This error occurred, because jython doesn't recognize the -O option and also has no
similar one. To fix this, I removed the file setup.cfg with the only option optimize=1
from the distribution. That fixed the problem and I could install without messages.


2. Problem
==========
After the successful installation of suds instanciating the client threw an Exception that
complained about an unknown attribute in the module sudsobject.py (see below):
I found that the line 106 in sudsobject.py stating
code = code.co_consts[0]

could *not* be executed in jython but could be executed in cpython. I did not understand
the exact meaning of that line but after uncommenting it, suds ran as expected with
jython. I only have a limited amount of testcases, so maybe the commented line may cause
errors in other contexts.

I would kindly ask the maintainer to consider this fixes for commit, providing that there
is no better solution to make suds run with jython.
Thanks for that great piece of work.

Heinrich Wesseling

P.S. I attached the small test script and the wsdl file of the webservice.

- --------------------------------------------
Traceback (most recent call last):
  File "/home/hwesseli/insa/getJobLog.py", line 4, in <module>
    client = Client(url)
  File
"/home/hwesseli/workspace/cms-trunk/build/run/jython/Lib/site-packages/suds-0.3.6-py2.5.egg/suds/client.py",
line 106, in __init__
    self.wsdl = Definitions(url, options)
  File
"/home/hwesseli/workspace/cms-trunk/build/run/jython/Lib/site-packages/suds-0.3.6-py2.5.egg/suds/wsdl.py",
line 185, in __init__
    self.add_children(self.root)
  File
"/home/hwesseli/workspace/cms-trunk/build/run/jython/Lib/site-packages/suds-0.3.6-py2.5.egg/suds/wsdl.py",
line 211, in add_children
    child = Factory.create(c, self)
  File
"/home/hwesseli/workspace/cms-trunk/build/run/jython/Lib/site-packages/suds-0.3.6-py2.5.egg/suds/wsdl.py",
line 74, in create
    return fn(root, definitions)
  File
"/home/hwesseli/workspace/cms-trunk/build/run/jython/Lib/site-packages/suds-0.3.6-py2.5.egg/suds/wsdl.py",
line 56, in <lambda>
    'portType' : lambda x,y: PortType(x,y),
  File
"/home/hwesseli/workspace/cms-trunk/build/run/jython/Lib/site-packages/suds-0.3.6-py2.5.egg/suds/wsdl.py",
line 487, in __init__
    op = SFactory.object('Operation')
  File
"/home/hwesseli/workspace/cms-trunk/build/run/jython/Lib/site-packages/suds-0.3.6-py2.5.egg/suds/sudsobject.py",
line 115, in object
    subclass = cls.subclass(classname, Object)
  File
"/home/hwesseli/workspace/cms-trunk/build/run/jython/Lib/site-packages/suds-0.3.6-py2.5.egg/suds/sudsobject.py",
line 106, in subclass
    code = code.co_consts[0]
AttributeError: 'tablecode' object has no attribute 'co_consts'
- -------------------------------------------



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKTdds40jDdQmhJV8RAtMMAJ49sUxvBvefwVIjFjXJJxONdlHhhACgxai6
n9e9tMkN2HehXS/h+TMGCtk=
=n3Ac
-----END PGP SIGNATURE-----
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="InsaCmsService" targetNamespace="http://insa.ws.telco.psi.de/"; xmlns:tns="http://insa.ws.telco.psi.de/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:ns3="http://insa.ws.telco.psi.de/types"; xmlns:ns2="http://insa.ws.telco.psi.de/types/arrays/de/psi/telco/mccm/common/dto/external/ovllist"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns="http://schemas.xmlsoap.org/wsdl/";>
  <types>
    <schema targetNamespace="http://insa.ws.telco.psi.de/types/arrays/de/psi/telco/mccm/common/dto/external/ovllist"; xmlns="http://www.w3.org/2001/XMLSchema"; xmlns:ns2="http://insa.ws.telco.psi.de/types"; xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:tns="http://insa.ws.telco.psi.de/types/arrays/de/psi/telco/mccm/common/dto/external/ovllist"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
      <import namespace="http://insa.ws.telco.psi.de/types"/>
      <complexType name="OverlayEntryArray">
        <sequence>
          <element maxOccurs="unbounded" minOccurs="0" name="value" nillable="true" type="ns2:OverlayEntry"/></sequence></complexType></schema>
    <schema targetNamespace="http://insa.ws.telco.psi.de/types"; xmlns="http://www.w3.org/2001/XMLSchema"; xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:tns="http://insa.ws.telco.psi.de/types"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
      <import namespace="http://insa.ws.telco.psi.de/types/arrays/de/psi/telco/mccm/common/dto/external/ovllist"/>
      <complexType name="MccmInternalSystemException">
        <complexContent>
          <extension base="tns:MccmExternalException">
            <sequence>
              <element name="message" nillable="true" type="string"/></sequence></extension></complexContent></complexType>
      <complexType name="MccmExternalException">
        <sequence>
          <element name="errorCode" type="int"/></sequence></complexType>
      <complexType name="MccmAuthenticationException">
        <complexContent>
          <extension base="tns:MccmExternalException">
            <sequence>
              <element name="message" nillable="true" type="string"/></sequence></extension></complexContent></complexType>
      <complexType name="MccmAuthorisationException">
        <complexContent>
          <extension base="tns:MccmExternalException">
            <sequence/></extension></complexContent></complexType>
      <complexType name="MccmInvalidInputException">
        <complexContent>
          <extension base="tns:MccmExternalException">
            <sequence/></extension></complexContent></complexType>
      <complexType name="MccmNoSuchObjectException">
        <complexContent>
          <extension base="tns:MccmExternalException">
            <sequence/></extension></complexContent></complexType>
      <complexType name="MccmProcessException">
        <complexContent>
          <extension base="tns:MccmExternalException">
            <sequence>
              <element name="message" nillable="true" type="string"/></sequence></extension></complexContent></complexType>
      <complexType name="MccmTimeoutException">
        <complexContent>
          <extension base="tns:MccmExternalException">
            <sequence>
              <element name="message" nillable="true" type="string"/></sequence></extension></complexContent></complexType>
      <complexType name="MccmUnknownSessionException">
        <complexContent>
          <extension base="tns:MccmExternalException">
            <sequence>
              <element name="message" nillable="true" type="string"/></sequence></extension></complexContent></complexType>
      <complexType name="MccmWorkflowException">
        <complexContent>
          <extension base="tns:MccmExternalException">
            <sequence>
              <element name="message" nillable="true" type="string"/></sequence></extension></complexContent></complexType>
      <complexType name="MccmTargetOverlayException">
        <complexContent>
          <extension base="tns:MccmExternalException">
            <sequence/></extension></complexContent></complexType>
      <complexType name="JobLog">
        <sequence>
          <element name="description" nillable="true" type="string"/>
          <element name="id" nillable="true" type="string"/>
          <element maxOccurs="unbounded" minOccurs="0" name="logEntry" nillable="true" type="tns:LogEntry"/>
          <element name="state" nillable="true" type="string"/>
          <element name="user" nillable="true" type="string"/></sequence></complexType>
      <complexType name="LogEntry">
        <sequence>
          <element name="entryTextLine" nillable="true" type="string"/>
          <element name="severity" nillable="true" type="string"/>
          <element name="timestamp" nillable="true" type="string"/></sequence></complexType>
      <complexType name="OverlayEntry">
        <sequence>
          <element name="description" nillable="true" type="string"/>
          <element name="lastModified" nillable="true" type="string"/>
          <element name="name" nillable="true" type="string"/>
          <element name="overlayId" nillable="true" type="string"/>
          <element name="overlayType" nillable="true" type="string"/>
          <element name="owner" nillable="true" type="string"/></sequence></complexType>
      <element name="MccmInternalSystemException" type="tns:MccmInternalSystemException"/>
      <element name="MccmUnknownSessionException" type="tns:MccmUnknownSessionException"/>
      <element name="MccmWorkflowException" type="tns:MccmWorkflowException"/>
      <element name="MccmNoSuchObjectException" type="tns:MccmNoSuchObjectException"/>
      <element name="MccmInvalidInputException" type="tns:MccmInvalidInputException"/>
      <element name="MccmAuthorisationException" type="tns:MccmAuthorisationException"/>
      <element name="MccmProcessException" type="tns:MccmProcessException"/>
      <element name="MccmTimeoutException" type="tns:MccmTimeoutException"/>
      <element name="MccmAuthenticationException" type="tns:MccmAuthenticationException"/>
      <element name="MccmTargetOverlayException" type="tns:MccmTargetOverlayException"/></schema>
  </types>
  <message name="InsaCmsFacade_enhancedExportGet">
    <part name="String_1" type="xsd:string"/>
    <part name="int_2" type="xsd:int"/>
    <part name="String_3" type="xsd:string"/>
  </message>
  <message name="InsaCmsFacade_createOverlayGet">
    <part name="String_1" type="xsd:string"/>
  </message>
  <message name="MccmNoSuchObjectException">
    <part name="MccmNoSuchObjectException" element="ns3:MccmNoSuchObjectException"/>
  </message>
  <message name="InsaCmsFacade_enhancedExportInitResponse">
  </message>
  <message name="InsaCmsFacade_enhancedExportStartResponse">
    <part name="result" type="xsd:string"/>
  </message>
  <message name="MccmTimeoutException">
    <part name="MccmTimeoutException" element="ns3:MccmTimeoutException"/>
  </message>
  <message name="MccmProcessException">
    <part name="MccmProcessException" element="ns3:MccmProcessException"/>
  </message>
  <message name="InsaCmsFacade_enhancedExportWait">
    <part name="String_1" type="xsd:string"/>
    <part name="long_2" type="xsd:long"/>
  </message>
  <message name="InsaCmsFacade_getOverlayListResponse">
    <part name="result" type="ns2:OverlayEntryArray"/>
  </message>
  <message name="InsaCmsFacade_omTransferStart">
    <part name="String_1" type="xsd:string"/>
  </message>
  <message name="InsaCmsFacade_createOverlayGetResponse">
    <part name="result" type="xsd:string"/>
  </message>
  <message name="InsaCmsFacade_loginResponse">
    <part name="result" type="xsd:string"/>
  </message>
  <message name="InsaCmsFacade_createOverlayStartResponse">
    <part name="result" type="xsd:string"/>
  </message>
  <message name="InsaCmsFacade_createOverlayInit">
    <part name="String_1" type="xsd:string"/>
    <part name="String_2" type="xsd:string"/>
    <part name="String_3" type="xsd:string"/>
    <part name="String_4" type="xsd:string"/>
  </message>
  <message name="MccmInvalidInputException">
    <part name="MccmInvalidInputException" element="ns3:MccmInvalidInputException"/>
  </message>
  <message name="InsaCmsFacade_createOverlayWait">
    <part name="String_1" type="xsd:string"/>
    <part name="long_2" type="xsd:long"/>
  </message>
  <message name="MccmWorkflowException">
    <part name="MccmWorkflowException" element="ns3:MccmWorkflowException"/>
  </message>
  <message name="InsaCmsFacade_omTransferSend">
    <part name="String_1" type="xsd:string"/>
    <part name="String_2" type="xsd:string"/>
  </message>
  <message name="InsaCmsFacade_omTransferWaitResponse">
  </message>
  <message name="InsaCmsFacade_getJobLogResponse">
    <part name="result" type="ns3:JobLog"/>
  </message>
  <message name="InsaCmsFacade_enhancedExportWaitResponse">
  </message>
  <message name="InsaCmsFacade_logoutResponse">
  </message>
  <message name="InsaCmsFacade_logout">
    <part name="String_1" type="xsd:string"/>
  </message>
  <message name="InsaCmsFacade_enhancedExportInit">
    <part name="String_1" type="xsd:string"/>
    <part name="String_2" type="xsd:string"/>
    <part name="String_3" type="xsd:string"/>
    <part name="String_4" type="xsd:string"/>
  </message>
  <message name="InsaCmsFacade_getJobLog">
    <part name="String_1" type="xsd:string"/>
    <part name="String_2" type="xsd:string"/>
  </message>
  <message name="InsaCmsFacade_omTransferWait">
    <part name="String_1" type="xsd:string"/>
    <part name="long_2" type="xsd:long"/>
  </message>
  <message name="InsaCmsFacade_omTransferStartResponse">
    <part name="result" type="xsd:string"/>
  </message>
  <message name="InsaCmsFacade_login">
    <part name="String_1" type="xsd:string"/>
    <part name="String_2" type="xsd:string"/>
  </message>
  <message name="InsaCmsFacade_enhancedExportGetResponse">
    <part name="result" type="xsd:string"/>
  </message>
  <message name="MccmAuthenticationException">
    <part name="MccmAuthenticationException" element="ns3:MccmAuthenticationException"/>
  </message>
  <message name="InsaCmsFacade_omTransferSendResponse">
  </message>
  <message name="InsaCmsFacade_getOverlayList">
    <part name="String_1" type="xsd:string"/>
    <part name="String_2" type="xsd:string"/>
    <part name="String_3" type="xsd:string"/>
  </message>
  <message name="MccmUnknownSessionException">
    <part name="MccmUnknownSessionException" element="ns3:MccmUnknownSessionException"/>
  </message>
  <message name="InsaCmsFacade_createOverlayWaitResponse">
  </message>
  <message name="MccmTargetOverlayException">
    <part name="MccmTargetOverlayException" element="ns3:MccmTargetOverlayException"/>
  </message>
  <message name="InsaCmsFacade_createOverlayInitResponse">
  </message>
  <message name="InsaCmsFacade_createOverlayStart">
    <part name="String_1" type="xsd:string"/>
  </message>
  <message name="MccmAuthorisationException">
    <part name="MccmAuthorisationException" element="ns3:MccmAuthorisationException"/>
  </message>
  <message name="MccmInternalSystemException">
    <part name="MccmInternalSystemException" element="ns3:MccmInternalSystemException"/>
  </message>
  <message name="InsaCmsFacade_enhancedExportStart">
    <part name="String_1" type="xsd:string"/>
  </message>
  <message name="InsaCmsFacade_omTransferInit">
    <part name="String_1" type="xsd:string"/>
    <part name="String_2" type="xsd:string"/>
  </message>
  <message name="InsaCmsFacade_omTransferInitResponse">
  </message>
  <portType name="InsaCmsFacade">
    <operation name="createOverlayGet" parameterOrder="String_1">
      <input message="tns:InsaCmsFacade_createOverlayGet"/>
      <output message="tns:InsaCmsFacade_createOverlayGetResponse"/>
      <fault name="MccmWorkflowException" message="tns:MccmWorkflowException"/>
      <fault name="MccmUnknownSessionException" message="tns:MccmUnknownSessionException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
    </operation>
    <operation name="createOverlayInit" parameterOrder="String_1 String_2 String_3 String_4">
      <input message="tns:InsaCmsFacade_createOverlayInit"/>
      <output message="tns:InsaCmsFacade_createOverlayInitResponse"/>
      <fault name="MccmAuthorisationException" message="tns:MccmAuthorisationException"/>
      <fault name="MccmWorkflowException" message="tns:MccmWorkflowException"/>
      <fault name="MccmUnknownSessionException" message="tns:MccmUnknownSessionException"/>
      <fault name="MccmInvalidInputException" message="tns:MccmInvalidInputException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
      <fault name="MccmNoSuchObjectException" message="tns:MccmNoSuchObjectException"/>
    </operation>
    <operation name="createOverlayStart" parameterOrder="String_1">
      <input message="tns:InsaCmsFacade_createOverlayStart"/>
      <output message="tns:InsaCmsFacade_createOverlayStartResponse"/>
      <fault name="MccmWorkflowException" message="tns:MccmWorkflowException"/>
      <fault name="MccmUnknownSessionException" message="tns:MccmUnknownSessionException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
    </operation>
    <operation name="createOverlayWait" parameterOrder="String_1 long_2">
      <input message="tns:InsaCmsFacade_createOverlayWait"/>
      <output message="tns:InsaCmsFacade_createOverlayWaitResponse"/>
      <fault name="MccmWorkflowException" message="tns:MccmWorkflowException"/>
      <fault name="MccmUnknownSessionException" message="tns:MccmUnknownSessionException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
      <fault name="MccmProcessException" message="tns:MccmProcessException"/>
      <fault name="MccmTimeoutException" message="tns:MccmTimeoutException"/>
    </operation>
    <operation name="enhancedExportGet" parameterOrder="String_1 int_2 String_3">
      <input message="tns:InsaCmsFacade_enhancedExportGet"/>
      <output message="tns:InsaCmsFacade_enhancedExportGetResponse"/>
      <fault name="MccmWorkflowException" message="tns:MccmWorkflowException"/>
      <fault name="MccmUnknownSessionException" message="tns:MccmUnknownSessionException"/>
      <fault name="MccmInvalidInputException" message="tns:MccmInvalidInputException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
      <fault name="MccmNoSuchObjectException" message="tns:MccmNoSuchObjectException"/>
    </operation>
    <operation name="enhancedExportInit" parameterOrder="String_1 String_2 String_3 String_4">
      <input message="tns:InsaCmsFacade_enhancedExportInit"/>
      <output message="tns:InsaCmsFacade_enhancedExportInitResponse"/>
      <fault name="MccmAuthorisationException" message="tns:MccmAuthorisationException"/>
      <fault name="MccmWorkflowException" message="tns:MccmWorkflowException"/>
      <fault name="MccmUnknownSessionException" message="tns:MccmUnknownSessionException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
      <fault name="MccmNoSuchObjectException" message="tns:MccmNoSuchObjectException"/>
    </operation>
    <operation name="enhancedExportStart" parameterOrder="String_1">
      <input message="tns:InsaCmsFacade_enhancedExportStart"/>
      <output message="tns:InsaCmsFacade_enhancedExportStartResponse"/>
      <fault name="MccmWorkflowException" message="tns:MccmWorkflowException"/>
      <fault name="MccmUnknownSessionException" message="tns:MccmUnknownSessionException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
    </operation>
    <operation name="enhancedExportWait" parameterOrder="String_1 long_2">
      <input message="tns:InsaCmsFacade_enhancedExportWait"/>
      <output message="tns:InsaCmsFacade_enhancedExportWaitResponse"/>
      <fault name="MccmWorkflowException" message="tns:MccmWorkflowException"/>
      <fault name="MccmUnknownSessionException" message="tns:MccmUnknownSessionException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
      <fault name="MccmProcessException" message="tns:MccmProcessException"/>
      <fault name="MccmTimeoutException" message="tns:MccmTimeoutException"/>
    </operation>
    <operation name="getJobLog" parameterOrder="String_1 String_2">
      <input message="tns:InsaCmsFacade_getJobLog"/>
      <output message="tns:InsaCmsFacade_getJobLogResponse"/>
      <fault name="MccmAuthorisationException" message="tns:MccmAuthorisationException"/>
      <fault name="MccmWorkflowException" message="tns:MccmWorkflowException"/>
      <fault name="MccmUnknownSessionException" message="tns:MccmUnknownSessionException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
      <fault name="MccmNoSuchObjectException" message="tns:MccmNoSuchObjectException"/>
    </operation>
    <operation name="getOverlayList" parameterOrder="String_1 String_2 String_3">
      <input message="tns:InsaCmsFacade_getOverlayList"/>
      <output message="tns:InsaCmsFacade_getOverlayListResponse"/>
      <fault name="MccmWorkflowException" message="tns:MccmWorkflowException"/>
      <fault name="MccmUnknownSessionException" message="tns:MccmUnknownSessionException"/>
      <fault name="MccmInvalidInputException" message="tns:MccmInvalidInputException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
      <fault name="MccmNoSuchObjectException" message="tns:MccmNoSuchObjectException"/>
    </operation>
    <operation name="login" parameterOrder="String_1 String_2">
      <input message="tns:InsaCmsFacade_login"/>
      <output message="tns:InsaCmsFacade_loginResponse"/>
      <fault name="MccmAuthorisationException" message="tns:MccmAuthorisationException"/>
      <fault name="MccmAuthenticationException" message="tns:MccmAuthenticationException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
    </operation>
    <operation name="logout" parameterOrder="String_1">
      <input message="tns:InsaCmsFacade_logout"/>
      <output message="tns:InsaCmsFacade_logoutResponse"/>
      <fault name="MccmUnknownSessionException" message="tns:MccmUnknownSessionException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
    </operation>
    <operation name="omTransferInit" parameterOrder="String_1 String_2">
      <input message="tns:InsaCmsFacade_omTransferInit"/>
      <output message="tns:InsaCmsFacade_omTransferInitResponse"/>
      <fault name="MccmTargetOverlayException" message="tns:MccmTargetOverlayException"/>
      <fault name="MccmWorkflowException" message="tns:MccmWorkflowException"/>
      <fault name="MccmUnknownSessionException" message="tns:MccmUnknownSessionException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
      <fault name="MccmNoSuchObjectException" message="tns:MccmNoSuchObjectException"/>
    </operation>
    <operation name="omTransferSend" parameterOrder="String_1 String_2">
      <input message="tns:InsaCmsFacade_omTransferSend"/>
      <output message="tns:InsaCmsFacade_omTransferSendResponse"/>
      <fault name="MccmWorkflowException" message="tns:MccmWorkflowException"/>
      <fault name="MccmUnknownSessionException" message="tns:MccmUnknownSessionException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
    </operation>
    <operation name="omTransferStart" parameterOrder="String_1">
      <input message="tns:InsaCmsFacade_omTransferStart"/>
      <output message="tns:InsaCmsFacade_omTransferStartResponse"/>
      <fault name="MccmWorkflowException" message="tns:MccmWorkflowException"/>
      <fault name="MccmUnknownSessionException" message="tns:MccmUnknownSessionException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
    </operation>
    <operation name="omTransferWait" parameterOrder="String_1 long_2">
      <input message="tns:InsaCmsFacade_omTransferWait"/>
      <output message="tns:InsaCmsFacade_omTransferWaitResponse"/>
      <fault name="MccmWorkflowException" message="tns:MccmWorkflowException"/>
      <fault name="MccmUnknownSessionException" message="tns:MccmUnknownSessionException"/>
      <fault name="MccmInternalSystemException" message="tns:MccmInternalSystemException"/>
      <fault name="MccmProcessException" message="tns:MccmProcessException"/>
      <fault name="MccmTimeoutException" message="tns:MccmTimeoutException"/>
    </operation>
  </portType>
  <binding name="InsaCmsFacadeBinding" type="tns:InsaCmsFacade">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="createOverlayGet">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmWorkflowException">
        <soap:fault name="MccmWorkflowException" use="literal"/>
      </fault>
      <fault name="MccmUnknownSessionException">
        <soap:fault name="MccmUnknownSessionException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
    </operation>
    <operation name="createOverlayInit">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmAuthorisationException">
        <soap:fault name="MccmAuthorisationException" use="literal"/>
      </fault>
      <fault name="MccmWorkflowException">
        <soap:fault name="MccmWorkflowException" use="literal"/>
      </fault>
      <fault name="MccmUnknownSessionException">
        <soap:fault name="MccmUnknownSessionException" use="literal"/>
      </fault>
      <fault name="MccmInvalidInputException">
        <soap:fault name="MccmInvalidInputException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
      <fault name="MccmNoSuchObjectException">
        <soap:fault name="MccmNoSuchObjectException" use="literal"/>
      </fault>
    </operation>
    <operation name="createOverlayStart">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmWorkflowException">
        <soap:fault name="MccmWorkflowException" use="literal"/>
      </fault>
      <fault name="MccmUnknownSessionException">
        <soap:fault name="MccmUnknownSessionException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
    </operation>
    <operation name="createOverlayWait">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmWorkflowException">
        <soap:fault name="MccmWorkflowException" use="literal"/>
      </fault>
      <fault name="MccmUnknownSessionException">
        <soap:fault name="MccmUnknownSessionException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
      <fault name="MccmProcessException">
        <soap:fault name="MccmProcessException" use="literal"/>
      </fault>
      <fault name="MccmTimeoutException">
        <soap:fault name="MccmTimeoutException" use="literal"/>
      </fault>
    </operation>
    <operation name="enhancedExportGet">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmWorkflowException">
        <soap:fault name="MccmWorkflowException" use="literal"/>
      </fault>
      <fault name="MccmUnknownSessionException">
        <soap:fault name="MccmUnknownSessionException" use="literal"/>
      </fault>
      <fault name="MccmInvalidInputException">
        <soap:fault name="MccmInvalidInputException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
      <fault name="MccmNoSuchObjectException">
        <soap:fault name="MccmNoSuchObjectException" use="literal"/>
      </fault>
    </operation>
    <operation name="enhancedExportInit">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmAuthorisationException">
        <soap:fault name="MccmAuthorisationException" use="literal"/>
      </fault>
      <fault name="MccmWorkflowException">
        <soap:fault name="MccmWorkflowException" use="literal"/>
      </fault>
      <fault name="MccmUnknownSessionException">
        <soap:fault name="MccmUnknownSessionException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
      <fault name="MccmNoSuchObjectException">
        <soap:fault name="MccmNoSuchObjectException" use="literal"/>
      </fault>
    </operation>
    <operation name="enhancedExportStart">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmWorkflowException">
        <soap:fault name="MccmWorkflowException" use="literal"/>
      </fault>
      <fault name="MccmUnknownSessionException">
        <soap:fault name="MccmUnknownSessionException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
    </operation>
    <operation name="enhancedExportWait">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmWorkflowException">
        <soap:fault name="MccmWorkflowException" use="literal"/>
      </fault>
      <fault name="MccmUnknownSessionException">
        <soap:fault name="MccmUnknownSessionException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
      <fault name="MccmProcessException">
        <soap:fault name="MccmProcessException" use="literal"/>
      </fault>
      <fault name="MccmTimeoutException">
        <soap:fault name="MccmTimeoutException" use="literal"/>
      </fault>
    </operation>
    <operation name="getJobLog">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmAuthorisationException">
        <soap:fault name="MccmAuthorisationException" use="literal"/>
      </fault>
      <fault name="MccmWorkflowException">
        <soap:fault name="MccmWorkflowException" use="literal"/>
      </fault>
      <fault name="MccmUnknownSessionException">
        <soap:fault name="MccmUnknownSessionException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
      <fault name="MccmNoSuchObjectException">
        <soap:fault name="MccmNoSuchObjectException" use="literal"/>
      </fault>
    </operation>
    <operation name="getOverlayList">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmWorkflowException">
        <soap:fault name="MccmWorkflowException" use="literal"/>
      </fault>
      <fault name="MccmUnknownSessionException">
        <soap:fault name="MccmUnknownSessionException" use="literal"/>
      </fault>
      <fault name="MccmInvalidInputException">
        <soap:fault name="MccmInvalidInputException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
      <fault name="MccmNoSuchObjectException">
        <soap:fault name="MccmNoSuchObjectException" use="literal"/>
      </fault>
    </operation>
    <operation name="login">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmAuthorisationException">
        <soap:fault name="MccmAuthorisationException" use="literal"/>
      </fault>
      <fault name="MccmAuthenticationException">
        <soap:fault name="MccmAuthenticationException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
    </operation>
    <operation name="logout">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmUnknownSessionException">
        <soap:fault name="MccmUnknownSessionException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
    </operation>
    <operation name="omTransferInit">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmTargetOverlayException">
        <soap:fault name="MccmTargetOverlayException" use="literal"/>
      </fault>
      <fault name="MccmWorkflowException">
        <soap:fault name="MccmWorkflowException" use="literal"/>
      </fault>
      <fault name="MccmUnknownSessionException">
        <soap:fault name="MccmUnknownSessionException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
      <fault name="MccmNoSuchObjectException">
        <soap:fault name="MccmNoSuchObjectException" use="literal"/>
      </fault>
    </operation>
    <operation name="omTransferSend">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmWorkflowException">
        <soap:fault name="MccmWorkflowException" use="literal"/>
      </fault>
      <fault name="MccmUnknownSessionException">
        <soap:fault name="MccmUnknownSessionException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
    </operation>
    <operation name="omTransferStart">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmWorkflowException">
        <soap:fault name="MccmWorkflowException" use="literal"/>
      </fault>
      <fault name="MccmUnknownSessionException">
        <soap:fault name="MccmUnknownSessionException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
    </operation>
    <operation name="omTransferWait">
      <soap:operation soapAction=""/>
      <input>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </input>
      <output>
        <soap:body use="literal" namespace="http://insa.ws.telco.psi.de/"/>
      </output>
      <fault name="MccmWorkflowException">
        <soap:fault name="MccmWorkflowException" use="literal"/>
      </fault>
      <fault name="MccmUnknownSessionException">
        <soap:fault name="MccmUnknownSessionException" use="literal"/>
      </fault>
      <fault name="MccmInternalSystemException">
        <soap:fault name="MccmInternalSystemException" use="literal"/>
      </fault>
      <fault name="MccmProcessException">
        <soap:fault name="MccmProcessException" use="literal"/>
      </fault>
      <fault name="MccmTimeoutException">
        <soap:fault name="MccmTimeoutException" use="literal"/>
      </fault>
    </operation>
  </binding>
  <service name="InsaCmsService">
    <port name="InsaCmsFacadePort" binding="tns:InsaCmsFacadeBinding">
      <soap:address location="http://hwesseling:4066/mccm/InsaCmsFacade"/>
    </port>
  </service>
</definitions>

from suds.client import Client

url = 'http://localhost:4066/mccm/InsaCmsFacade?wsdl'
client = Client(url)
sessId = client.service.login('insauser','$insauser')

print "Obtained Insa session %s from AppServer" % (sessId)
jlog = client.service.getJobLog(sessId,'100000005')

"""
  Logentries have the following format:
  (logEntry){
     entryTextLine = "[JOB-0037] ** Finished ActionSet MCCMImportRuleSet all right."
     severity = "INFO"
     timestamp = "Mon Jun 29 12:26:34 CEST 2009"
     }
"""
logfile = open("/tmp/insa."+sessId+".log","w")
for line in jlog.logEntry:
    logfile.write( "%s %s\n" % (line.severity,line.entryTextLine))
logfile.close()

client.service.logout(sessId)
print "Logged out from Insa session %s successfully" % sessId

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]