Hmm, I currently have a similar problem. I would be interested in what
communication style you are using in your client (assuming you are
speaking from an Axis2 client). Do you use the "sendReceive" (i.e. the
blocking) communication or the asynchronous "sendReceiveNonBlocking" ?
Interestingly enough I seem to have troubles with the blocking variant
and complex return types, while the asychnchronous variant works without
problems ...
/philipp
Marcos Vilela schrieb:
Phillipp, nice to have your point of view. Actually everything started
because I was trying to send an Array[] of Employee and in my client I was
getting only the first element on the array. So the natural way is return
the object right? I will try to make something to make my client works to
get all elements in the array.
my Service has method that returns Employee[]
And I'm doing my client this way:
import javax.xml.namespace.QName;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.rpc.client.RPCServiceClient;
// Getting Employee
QName opGetWeather =
new QName("http://service.pojo.sample/xsd", "testQuery");
Object[] opGetWeatherArgs = new Object[] { };
Class[] returnTypes = new Class[] { Employee.class };
Object[] response = serviceClient.invokeBlocking(opGetWeather,
opGetWeatherArgs, returnTypes);
response has always only one element. Probably there are other ways to do
the client. I'm looking to use OMElement.
Do you have any suggest?
thanks and best regards
Marcos Vilela
Philipp Leitner-2 wrote:
Returning an array or a list of objects is surely the more natural way
to go, but may in some cases inflict a performance penalty.
I would go for the list of objects, and only if you run into severe
performance troubles go for optimizing the solution.
/philipp
Marcos Vilela schrieb:
Hello,
I'm doing a service here that return rows from a database, like row
Employee with name and id for example. What is the suggestion of you all
to
return? It's better to return an Object[] Employee or a long string with
<name>..</name> , <id> ... </id> of all rows in the database return? I
would
like to have clients in .NET and Java. Any help on my doubt?
thanks a lot,
Marcos Vilela
---------------------------------------------------------------------
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]