When you have a inout operation at the server side you should use the
client.|sendReceive| or |sc.sendReceiveNonBlocking|. The operation
invokeRobust is used when web service operation is void and you would
like to see when something went wrong (e.g., an exception). So, to solve
your problem I would suggest to use sendReceive operation of the service
client.
Deepal
3/15/2011 12:05 PM, Bing Li wrote:
> Dear Deepal,
>
> Thanks so much for your help! I will try your code. The code that got
> timeout exceptions is as follows.
>
> The client:
>
> .....
> public static boolean Print()
> {
> try
> {
> RPCServiceClient serviceClient = new RPCServiceClient();
> Options options = serviceClient.getOptions();
> options.setTimeOutInMilliSeconds(Constants.HTTP_TIMEOUT);
> EndpointReference targetEPR = new
> EndpointReference(Constants.CATEGORIZED_HUB_SERVICE_ENDPOINT);
> options.setTo(targetEPR);
> QName shutdownDB = new
> QName(Constants.GREATFREE_NAMESPACE, Constants.PRINT);
> Object[] shutdownDBArgs = new Object[] {};
> serviceClient.invokeRobust(shutdownDB, shutdownDBArgs);
> return true;
> }
> catch (AxisFault e)
> {
> e.printStackTrace();
> return false;
> }
> catch (Exception e)
> {
> e.printStackTrace();
> return false;
> }
> }
> ......
>
> The server code is very simple and it is implemented by POJO.
>
> public String Print()
> {
> System.out.println("Hello World!");
> return "How do you do?";
> }
>
> Moreover, I noticed that when the return value of the server side is
> changed to void, no timeout exceptions were raised. It is weird!
>
> Thanks again!
> LB
>
>
> On Tue, Mar 15, 2011 at 11:21 PM, Deepal Jayasinghe
> <[email protected] <mailto:[email protected]>> wrote:
>
> Hi,
>
> Axis2 does not have any such limitation, if you are using same
> service client for all the invocation then after each invocation
> try to call servciceClient.cleanupTransport method. Or if possible
> share your client code with us.
>
> Deepal
>
>
> On 3/15/2011 11:17 AM, Bing Li wrote:
>> Dear all,
>>
>> Anyone could answer this question?
>>
>> Your help is highly appreciated!
>>
>> LB
>>
>> On Tue, Mar 15, 2011 at 4:22 AM, Bing Li <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Dear all,
>>
>> I tried to call published Web services. It worked fine.
>> However, when invoking one service in more than two times
>> continuously, the client got timeout exceptions from the 3rd
>> one. Each invocation should be done very quickly. It should
>> not wait for so long time. I guess there must be some limits
>> on the invocation frequency? How to enlarge it?
>>
>> Thanks so much!
>> LB
>>
>>
>