You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Dhanush Gopinath <dh...@mahindrabt.com> on 2004/09/02 12:19:23 UTC

Return SOAP Message not as expected in document oriented service

Hi All,


I have a document - literal web service method

public Document receiveDocument(Document docElems);

The WSDD for the above message is as given

<service name="ProtoMessageService" style="message">
 <parameter name="wsdlTargetNamespace" value="urn:messageDrivenService.ws.proto"/>
    <parameter name="className" value="proto.ws.MessageDrivenService" />
    <parameter name="allowedMethods" value="receiveDocument" />
  </service>

This generates a WSDL as given in attachment.

Now my problem is -even though it is specified in the WSDL that the element name Response SOAP Message should  be receiveDocumentReturn it is giving receiveDoument only.
Also the namespace is also not followed.

Is this a Known Problem .. ???

The  SOAP request and REsponse are as given

REQUEST

<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
    <ns:receiveDocument xmlns:ns="http://ws.proto">
        <ORDER_DETAILS>
        ........... ...
        </ORDER_DETAILS>
    </ns:receiveDocument>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

RESPONSE

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
    <ns:receiveDocument xmlns:ns="http://ws.proto">
        <ORDER_DETAILS>
        ........... ...
        </ORDER_DETAILS>
    </ns:receiveDocument>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


If you compare the RESPONSE and REQUEST u can see that its is almost identical.. except that SOAP RESPONSE doesnt have a SOAP-ENC Name space . Is this a Problem ?

Why the namespace urn:messageDrivenService.ws.proto and the element name receiveDocumentResponse is not coming on the SOAP Response. Please Help
Thanks in Advance

Regards
Dhanush

--------------------------------------------------------------------------------

WSDL -

 <?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions targetNamespace="http://localhost:8080/axis/services/ProtoMessageService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://localhost:8080/axis/services/ProtoMessageService" xmlns:intf="http://localhost:8080/axis/services/ProtoMessageService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://ws.proto" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<schema targetNamespace="http://ws.proto" xmlns="http://www.w3.org/2001/XMLSchema">
  <element name="receiveDocument" type="xsd:anyType" />
  </schema>
<schema targetNamespace="http://localhost:8080/axis/services/ProtoMessageService" xmlns="http://www.w3.org/2001/XMLSchema">
  <element name="receiveDocumentReturn" type="xsd:anyType" />
  </schema>
  </wsdl:types>
<wsdl:message name="receiveDocumentResponse">
  <wsdl:part element="impl:receiveDocumentReturn" name="receiveDocumentReturn" />
  </wsdl:message>
<wsdl:message name="receiveDocumentRequest">
  <wsdl:part element="tns1:receiveDocument" name="part" />
  </wsdl:message>
<wsdl:portType name="MessageDrivenService">
<wsdl:operation name="receiveDocument">
  <wsdl:input message="impl:receiveDocumentRequest" name="receiveDocumentRequest" />
  <wsdl:output message="impl:receiveDocumentResponse" name="receiveDocumentResponse" />
  </wsdl:operation>
  </wsdl:portType>
<wsdl:binding name="ProtoMessageServiceSoapBinding" type="impl:MessageDrivenService">
  <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="receiveDocument">
  <wsdlsoap:operation soapAction="" />
<wsdl:input name="receiveDocumentRequest">
  <wsdlsoap:body namespace="http://ws.proto" use="literal" />
  </wsdl:input>
<wsdl:output name="receiveDocumentResponse">
  <wsdlsoap:body namespace="http://localhost:8080/axis/services/ProtoMessageService" use="literal" />
  </wsdl:output>
  </wsdl:operation>
  </wsdl:binding>
<wsdl:service name="MessageDrivenServiceService">
<wsdl:port binding="impl:ProtoMessageServiceSoapBinding" name="ProtoMessageService">
  <wsdlsoap:address location="http://172.24.86.114:8080/axis/services/ProtoMessageService" />
  </wsdl:port>
  </wsdl:service>
  </wsdl:definitions>

*********************************************************
Disclaimer:         

This message (including any attachments) contains
confidential information intended for a specific
individual and purpose, and is protected by law.
If you are not the intended recipient, you should
delete this message and are hereby notified that
any disclosure, copying, or distribution of this
message, or the taking of any action based on it,
is strictly prohibited.

*********************************************************
Visit us at http://www.mahindrabt.com