[ 
https://issues.apache.org/jira/browse/AXIS2-1215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465337
 ] 

Manoj Khangaonkar commented on AXIS2-1215:
------------------------------------------

Attached a patch that fixes this issue. Please review and commit.

To test this patch

1.  add the following method to the StockQuoteService in quickstartsample

public String[] listStocks(String[] stock) {

        for (int i=0 ; i < stock.length ; i++) {

        System.out.println("mj:::+ received stock " + stock[i]) ;

        }

        return stock ;
    }

2. Build and deploy as usual

3. invoke the method by pointing your browser to

http://localhost:8080/axis2/rest/StockQuoteService/listStocks?stock=IBM&stock=SUN&stock=FICO&stock=XYZ

4. You will ses the following response in the browser

<ns:listStocksResponse xmlns:ns="http://quickstart.samples/xsd";>
  <ns:return>IBM</ns:return> 
  <ns:return>SUN</ns:return> 
  <ns:return>FICO</ns:return> 
  <ns:return>XYZ</ns:return> 
  </ns:listStocksResponse>

regards

Mj      

> REST request not getting parsed correctly if parameter input type is an array
> -----------------------------------------------------------------------------
>
>                 Key: AXIS2-1215
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1215
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.0
>         Environment: windows xp pro, IE, Axis 2 version 1.0
>            Reporter: Kris
>         Attachments: patch-1215.txt
>
>
> I have a method that takes in array for strings: 
>          public String sayHello(String [ ] to) {...}
> The SOAP request for this works fine. The REST request however gets 
> translated into a fixed length array of only one string. For example, in the 
> request                                 
> http://localhost:8080/axis2/rest/helloservice/sayHello?to=Andy&to=Mark&to=Jen
> Mark and Jen are thrown away and only Andy is passed on into the array.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to