Hi gregor,

Unless I am missing something from your email, I think you misread 'JAX-WS' as 'JAX-RS'...

Maarten


On 20 February 2015 17:00:50 Gregor Jarisch <[email protected]> wrote:

Hi Maarten,

you may wanna take a look at the client library implementation of Resteasy 3.x. Although they don't use jetty http client in their implementation (unfortunately), that might be a good starting point to look at how it is implemented in general (even if you not using resteasy as JAX-RS implementation). http://docs.jboss.org/resteasy/docs/3.0.9.Final/userguide/html_single/#RESTEasy_Client_Framework

Having said this; since http2 is close by and jetty close to releasing something useful here - how about trying to implement it with http2 already? Just a thought.

Gregor


Maarten Boekhold <[email protected]> , 17.02.2015 12:26:


     Hi,

Done some more research. I think something like the following should be possible:

Create a JettyHttpClientFeature extends WebServiceFeature that acts as the container for the HttpClient instance to use Pass that feature as part of the service.getXXXPort(feature) "proxy factory" method Create (and register) a JettyHttpClientTransportTubeFactory/JettyHttpClientTransportTube implementations The factory has access to the ClientTubeAssemblerContext, which has access to WSBinding which has access to the WebServiceFeatures that were provided to the getXXXPort() method. If our JettyHttpClientFeature is enabled, then return an instance of JettyHttpClientTransportTube (initialized with the HttpClient connection) Otherwise return the default HttpTransportPipe (which implements Tube)
Any comments on this?

Maarten

On 2015-02-17 12:58, Maarten Boekhold       wrote:
                        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


       _______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

----------
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to