participate


Java Technologies for Web Services - General JAX-WS usage questions
<<   Back to Forum  |   Give us Feedback
This topic has 1 reply on 1 page.
eolano
Posts:31
Registered: 5/15/03
General JAX-WS usage questions   
Feb 6, 2006 10:00 AM

 
Hello. I posted these questions to the JAX-WS mailing list last Friday but since I haven't gotten a reply, I thought I'd also ask them here as some people here who know the answers might not be on the mailing list.

Please answer whichever one(s) you can. You don't have to answer everything, of course.

I'm writing a client using JAX-WS, by the way.

Here they are:


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

2. 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.

3. 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.)

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

Thanks in advance for your help.
Ever
 
dkohlert
Posts:566
Registered: 10/19/98
Re: General JAX-WS usage questions   
Feb 7, 2006 10:33 AM (reply 1 of 1)  (In reply to original post )

 
I responded to your email on the maling list.


1. Is there a way to set the timeout (for waiting for the
response)? How?
Yes, there is a new property on BindingProvider that you can use to set the timeout, the value is an Integer specified in
milliseconds
//Dispatch
dispatch.getRequestContext().put("com.sun.xml.ws.request.timeout", new Integer(5000));
//proxy
( (BindingProvider)proxy).getRequestContext().put("com.sun.xml.ws.request.timeout", new Integer(5000));

1.


2. 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.
No

2.


3. 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.)
Yes

4. What about each stub/port object? Is it thread-safe? (I?m
guessing no.)
Yes
 
This topic has 1 reply on 1 page.
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics
    Users Online : 28
  • Guests : 133

About Sun forums
  • Oracle Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Oracle Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums