On Thu, Aug 4, 2011 at 7:15 AM, Narendra Kadali <narendra_kad...@hotmail.com> wrote: > Hi Barry Hathaway, > > As far as I know Axis2 aximo data model does not support java collection > framework. However one webservice input argument can be declared as List.
Java Collection and Map support has been implemented on Axis2 trunk and will be available with 1.7.0 release until that it's possible to use SNAPSHOT versions if someone really want to utilize these features . Thanks ! > > I think the reason behind this is to achieve platform independence. > > Regards, > Narendra > >> Date: Wed, 3 Aug 2011 17:00:52 -0400 >> From: bhath...@nycap.rr.com >> To: java-user@axis.apache.org >> Subject: POJO return types >> >> Since I really didn't have any luck returning Lists or arrays, I decided >> to return >> a simple POJO class in my POJO web service. The class that I am trying >> to return >> is defined on both the service and client side as: >> >> public class QueryResultSet { >> private List<Object> columnNames; >> private List<Object> resultSet; >> public QueryResultSet() { >> } >> public List<Object> getColumnNames() { >> return columnNames; >> } >> public void setColumnNames(List<Object> columnNames) { >> this.columnNames = columnNames; >> } >> public List<Object> getResultSet() { >> return resultSet; >> } >> public void setResultSet(List<Object> results) { >> this.resultSet = results; >> } >> } >> >> On the client side, I call the service as: >> >> Class[] queryReturnTypes = new Class[] { QueryResultSet.class }; >> try { >> Object[] queryResponse = >> serviceClient.invokeBlocking(queryQName, >> queryArgs, queryReturnTypes); >> QueryResultSet rs = (QueryResultSet) queryResponse[0]; >> List<Object> colNames = rs.getColumnNames(); >> List<Object> queryRows = rs.getResultSet(); >> for (int i=0; i<colNames.size(); i++) { >> log.info("Response from 'query' operation: column name >> "+colNames.get(i).toString()); >> } >> >> The log statement produces: >> >> 2011-08-03 16:47:53,059 [main ] INFO >> SadlMain - Response from 'query' operation: column >> name <ax25:columnNames >> xmlns:ax25="http://provider.axis.sadlserver.sadl.research.ge.com/xsd" >> xmlns:xs="http://www.w3.org/2001/XMLSchema" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:type="xs:string">cw</ax25:columnNames> >> >> I was expecting that by specifying the correct return type that the >> invokeBlocking call would "unwrap" the >> QueryResultSet class in queryResponse[0] and just get cw. Obviously, >> being a newbie, this isn't quite right. >> Any ideas? >> >> Thanks >> Barry Hathaway >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org >> For additional commands, e-mail: java-user-h...@axis.apache.org >> > -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://people.apache.org/~sagara/ LinkedIn - http://www.linkedin.com/in/ssagara --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org For additional commands, e-mail: java-user-h...@axis.apache.org