Hi all,
could someone explain me how this method works.
Indeed my WebService has two methods one which is void(no return type), one which returns a String
I have checked the Client Stub generated by WSDL2Java,
the void method makes use of call.invokeOneWay, while the other one uses call.invoke method.

In my application I would like to be sure that the remote service is available. To perform some tests I have shutdown the server. When the first method(void) is called, I have no error, it is like everything is fine. When I call the second method (with return type), an exception is thrown
because the connection is refused, which I guess is the normal behavior.

I checked the javadoc for invokeOneWay method, this method is supposed to throw a JAXRPCException if something wrong occurs. So I tried to catch this exception, but it is actually never thrown even if the remote endpoint is not available.
So I checked the source code, invokeOneWay:
public void invokeOneWay(Object[] params) {
       try {
           invokeOneWay = true;
           invoke( params );
       } catch( Exception exp ) {
           throw new JAXRPCException( exp.toString() );
       } finally {
           invokeOneWay = false;
       }
   }

This method catches any exception, and then throw a JAXRPCException.
So I don't really understand why in my case (remote server not available), the JAXRPCException is not thrown. So it would mean that no exception is thrown even if the connection is refused.

Please help with that, as I don't understand how this method works
Thanks
Romain


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to