Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Jetty HTTP Client as transport for JAX-WS requests

Hi all,

I am wondering if it is in any way possible to use the Jetty HTTP Client to handle the underlying HTTP communication for JAX-WS *client requests*, eg:

HttpClient client = new HttpClient();
// configure HttpClient

Service service = ...;
StockQuote quoteService = (StockQuote)service.getPort(portName);
javax.xml.ws.BindingProvider bp = (javax.xml.ws.BindingProvider)quoteService;
Map<String,Object> context = bp.getRequestContext();
context.setProperty("HTTP.CLIENT", client);
Float quote = quoteService.getPrice(ticker);

And that request would be done using the "client" instance of HttpClient. Also, this would need to work with the JAX-WS reference implementation as included in JSE 7 & 8.

If something like this is not currently possible, does anybody have any idea where to start looking for what needs to be coded? I've been looking at the JAX-WS specifications, specifically chapters 5 & 6 (Service APIs and Core APIs), but I'm getting a bit lost. Googling also has turned up something related to "TransportPipeFactory", which I guess is specific to the reference implementation, because it's not mentioned in the JAX-WS standard specifications.

Maarten

Back to the top