From: Otu E. <o.e...@gm...> - 2006-10-31 18:08:37
|
Hi, I would appreciate it if anyone could help. I have the following wsdl and have generated the files for it using the commands shown below. wsdl2py -b -t TYPES -f examples.wsdl wsdl2dispatch -f examples.wsdl I am however recieving SOAP Faults when I send messages to the server. My TYPES.py file is attached. I am simply trying to echo a string back to the client. Client side support for webservices in ZSI is pretty good but the server side is suffering IMHO. I'd appreciate any help. Thanks. -----------------------------------------------WSDL------------------------------------------------------------------ <?xml version="1.0" encoding="UTF-8"?> <!-- Copyright (C) 2006 W3C (R) (MIT ERCIM Keio), All Rights Reserved. W3C liability, trademark and document use rules apply. http://www.w3.org/Consortium/Legal/ipr-notice http://www.w3.org/Consortium/Legal/copyright-documents $Header$ --> <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdl=" http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs=" http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p=" http://www.w3.org/2002/ws/databinding/patterns/6/09/" xmlns:ex="http://www.w3.org/2002/ws/databinding/examples/6/09/" xmlns:def=" http://www.w3.org/2002/ws/databinding/examples/6/09/" targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"> <types> <xs:schema targetNamespace=" http://www.w3.org/2002/ws/databinding/examples/6/09/" elementFormDefault="qualified"> <xs:element name="stringElement" type="xs:string"/> <xs:element name="echoStringElement"> <xs:complexType> <xs:sequence> <xs:element ref="ex:stringElement"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> </types> <message name="echoStringElementRequest"> <part element="ex:echoStringElement" name="echoStringElementRequest"/> </message> <message name="echoStringElementResponse"> <part element="ex:echoStringElement" name="echoStringElementResponse"/> </message> <portType name="PortType"> <operation name="echoStringElement"> <input message="def:echoStringElementRequest"/> <output message="def:echoStringElementResponse"/> </operation> </portType> <binding name="SoapBinding" type="def:PortType"> <soap:binding style="document" transport=" http://schemas.xmlsoap.org/soap/http"/> <operation name="echoStringElement"> <soap:operation soapAction=" http://www.w3.org/2002/ws/databinding/examples/6/09/#echoStringElement"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> <service name="Service"> <port binding="def:SoapBinding" name="Port"> <soap:address location="http://localhost:8081/"/> </port> </service> </definitions> ------------------------------------------------Fault Trace------------------------------------------------------------------------------ <SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ZSI="http://www.zolera.com/schemas/ZSI/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Header> </SOAP-ENV:Header> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>SOAP-ENV:Server</faultcode> <faultstring>Processing Failure</faultstring> <detail> <ZSI:FaultDetail> <ZSI:string>exceptions:AttributeError 'echoStringElement_Holder' object has no attribute '_echoStringElementRequest'</ZSI:string> <ZSI:trace>/usr/lib/python2.4/site-packages/ZSI- 2.0_rc2-py2.4.egg/ZSI/ServiceContainer.py:107:_Dispatch Closing connection #0 /home/o2/Desktop/python-w3c-take-23/test2/Service_services_server.py:95:soap_echoStringElement</ZSI:trace> </ZSI:FaultDetail> </detail> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope> ------------------------------------------------Service_Services_server.py--------------------------------------------------------- # provides an implementation of my service by calling # do_echoStringElement(self, req) # which just echos the request. def soap_echoStringElement(self, ps): self.request = ps.Parse(echoStringElementRequest.typecode) response = echoStringElementResponse() response._echoStringElementResponse = self.do_echoStringElement( self.request.echoStringElementRequest) return response -- Otu Ekanem http://www.ekanem.de |