#15 wsdl2py; is wsdl-file or created _types.pl wrong?

v1.0 (example)

I'm trying to use wsdl2py to send soap requests to a cisco communications manager (cucm).
The requests are send properly and cucm sends a reply.

Unfortunately the reply can not be parsed correctly.

The python script expects <ns:return> CUCM sends only <return>.
Changing the _types.py from
"kw["pname"] = ("http://www.cisco.com/AXL/API/9.1","return")"
"kw["pname"] = (None,"return")"
fixed this but there are a lot of functions with this problem.

I tested with "GetCCMVersion".
I'm using ZSI version 2.1~a1-3build1 on Ubuntu 13.10.

I'm not sure if this is
1) a problem with wsdl2py
2) a problem with the wsdl file or the CUCM server

Find attached:
1) WSDL-File from cisco
2) output of wsdl2py (unchanged)
3) my script (test.py)
4) working script AXLAPIService_types.py for GetCCMVersion function
5) log file of cucm containing XML-Request / -Response

Thanks a lot!

1 Attachments


  • Bernhard

    Bernhard - 2014-01-18

    This line should be:
    The python script expects "Namespace:return" CUCM sends only "return".

  • Bernhard

    Bernhard - 2014-01-19

    After havin a deeper look at the WSDL file it seems to me as this is a bug in wsdl2py.

    The WSDL file AXLAPI.wsdl contains message
    * <message name="getCCMVersionIn">
    * <part element="xsd1:getCCMVersion" name="axlParams"/>
    * </message>
    in line 4546.

    Namespace xsd1 is defined in line 2 as xmlns:xsd1="http://www.cisco.com/AXL/API/9.1"

    The element xsd1:getCCMVersion is defined in the (line 3) imported file:
    * <import location="AXLSoap.xsd" namespace="http://www.cisco.com/AXL/API/9.1"/>

    File AXLSoap.xsd defines a namespace xmlns:axlapi="http://www.cisco.com/AXL/API/9.1" in line 3.

    Request and response are defined starting at line 38858:
    * <xsd:complexType name="GetCCMVersionReq">
    * <xsd:sequence>
    * <xsd:element name="processNodeName" type="axlapi:String255" minOccurs="0"/>
    * </xsd:sequence>
    * </xsd:complexType>
    * <xsd:element name="getCCMVersion" type="axlapi:GetCCMVersionReq"/>
    * <xsd:complexType name="GetCCMVersionRes">
    * <xsd:complexContent>
    * <xsd:extension base="axlapi:APIResponse">
    * <xsd:sequence>
    * <xsd:element name="return">
    * <xsd:complexType>
    * <xsd:sequence>
    * <xsd:element name="componentVersion">
    * <xsd:complexType>
    * <xsd:sequence>
    * <xsd:element name="version" type="axlapi:String50"/>
    * </xsd:sequence>
    * </xsd:complexType>
    * </xsd:element>
    * </xsd:sequence>
    * </xsd:complexType>
    * </xsd:element>
    * </xsd:sequence>
    * </xsd:extension>
    * </xsd:complexContent>
    * </xsd:complexType>
    * <xsd:element name="getCCMVersionResponse" type="axlapi:GetCCMVersionRes"/>

    As far as I understand the elements "return" and "componentVersion" are defined without namespace.

    Unfortunately AXLAPIService_types.py contain
    line 64958
    * kw["pname"] = ("http://www.cisco.com/AXL/API/9.1","return")
    line 64978
    * kw["pname"] = ("http://www.cisco.com/AXL/API/9.1","componentVersion")

    instead of
    * kw["pname"] = (None,"return")
    * kw["pname"] = (None,"componentVersion")

    I think I will open a bug report for this.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks