Igor Kromin |   Consultant. Coder. Blogger. Tinkerer. Gamer.

In the past I've shown how to use Ant and the JWSC task to build a JAX-WS web service, well I've moved onto Maven now and started to use the Oracle WebLogic Maven plugin to build services. This is an example on how to build a JAX-WS web service using that plugin, specifically the wsgen goal.

It should be noted that even though the plugin still provides the ws-jwsc goal, it has been deprecated and should not be used. I found that ws-jwsc was full of bugs when I used it in the past, wsgen is much more reliable.

Since I am using Maven, I have a standard folder structure for my service, which looks like this...

All of the above files are available from GitHub here: ikromin/misc/j2ee/wsgen_jaxws_example.

Below is the configuration for the plugin. The most significant part is on line 15 where I specify the service endpoint interface (SEI), which is my web service implementation class.
 Maven Plugin

That's pretty much all there is to it. As long as you package your project as a WAR file, Maven takes care of the rest.

Once you run 'mvn clean package', you will get a target/WsExample-1.0.war file which can be deployed to WebLogic. Once deployed the WSDL should be accessible at a URL similar to: http://localhost:7001/WsExample-1.0/WsExample?wsdl


Did you like this post or found it useful? Considering supporting this Blog to keep its web servers running, any amount helps! Thanks!
Have comments or feedback on what I wrote? Please share them below!
comments powered by Disqus
Other posts you may like...