JAX-WS General usage questions

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

JAX-WS General usage questions

Olano, Ever

Hello.  I am writing a sample client using JAX-WS 2.0 that will consume our own web service.  With the help of a couple of people on the Sun forums, I was able to get as far as sending a request and getting a fault (I have yet to sign my request as required by our web service).

 

My questions are:

 

  1. Is there a way to set the timeout (for waiting for the response)?  How?

 

  1. When I get a WebServiceException (that is not a SOAPFaultException), is there a way to tell when (i.e. which stage) the exception occurred, specifically, whether or not the exception occurred while waiting for the reply (e.g. timeout)?  Or do I just call the exception’s getCause() method and infer from the type of exception that it returns.

 

  1. Is the Service-derived class generated by wsimport thread-safe?  Can I use just a single instance and call its getPort*() method for each request?  (I’m guessing yes.)

 

  1. What about each stub/port object?  Is it thread-safe?  (I’m guessing no.)

 

 

Thanks in advance for your help.

Ever