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 xu cai <je...@gmail.com> on 2006/09/05 07:51:37 UTC

Re: Response from Axis does not conform with the WSDL

please postt the wsdl file

On 8/21/06, Arati Rahalkar <ar...@persistent.co.in> wrote:
>
> Hi Anne
>
> Thanks for the response. I tried using Axis 1.4.
>
> I am facing the same problem however. I am just not understanding how Axis
> can behave like this. I am sending the SOAP request and SOAP response
> packages I picked up by using SOAPMonitor:
>
> Request:
>
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> "
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
>    <me xmlns="http://helloworldsample">Arati</me>
> </soapenv:Body>
> </soapenv:Envelope>
>
> Response:
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> "
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
>    <meReturn xmlns="http://helloworldsample">Hello Arati</meReturn>
> </soapenv:Body>
> </soapenv:Envelope>
>
> I see two problems here:
>
> 1. In the request SOAP Body: there is no mention of the method name. There
> is a directly a "me" element, where as the name of the method i.e.
> sayHelloToMe should be mentioned present above the me element
> 2. The response contains a "meReturn" element where as according to the
> WSDL
> it should be containing sayHelloToMeReturn.
>
> Is there any mistake I am making somewhere or anything that I am missing?
>
> Thanks in advance,
> Arati
>
>
>
> -----Original Message-----
> From: Anne Thomas Manes [mailto:atmanes@gmail.com]
> Sent: Monday, August 21, 2006 6:20 PM
> To: axis-user@ws.apache.org
> Subject: Re: Response from Axis does not conform with the WSDL
>
> Use Axis 1.4.
>
> On 8/21/06, Arati Rahalkar <ar...@persistent.co.in> wrote:
> >
> >
> >
> >
> > Hi
> >
> >
> >
> > I am having a very basic question about Axis. It really seems like a bug
> or
> > otherwise I am not missing something. I have a very simple web service
> > deployed on Axis 1.2 with only one method: sayHelloToMe which takes in a
> > person's name as input and returns "Hello <person name>" string as a
> > response. Following is the snippet of the WSDL file (as generated by
> Axis
> > when I access the wsdl using serviceName?wsdl)
> >
> >
> >
> > WSDL Types for request and response
> >
> >
> >
> > <wsdl:types>
> >
> >   <schema elementFormDefault="qualified"
> > targetNamespace="http://localhost:8081/axis/services/HelloWorldService"
> > xmlns="http://www.w3.org/2001/XMLSchema">
> >
> >    <element name="sayHelloToMeReturn" type="xsd:string"/>
> >
> >   </schema>
> >
> >   <schema elementFormDefault="qualified"
> > targetNamespace="http://helloworldsample"
> > xmlns="http://www.w3.org/2001/XMLSchema">
> >
> >    <element name="me" type="xsd:string"/>
> >
> >   </schema>
> >
> >  </wsdl:types>
> >
> >
> >
> > Input message
> >
> >    <wsdl:message name="sayHelloToMeRequest">
> >
> >       <wsdl:part element="tns1:me" name="me"/>
> >
> >    </wsdl:message>
> >
> >
> >
> > Output message
> >
> >    <wsdl:message name="sayHelloToMeResponse">
> >
> >       <wsdl:part element="impl:sayHelloToMeReturn"
> > name="sayHelloToMeReturn"/>
> >
> >    </wsdl:message>
> >
> >    <wsdl:portType name="HelloService">
> >
> >
> >
> > Operation
> >
> >       <wsdl:operation name="sayHelloToMe" parameterOrder="me">
> >
> >          <wsdl:input message="impl:sayHelloToMeRequest"
> > name="sayHelloToMeRequest"/>
> >
> >          <wsdl:output message="impl:sayHelloToMeResponse"
> > name="sayHelloToMeResponse"/>
> >
> >       </wsdl:operation>
> >
> >    </wsdl:portType>
> >
> >
> >
> > According to this WSDL, the response I get from the server to this web
> > service call should be: <sayHelloToMeReturn>Hello
> input</sayHelloToMeReturn>
> >
> >
> >
> > However, when I checked using the SOAP monitor - I get the response
> > <meReturn>Hello input</meReturn>. Note that, meReturn is no where
> mentioned
> > in the WSDL document. The only logical explanation is that Axis is
> appending
> > a "Return" to the input parameter "me". The namespace of the response is
> > also the same as the request (where as in the WSDL the two namespaces
> are
> > different).
> >
> >
> >
> > This seems like a major bug - or am I missing something? Is there a
> > workaround for this problem? Is this problem fixed in later versions of
> > Axis?
> >
> >
> >
> > Thanks,
> >
> > Arati DISCLAIMER ========== This e-mail may contain privileged and
> > confidential information which is the property of Persistent Systems
> Pvt.
> > Ltd. It is intended only for the use of the individual or entity to
> which
> it
> > is addressed. If you are not the intended recipient, you are not
> authorized
> > to read, retain, copy, print, distribute or use this message. If you
> have
> > received this communication in error, please notify the sender and
> delete
> > all copies of this message. Persistent Systems Pvt. Ltd. does not accept
> any
> > liability for virus infected mails.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
> DISCLAIMER
> ==========
> This e-mail may contain privileged and confidential information which is
> the property of Persistent Systems Pvt. Ltd. It is intended only for the use
> of the individual or entity to which it is addressed. If you are not the
> intended recipient, you are not authorized to read, retain, copy, print,
> distribute or use this message. If you have received this communication in
> error, please notify the sender and delete all copies of this message.
> Persistent Systems Pvt. Ltd. does not accept any liability for virus
> infected mails.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
- xucai