openmeetings-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "seba.wagner@gmail.com" <seba.wag...@gmail.com>
Subject Passing complex type as array/list to Axis2 webservice - What URL Pattern does Axis2 expect for REST parameters?
Date Sun, 04 Nov 2012 10:49:09 GMT
According to https://issues.apache.org/jira/browse/AXIS2-1215

You can declare methods like:
public String[] listStocks(String[] stock)

And invoke for example via REST as:
http://localhost:8080/axis2/rest/StockQuoteService/listStocks?stock=IBM&stock=SUN&stock=FICO&stock=XYZ

What about a more complex type?
public String[] listStocks(Stock[] stocks)

How would the URL parameters look like?

Given the Stock object as:
public class Stock {
  private String id;
  private String name;
  /* getters + setters */
}

I would expect something like:
http://localhost:8080/axis2/rest/StockQuoteService/listStocks?id1=1&name1=asd&id2=2&name2=qwe
or
http://localhost:8080/axis2/rest/StockQuoteService/listStocks?id=1&name=asd&id=2&name=qwe

Or similar ... however that does not seem to work.

What URL Patterns does Axis2 expect for such parameter?

Thanks!
Sebastian

-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message