Com.sun.xml.ws.transport.local.InVmServer: sample code and experience?

I would like to run some junit test for some of our web services. Not just calling Java code, but going through the javax.xml.ws.Endpoint JAX-WS stack to ensure it works properly. We use the default implementation in Java 7 for testing - Metro 2.2.4 according to wsimport - and the default implementation in Java 6 for production.

However, a typical http binding requires a TCP / IP port connection, and I was wondering if I managed to avoid the TCP / IP layer by preserving the rest of the JAX-WS stack.

It seems that com.sun.xml.ws.transport.local.InVmServer supports the in-vm transport, which does just that, but I am a little versed in the rather complicated documentation and how to get it and comes from the junit 4 test called by maven .

So my question is: how do I - in the junit setup called by maven - start the endpoint with the "in-vm" transport (possibly using the executor) and call it on the client, and then close the endpoint down. Also, what are your impressions of this?

+6
source share

All Articles