[XML-SIG] ZSI and soap problems....

Svenne Krap svenne at krap.dk
Tue Sep 30 18:01:18 EDT 2003


Hi. I am working on a soap project....

All data below has been anonymized, but hopefully is still usable for 
debugging... I cannot disclose the true identity of the webservice. The 
webservice is running production with three clients already, so 
service-site problems are ruled out.

I am running Python 2.3.1, PyXML 0.8.3, ZSI 1.4.1 all fetched as 
binaries from the official sites....

The scriptlet I am trying is :

 >>> from ZSI import ServiceProxy
 >>> service = 
ServiceProxy('http://dev.xxx.dk/xxxWebService/xxxWebService?wsdl')
keys are [u'ValidatePartyRequest', u'ValidatePartyResponse', 
u'ChangePasswordRequest', u'ChangePasswordResponse', 
u'TransactionResponse', u'HeaderError', u'TransactionRequest', 
u'RequestHeader']

Traceback (most recent call last):
  File "<pyshell#2>", line 1, in -toplevel-
    service = 
ServiceProxy('http://dev.xxx.dk/xxxetWebService/xxxWebService?wsdl')
  File "C:\Python23\Lib\site-packages\ZSI\ServiceProxy.py", line 38, in 
__init__
    callinfo = wstools.WSDLTools.callInfoFromWSDL(self._port, item.name)
  File "C:\Python23\Lib\site-packages\ZSI\wstools\WSDLTools.py", line 
1101, in callInfoFromWSDL
    part = messages[item.message].parts[item.part]
  File "C:\Python23\Lib\site-packages\ZSI\wstools\Utility.py", line 573, 
in __getitem__
    return self.data[key]
KeyError: u'y:RequestHeader'

The content of the wsdl-file is :

<?xml version="1.0" encoding="UTF-8" ?>
  <definitions targetNamespace="http://xxxwebservice" 
xmlns="http://schemas.xmlsoap.org/wsdl/" 
xmlns:http="http://schemas.xmlsoap.org/Wsdl/http/" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:ws="urn:xxxwebservice" xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:y="http://xxxwebservice">
  <types>
  <xs:schema targetNamespace="urn:xxxwebservice">
  <!-- Header types
  -->
  <xs:element name="PartyId">
  <xs:complexType>
  <xs:sequence>
  <xs:element name="headerValue" type="xs:string" />
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  <xs:element name="Password">
  <xs:complexType>
  <xs:sequence>
  <xs:element name="headerValue" type="xs:string" />
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  <xs:element name="xxxWebToolStatusCode" type="xs:int" />
  <xs:element name="CDATA" type="xs:string" />
  <xs:element name="NewPassword" type="xs:string" />
  <xs:element name="NewPasswordConfirm" type="xs:string" />
  <xs:element name="FlowName" type="xs:string" />
  <xs:element name="ServerPartID" type="xs:string" />
  <xs:element name="RequestElement">
  <xs:complexType>
  <xs:sequence>
  <xs:any processContents="skip" />
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  <xs:element name="xxxWebToolResponse" type="xs:string" />
  <xs:element name="xxxWebToolFileResponse">
  <xs:complexType>
  <xs:sequence>
  <xs:any processContents="skip" />
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  <xs:element name="ValidatePartyRequest" />
  <xs:element name="ValidatePartyResponse">
  <xs:complexType>
  <xs:sequence>
  <xs:element ref="ws:xxxWebToolFileResponse" />
  <xs:element ref="ws:xxxWebToolResponse" />
  <xs:element ref="ws:xxxWebToolStatusCode" />
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  <xs:element name="ChangePasswordRequest">
  <xs:complexType>
  <xs:sequence>
  <xs:element ref="ws:NewPassword" />
  <xs:element ref="ws:NewPasswordConfirm" />
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  <xs:element name="ChangePasswordResponse">
  <xs:complexType>
  <xs:sequence>
  <xs:element ref="ws:xxxWebToolFileResponse" />
  <xs:element ref="ws:xxxWebToolResponse" />
  <xs:element ref="ws:xxxWebToolStatusCode" />
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  <xs:element name="TransactionRequest">
  <xs:complexType>
  <xs:sequence>
  <xs:element ref="ws:FlowName" />
  <xs:element ref="ws:ServerPartID" />
  <xs:element ref="ws:RequestElement" />
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  <xs:element name="TransactionResponse">
  <xs:complexType>
  <xs:sequence>
  <xs:element ref="ws:xxxWebToolFileResponse" />
  <xs:element ref="ws:xxxWebToolResponse" />
  <xs:element ref="ws:xxxWebToolStatusCode" />
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>
  </types>
  <message name="ChangePasswordRequest">
  <part element="ws:ChangePasswordRequest" name="requestParameters" />
  </message>
  <message name="ChangePasswordResponse">
  <part element="ws:ChangePasswordResponse" name="ChangePasswordReturn" />
  </message>
  <message name="TransactionRequest">
  <part element="ws:TransactionRequest" name="requestParameters" />
  </message>
  <message name="TransactionResponse">
  <part element="ws:TransactionResponse" name="TransactionReturn" />
  </message>
  <message name="ValidatePartyRequest">
  <part element="ws:ValidatePartyRequest" name="requestParameters" />
  </message>
  <message name="ValidatePartyResponse">
  <part element="ws:ValidatePartyResponse" name="ValidatePartyReturn" />
  </message>
  <message name="HeaderError">
  <part name="errorString" type="xs:string" />
  </message>
  <message name="RequestHeader">
  <part element="ws:PartyId" name="PartyId" />
  <part element="ws:Password" name="Password" />
  </message>
  <portType name="xxxetPortType">
  <operation name="ChangePassword">
  <input message="y:ChangePasswordRequest" />
  <output message="y:ChangePasswordResponse" />
  </operation>
  <operation name="ValidateParty">
  <input message="y:ValidatePartyRequest" />
  <output message="y:ValidatePartyResponse" />
  </operation>
  <operation name="Transaction">
  <input message="y:TransactionRequest" />
  <output message="y:TransactionResponse" />
  </operation>
  </portType>
  <binding name="xxxWebServiceSoapBinding" type="y:xxxetPortType">
  <soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http" />
  <operation name="ChangePassword">
  <soap:operation soapAction="urn:xxxAction" style="document" />
  <input>
  <soap:body use="literal" />
  <soap:header message="y:RequestHeader" 
namespace="http://xxxwebservice/encoding" part="PartyId" use="literal">
  <soap:headerfault message="y:RequestHeader" 
namespace="http://xxxwebservice/encoding" part="PartyId" use="literal" />
  </soap:header>
  <soap:header message="y:RequestHeader" 
namespace="http://xxxwebservice/encoding" part="Password" use="literal">
  <soap:headerfault message="y:RequestHeader" 
namespace="http://xxxwebservice/encoding" part="Password" use="literal" />
  </soap:header>
  </input>
  <output>
  <soap:body use="literal" />
  </output>
  </operation>
  <operation name="ValidateParty">
  <soap:operation soapAction="urn:xxxAction" style="document" />
  <input>
  <soap:body use="literal" />
  <soap:header message="y:RequestHeader" 
namespace="http://xxxwebservice/encoding" part="PartyId" use="literal">
  <soap:headerfault message="y:RequestHeader" 
namespace="http://xxxwebservice/encoding" part="PartyId" use="literal" />
  </soap:header>
  <soap:header message="y:RequestHeader" 
namespace="http://xxxwebservice/encoding" part="Password" use="literal">
  <soap:headerfault message="y:RequestHeader" 
namespace="http://xxxwebservice/encoding" part="Password" use="literal" />
  </soap:header>
  </input>
  <output>
  <soap:body use="literal" />
  </output>
  </operation>
  <operation name="Transaction">
  <soap:operation soapAction="urn:xxxAction" style="document" />
  <input>
  <soap:body use="literal" />
  <soap:header message="y:RequestHeader" 
namespace="http://xxxwebservice/encoding" part="PartyId" use="literal">
  <soap:headerfault message="y:RequestHeader" 
namespace="http://xxxwebservice/encoding" part="PartyId" use="literal" />
  </soap:header>
  <soap:header message="y:RequestHeader" 
namespace="http://xxxwebservice/encoding" part="Password" use="literal">
  <soap:headerfault message="y:RequestHeader" 
namespace="http://xxxwebservice/encoding" part="Password" use="literal" />
  </soap:header>
  </input>
  <output>
  <soap:body use="literal" />
  </output>
  </operation>
  </binding>
  <service name="xxxWebService">
  <port binding="y:xxxWebServiceSoapBinding" name="xxxWebService">
  <soap:address 
location="https://dev.xxx.dk:443/xxxetWebService/xxxWebService" />
  </port>
  </service>
  </definitions>


I hope some knows an answer or can point me to the right direction.... 
Btw. I am an SOAP newbie (and rather unfamiliar with XML)...

/Svenne




More information about the XML-SIG mailing list