3

I've already asked some stuff about JAX-WS some time ago : Use Maven to trigger a wsgen & wsimport in a row, using wsdlLocation

That was for Glassfish at the time and now my requirement is to have that working for Jetty. I know, I know but I do not have the choice.

So basically Jetty has much less support for JAX-WS. I included webservices-api.jar and webservices-rt.jar from metro 1.5 (I am using JDK6u30).

From my sample webservice, I build a simple war file and give it to Jetty. At startup time here is what Jetty says:

War File=/usr/local/apps/web/mywebservices.war;Context=mywebservices;Work=/usr/local/apps/web/work/mywebservices
Dec 28, 2011 10:23:33 AM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
INFO: WSSERVLET12: JAX-WS context listener initializing
Dec 28, 2011 10:23:35 AM com.sun.xml.ws.server.MonitorBase createRoot
INFO: Metro monitoring rootname successfully set to: com.sun.metro:pp=/,type=WSEndpoint,name=/mywebservices-MyServicesWsV2Service-MyServicesWsV2Port
Dec 28, 2011 10:23:35 AM com.sun.xml.ws.transport.http.servlet.WSServletDelegate <init>
INFO: WSSERVLET14: JAX-WS servlet initializing

I use maven to generate the war file. Very simple pom.xml containing basically only the dependencies, no plugin (except the maven-compiler-plugin to compile in 1.6)

With Glassfish you have directly something like http://localhost:9090/mywebservices/MyServicesWsV2Service?wsdl available. My first question (because I am sure there will be a follow-up) is : any chance Jetty can provide me with a wsdl like Glassfish do? If not, how can I create it and ship it in my war with maven ?

Thanks!

PS: see also http://epesh.blog-city.com/jaxws_in_glassfish__way_to_go.htm

Community
  • 1
  • 1
benji
  • 2,331
  • 6
  • 33
  • 62

1 Answers1

0

Jetty doesn't pretend to include web service support. Just drop in Apache CXF for a complete JAX-WS/JAX-B solution, including everything you're used to.

bmargulies
  • 97,814
  • 39
  • 186
  • 310
  • Well. This answer was not very helpfull. Jetty is a Servlet Container that is fully capable of running Web Services if the needed Jar files are included in the web application. – Glenn Bech Oct 31 '14 at 09:23