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")"
to
"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!
Bernhard
This line should be:
The python script expects "Namespace:return" CUCM sends only "return".
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.