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 Kinichiro Inoguchi <in...@yahoo.com> on 2006/07/10 18:03:28 UTC

[Axis2] response element name with RPCMessageReceiver

This is not a problem, just my thoughts.
I wonder why response element name is always "return" ?

If I create MyService like this,

  package test;
  public class MyService {
    public String echo(String inparam) {
      String outparam = inparam;
      return outparam;
    }
  }

and packed this to MyService.aar with using RPCMessageReceiver,
generated WSDL <types> section will be like this,

  <wsdl:types>
    <xs:schema ...>
      <xs:element name="echo">
        <xs:complexType>
          <xs:sequence>
            <xs:element type="xs:string" name="inparam"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="echoResponse">
        <xs:complexType>
          <xs:sequence>
            <xs:element type="xs:string" name="return"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
  </wsdl:types>

An element name of request is equivalen to method argument variable
name, "inparam".
But, element name of response is NOT variable name returned,
"outparam".
An element name of response is always "return".

Is there any reason for this ?
In case for like "return inparam + outparam;" ?

I feel variable name should be an element name of response.
Then I control WSDL naming convention a little bit.

Any comments will be appreciated :-)

Thanks,
kinichiro

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] response element name with RPCMessageReceiver

Posted by Deepal jayasinghe <de...@gmail.com>.
Let's do this ,
generate code from the WSDL and then implement the skelton as you wish,

Deepal
> Deepal Jayasinghe wrote:
>   
>> Hi Anamitra ;
>> You are exactly correct , even from the java reflection you can not
>> directly get the input parameter names . What we have done is, we read
>> byte code and from that get the name of the input parameters, so no way
>> that we can get the name of the output parameter. That is why we always
>> put return as output parameter.
>>
>>     
>
> I know this is an old thread, but I need to figure a way around this.  I
> need to specify the name of the output parameter.
>
> I'm writing a web service to the clients specification.  The SOAP response
> needs to be:
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>    <soap:Body>
>       <GetLoginNameBySessionGUIDResponse xmlns="http://client.net/">
>         
> <GetLoginNameBySessionGUIDResult>123456</GetLoginNameBySessionGUIDResult>
>       </GetLoginNameBySessionGUIDResponse>
>    </soap:Body>
> </soap:Envelope>
>
> But my service is responding with this:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>    <soapenv:Body>
>       <ns:GetLoginNameBySessionGUIDResponse  xmlns:ns="http://client.net/">
>          <ns:return>123456</ns:return>
>       </ns:GetLoginNameBySessionGUIDResponse>
>    </soapenv:Body>
> </soapenv:Envelope>
>
> How do I change the "return" to "GetLoginNameBySessionGUIDResult"?
>
> Here is the WSDL used to generate the server stubs:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:axis2="http://client.net/"
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> xmlns:ns1="http://org.apache.axis2/xsd"
> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
> xmlns:ns="http://client.net/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> targetNamespace="http://client.net/">
>     <wsdl:documentation>BCAuthenticatorForSSO</wsdl:documentation>
>     <wsdl:types>
>         <xs:schema attributeFormDefault="qualified"
> elementFormDefault="qualified" targetNamespace="http://client.net/">
>             <xs:element name="GetLoginNameBySessionGUID">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="sessionGUID"
> nillable="true" type="xs:string"/>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>             <xs:element name="GetLoginNameBySessionGUIDResponse">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0"
> name="GetLoginNameBySessionGUIDResult" nillable="true" type="xs:string"/>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>         </xs:schema>
>     </wsdl:types>
>     <wsdl:message name="GetLoginNameBySessionGUIDRequest">
>         <wsdl:part name="parameters"
> element="ns:GetLoginNameBySessionGUID"/>
>     </wsdl:message>
>     <wsdl:message name="GetLoginNameBySessionGUIDResponse">
>         <wsdl:part name="parameters"
> element="ns:GetLoginNameBySessionGUIDResponse"/>
>     </wsdl:message>
>     <wsdl:portType name="BCAuthenticatorForSSOPortType">
>         <wsdl:operation name="GetLoginNameBySessionGUID">
>             <wsdl:input message="axis2:GetLoginNameBySessionGUIDRequest"
> wsaw:Action="urn:GetLoginNameBySessionGUID"/>
>             <wsdl:output message="axis2:GetLoginNameBySessionGUIDResponse"
> wsaw:Action="urn:GetLoginNameBySessionGUIDResponse"/>
>         </wsdl:operation>
>     </wsdl:portType>
>     <wsdl:binding name="BCAuthenticatorForSSOSoap11Binding"
> type="axis2:BCAuthenticatorForSSOPortType">
>         <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
> style="document"/>
>         <wsdl:operation name="GetLoginNameBySessionGUID">
>             <soap:operation soapAction="urn:GetLoginNameBySessionGUID"
> style="document"/>
>             <wsdl:input>
>                 <soap:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="BCAuthenticatorForSSOSoap12Binding"
> type="axis2:BCAuthenticatorForSSOPortType">
>         <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
> style="document"/>
>         <wsdl:operation name="GetLoginNameBySessionGUID">
>             <soap12:operation soapAction="urn:GetLoginNameBySessionGUID"
> style="document"/>
>             <wsdl:input>
>                 <soap12:body use="literal"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap12:body use="literal"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:binding name="BCAuthenticatorForSSOHttpBinding"
> type="axis2:BCAuthenticatorForSSOPortType">
>         <http:binding verb="POST"/>
>         <wsdl:operation name="GetLoginNameBySessionGUID">
>             <http:operation
> location="BCAuthenticatorForSSO/GetLoginNameBySessionGUID"/>
>             <wsdl:input>
>                 <mime:content type="text/xml"
> part="GetLoginNameBySessionGUID"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <mime:content type="text/xml"
> part="GetLoginNameBySessionGUID"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
>     <wsdl:service name="BCAuthenticatorForSSO">
>         <wsdl:port name="BCAuthenticatorForSSOHttpSoap11Endpoint"
> binding="axis2:BCAuthenticatorForSSOSoap11Binding">
>             <soap:address
> location="http://111.111.111.111/SSO/services/BCAuthenticatorForSSO.BCAuthenticatorForSSOHttpSoap11Endpoint/"/>
>         </wsdl:port>
>         <wsdl:port name="BCAuthenticatorForSSOHttpSoap12Endpoint"
> binding="axis2:BCAuthenticatorForSSOSoap12Binding">
>             <soap12:address
> location="http://111.111.111.111/SSO/services/BCAuthenticatorForSSO.BCAuthenticatorForSSOHttpSoap12Endpoint/"/>
>         </wsdl:port>
>         <wsdl:port name="BCAuthenticatorForSSOHttpEndpoint"
> binding="axis2:BCAuthenticatorForSSOHttpBinding">
>             <http:address
> location="http://111.111.111.111/SSO/services/BCAuthenticatorForSSO.BCAuthenticatorForSSOHttpEndpoint/"/>
>         </wsdl:port>
>     </wsdl:service>
> </wsdl:definitions>
>
>
> Thanks for your help.
>
>   


-- 
Thank you!


http://blogs.deepal.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] response element name with RPCMessageReceiver

Posted by "Ken M." <km...@bost.com>.

Deepal Jayasinghe wrote:
> 
> Hi Anamitra ;
> You are exactly correct , even from the java reflection you can not
> directly get the input parameter names . What we have done is, we read
> byte code and from that get the name of the input parameters, so no way
> that we can get the name of the output parameter. That is why we always
> put return as output parameter.
> 

I know this is an old thread, but I need to figure a way around this.  I
need to specify the name of the output parameter.

I'm writing a web service to the clients specification.  The SOAP response
needs to be:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetLoginNameBySessionGUIDResponse xmlns="http://client.net/">
        
<GetLoginNameBySessionGUIDResult>123456</GetLoginNameBySessionGUIDResult>
      </GetLoginNameBySessionGUIDResponse>
   </soap:Body>
</soap:Envelope>

But my service is responding with this:
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <ns:GetLoginNameBySessionGUIDResponse  xmlns:ns="http://client.net/">
         <ns:return>123456</ns:return>
      </ns:GetLoginNameBySessionGUIDResponse>
   </soapenv:Body>
</soapenv:Envelope>

How do I change the "return" to "GetLoginNameBySessionGUIDResult"?

Here is the WSDL used to generate the server stubs:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:axis2="http://client.net/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:ns1="http://org.apache.axis2/xsd"
xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:ns="http://client.net/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
targetNamespace="http://client.net/">
    <wsdl:documentation>BCAuthenticatorForSSO</wsdl:documentation>
    <wsdl:types>
        <xs:schema attributeFormDefault="qualified"
elementFormDefault="qualified" targetNamespace="http://client.net/">
            <xs:element name="GetLoginNameBySessionGUID">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="sessionGUID"
nillable="true" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="GetLoginNameBySessionGUIDResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0"
name="GetLoginNameBySessionGUIDResult" nillable="true" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:schema>
    </wsdl:types>
    <wsdl:message name="GetLoginNameBySessionGUIDRequest">
        <wsdl:part name="parameters"
element="ns:GetLoginNameBySessionGUID"/>
    </wsdl:message>
    <wsdl:message name="GetLoginNameBySessionGUIDResponse">
        <wsdl:part name="parameters"
element="ns:GetLoginNameBySessionGUIDResponse"/>
    </wsdl:message>
    <wsdl:portType name="BCAuthenticatorForSSOPortType">
        <wsdl:operation name="GetLoginNameBySessionGUID">
            <wsdl:input message="axis2:GetLoginNameBySessionGUIDRequest"
wsaw:Action="urn:GetLoginNameBySessionGUID"/>
            <wsdl:output message="axis2:GetLoginNameBySessionGUIDResponse"
wsaw:Action="urn:GetLoginNameBySessionGUIDResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="BCAuthenticatorForSSOSoap11Binding"
type="axis2:BCAuthenticatorForSSOPortType">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
        <wsdl:operation name="GetLoginNameBySessionGUID">
            <soap:operation soapAction="urn:GetLoginNameBySessionGUID"
style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="BCAuthenticatorForSSOSoap12Binding"
type="axis2:BCAuthenticatorForSSOPortType">
        <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
        <wsdl:operation name="GetLoginNameBySessionGUID">
            <soap12:operation soapAction="urn:GetLoginNameBySessionGUID"
style="document"/>
            <wsdl:input>
                <soap12:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap12:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:binding name="BCAuthenticatorForSSOHttpBinding"
type="axis2:BCAuthenticatorForSSOPortType">
        <http:binding verb="POST"/>
        <wsdl:operation name="GetLoginNameBySessionGUID">
            <http:operation
location="BCAuthenticatorForSSO/GetLoginNameBySessionGUID"/>
            <wsdl:input>
                <mime:content type="text/xml"
part="GetLoginNameBySessionGUID"/>
            </wsdl:input>
            <wsdl:output>
                <mime:content type="text/xml"
part="GetLoginNameBySessionGUID"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="BCAuthenticatorForSSO">
        <wsdl:port name="BCAuthenticatorForSSOHttpSoap11Endpoint"
binding="axis2:BCAuthenticatorForSSOSoap11Binding">
            <soap:address
location="http://111.111.111.111/SSO/services/BCAuthenticatorForSSO.BCAuthenticatorForSSOHttpSoap11Endpoint/"/>
        </wsdl:port>
        <wsdl:port name="BCAuthenticatorForSSOHttpSoap12Endpoint"
binding="axis2:BCAuthenticatorForSSOSoap12Binding">
            <soap12:address
location="http://111.111.111.111/SSO/services/BCAuthenticatorForSSO.BCAuthenticatorForSSOHttpSoap12Endpoint/"/>
        </wsdl:port>
        <wsdl:port name="BCAuthenticatorForSSOHttpEndpoint"
binding="axis2:BCAuthenticatorForSSOHttpBinding">
            <http:address
location="http://111.111.111.111/SSO/services/BCAuthenticatorForSSO.BCAuthenticatorForSSOHttpEndpoint/"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>


Thanks for your help.

-- 
View this message in context: http://www.nabble.com/-Axis2--response-element-name-with-RPCMessageReceiver-tp5254302p20864854.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] response element name with RPCMessageReceiver

Posted by Kinichiro Inoguchi <in...@yahoo.com>.
Anamitra and Deepal,

Thanks, I'm clear as a blue sky.

--- Deepal Jayasinghe <de...@opensource.lk> wrote:

> Hi Anamitra ;
> You are exactly correct , even from the java reflection you can not
> directly get the input parameter names . What we have done is, we
> read
> byte code and from that get the name of the input parameters, so no
> way
> that we can get the name of the output parameter. That is why we
> always
> put return as output parameter.
> 
> Anamitra.Bhattacharyya@mro.com wrote:
> 
> >this is because there is no way to reflect on the return variable
> inside a
> >method in java- at least to the best of my knowledge.
> >Anamitra
> >
> >
> >                                                                    
>       
> >             Kinichiro                                              
>       
> >             Inoguchi                                               
>       
> >             <ingc1968@yahoo.c                                      
>    To 
> >             om>                       axis-user@ws.apache.org      
>       
> >                                                                    
>    cc 
> >             07/10/2006 12:03                                       
>       
> >             PM                                                   
> Subject 
> >                                       [Axis2] response element name
> with  
> >                                       RPCMessageReceiver           
>       
> >             Please respond to                                      
>       
> >             axis-user@ws.apac                                      
>       
> >                  he.org                                            
>       
> >                                                                    
>       
> >                                                                    
>       
> >                                                                    
>       
> >
> >
> >
> >
> >This is not a problem, just my thoughts.
> >I wonder why response element name is always "return" ?
> >
> >If I create MyService like this,
> >
> >  package test;
> >  public class MyService {
> >    public String echo(String inparam) {
> >      String outparam = inparam;
> >      return outparam;
> >    }
> >  }
> >
> >and packed this to MyService.aar with using RPCMessageReceiver,
> >generated WSDL <types> section will be like this,
> >
> >  <wsdl:types>
> >    <xs:schema ...>
> >      <xs:element name="echo">
> >        <xs:complexType>
> >          <xs:sequence>
> >            <xs:element type="xs:string" name="inparam"/>
> >          </xs:sequence>
> >        </xs:complexType>
> >      </xs:element>
> >      <xs:element name="echoResponse">
> >        <xs:complexType>
> >          <xs:sequence>
> >            <xs:element type="xs:string" name="return"/>
> >          </xs:sequence>
> >        </xs:complexType>
> >      </xs:element>
> >    </xs:schema>
> >  </wsdl:types>
> >
> >An element name of request is equivalen to method argument variable
> >name, "inparam".
> >But, element name of response is NOT variable name returned,
> >"outparam".
> >An element name of response is always "return".
> >
> >Is there any reason for this ?
> >In case for like "return inparam + outparam;" ?
> >
> >I feel variable name should be an element name of response.
> >Then I control WSDL naming convention a little bit.
> >
> >Any comments will be appreciated :-)
> >
> >Thanks,
> >kinichiro
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Tired of spam?  Yahoo! Mail has the best spam protection around
> >http://mail.yahoo.com
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
> >  
> >
> 
> -- 
> Thanks,
> Deepal
> ................................................................
> ~Future is Open~ 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] response element name with RPCMessageReceiver

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Anamitra ;
You are exactly correct , even from the java reflection you can not
directly get the input parameter names . What we have done is, we read
byte code and from that get the name of the input parameters, so no way
that we can get the name of the output parameter. That is why we always
put return as output parameter.

Anamitra.Bhattacharyya@mro.com wrote:

>this is because there is no way to reflect on the return variable inside a
>method in java- at least to the best of my knowledge.
>Anamitra
>
>
>                                                                           
>             Kinichiro                                                     
>             Inoguchi                                                      
>             <ingc1968@yahoo.c                                          To 
>             om>                       axis-user@ws.apache.org             
>                                                                        cc 
>             07/10/2006 12:03                                              
>             PM                                                    Subject 
>                                       [Axis2] response element name with  
>                                       RPCMessageReceiver                  
>             Please respond to                                             
>             axis-user@ws.apac                                             
>                  he.org                                                   
>                                                                           
>                                                                           
>                                                                           
>
>
>
>
>This is not a problem, just my thoughts.
>I wonder why response element name is always "return" ?
>
>If I create MyService like this,
>
>  package test;
>  public class MyService {
>    public String echo(String inparam) {
>      String outparam = inparam;
>      return outparam;
>    }
>  }
>
>and packed this to MyService.aar with using RPCMessageReceiver,
>generated WSDL <types> section will be like this,
>
>  <wsdl:types>
>    <xs:schema ...>
>      <xs:element name="echo">
>        <xs:complexType>
>          <xs:sequence>
>            <xs:element type="xs:string" name="inparam"/>
>          </xs:sequence>
>        </xs:complexType>
>      </xs:element>
>      <xs:element name="echoResponse">
>        <xs:complexType>
>          <xs:sequence>
>            <xs:element type="xs:string" name="return"/>
>          </xs:sequence>
>        </xs:complexType>
>      </xs:element>
>    </xs:schema>
>  </wsdl:types>
>
>An element name of request is equivalen to method argument variable
>name, "inparam".
>But, element name of response is NOT variable name returned,
>"outparam".
>An element name of response is always "return".
>
>Is there any reason for this ?
>In case for like "return inparam + outparam;" ?
>
>I feel variable name should be an element name of response.
>Then I control WSDL naming convention a little bit.
>
>Any comments will be appreciated :-)
>
>Thanks,
>kinichiro
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>  
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2] response element name with RPCMessageReceiver

Posted by An...@mro.com.
this is because there is no way to reflect on the return variable inside a
method in java- at least to the best of my knowledge.
Anamitra


                                                                           
             Kinichiro                                                     
             Inoguchi                                                      
             <ingc1968@yahoo.c                                          To 
             om>                       axis-user@ws.apache.org             
                                                                        cc 
             07/10/2006 12:03                                              
             PM                                                    Subject 
                                       [Axis2] response element name with  
                                       RPCMessageReceiver                  
             Please respond to                                             
             axis-user@ws.apac                                             
                  he.org                                                   
                                                                           
                                                                           
                                                                           




This is not a problem, just my thoughts.
I wonder why response element name is always "return" ?

If I create MyService like this,

  package test;
  public class MyService {
    public String echo(String inparam) {
      String outparam = inparam;
      return outparam;
    }
  }

and packed this to MyService.aar with using RPCMessageReceiver,
generated WSDL <types> section will be like this,

  <wsdl:types>
    <xs:schema ...>
      <xs:element name="echo">
        <xs:complexType>
          <xs:sequence>
            <xs:element type="xs:string" name="inparam"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="echoResponse">
        <xs:complexType>
          <xs:sequence>
            <xs:element type="xs:string" name="return"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
  </wsdl:types>

An element name of request is equivalen to method argument variable
name, "inparam".
But, element name of response is NOT variable name returned,
"outparam".
An element name of response is always "return".

Is there any reason for this ?
In case for like "return inparam + outparam;" ?

I feel variable name should be an element name of response.
Then I control WSDL naming convention a little bit.

Any comments will be appreciated :-)

Thanks,
kinichiro

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org