Hi
thnx for the reply.
Yes at the client side I am having difficulties evaluating the response.
The TCPMon showed that the response from webservice is correctly filled.
It looks like when I call the methods of the web-service that returns
an array of objects or List of elements
than the RPCServiceClient is not correctly unpacking it.
I must be doing something wrong at the client side.
Can you help?
Can you point me to some links regarding RPCServiceClient usage with
Arrays/Lists?
Cheers
Tezcan
Here is the code snippet:
The server fills 10 items and TCPMon shows them all
but the iteration only prints one.
Class[] returnTypes = new Class[] { List.class };
Object[] response = serviceClient.invokeBlocking(searchBankTowns,
townArgs, returnTypes);
List towns = (List)response[0];
if (towns.isEmpty())
System.out.println("EMPTY");
else{
for (Iterator iter = towns.iterator(); iter.hasNext();) {
OMTextImpl element = (OMTextImpl) iter.next();
System.out.println("Banktown
response="+element.getText());
}
}
-----Ursprüngliche Nachricht-----
Von: Deepal Jayasinghe [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 26. März 2008 06:32
An: [email protected]
Betreff: Re: how to use ServiceClient
> Hi
> I am a newbee to axis2 and am having trouble getting data from my
> web-service.
> I have sucessfully created a service and can call it using the
> RPCServiceClient.
>
> I have than extended my service to have a method that returns an array
> of objects.
> I can call this method on the web-service but when it returns I am not
> receiving anything.
>
You mean at the client side ?
can you see the request and response in the TCP monitor ?
>
> Now I do not know what I need to do in my RPCServiceClient to handle
> this new method call/response situation.
>
You can use RPCServiceClient to handle this case.
>
> Can ServiceClient cope with complex types such as Arrays, Lists,
> Vectors?
>
Well Axis2 does not support Vectors but other two.
-Deepal
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]