Hi Barry,
Now I understand the issue, in the service you have specified the
columnNames as List<Object>, so when Axis2 to desalinize XML to Object
it creates an OMelement. So what you get is correct, if you need more
specific data types then use the correct generics (e.g., List<String>) 

Thanks
Deepal
> Deepal,
>
> That was a good article.  You give two ways of calling invokeBlocking.
> I'll give the first way a try tomorrow; however, the second way
> (specifying a return type)
> is exactly what I am doing.  It does seem to create my bean, but does
> not deserialize it
> properly prior to calling the setters.
> Thanks.
>
> Barry
>
> On 8/3/2011 5:09 PM, Deepal Jayasinghe wrote:
>> Have a look at the following article, it might throw some lights:
>>
>> http://wso2.org/library/articles/working-rpcserviceclient
>>
>> Deepal
>>
>> On Wed, Aug 3, 2011 at 5:00 PM, Barry
>> Hathaway<bhath...@nycap.rr.com>  wrote:
>>> 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
>>>
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
> For additional commands, e-mail: java-user-h...@axis.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to