Parameter shift in REST
-----------------------

                 Key: AXIS2-4492
                 URL: https://issues.apache.org/jira/browse/AXIS2-4492
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
    Affects Versions: 1.5
         Environment: Java 6, Apache 5.5.27
            Reporter: Kevin L Stewart


I have a problem with the ordering of parameters in REST methods.  I am using a 
POJO to create my service.  I added the following test method:

    public String  testMultiEcho( String  str1, String  str2, String  str3 )
    {
        StringBuffer  buff = new StringBuffer( "{" );
        
        buff.append( str1 ).append( "," ).append( str2 ).append( "," ).append( 
str3 ).append( "}" );
        
        return buff.toString();
    }

For the URL:

http://<server>/<path to service>/testMultiEcho?str1=Bob&str2=Bill&str3=Tom

I get:

<ns:testMultiEchoResponse>
   <ns:return>{Bob,Bill,Tom}</ns:return>
</ns:testMultiEchoResponse>

This is correct.  And for the URL:

http://<server>/<path to service>/testMultiEcho?str1=Bob&str2=Bill

I get:

<ns:testMultiEchoResponse>
   <ns:return>{Bob,Bill,null}</ns:return>
</ns:testMultiEchoResponse>

This is also correct.  But for URL:

http://<server>/<path to service>/testMultiEcho?str2=Bill&str3=Tom

I get:

<ns:testMultiEchoResponse>
   <ns:return>{Bill,Tom,null}</ns:return>
</ns:testMultiEchoResponse>

This is NOT correct.  It should be:

<ns:testMultiEchoResponse>
<ns:return>{null,Bill,Tom}</ns:return>
</ns:testMultiEchoResponse>

It seems the parameters are processed in order, not by name.  Is there any 
correction/work around for this?

KevinS


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to