1
votes

I am developing a SOAP Web Service in Java with JAX-WS. I am using Eclipse Juno and Weblogic 12c. The web service is being developed in an EJB Project. I am using a top-down approach: from a WSDL that I have, I use JDK's wsimport tool (via command-line) to generate all the Java classes, I import them to the project and then I provide an implementation for the SEI.

The WSDL has a specification of a WS-Policy with a wsp:Policy tag, but the code generated from wsimport has no kind of information/annotation for this. As such, I suppose I've to write it myself.

From the search that I've made, it seems that either I've to use some Weblogic annotation or use some CXF/Axis/Metro feature. Is this true? Can't I use anything from JAX-WS? I read that CXF/Axis/Metro are all implementations of JAX-WS, but I don't have any idea if I'm using one of them, I think I am using JAX-WS reference implementation, but I don't know if this is true.

I also would like to keep an implementation independent from any application server (Weblogic, in this scenario). If I have to use CXF/Axis/Metro, how can I add their features to my EJB Project?

1

1 Answers

1
votes

Firstly you can use Metro, Axis or any other third party library in your project to generate your client code. However if you want not to use third party libraries, you can generate the needed wsse headers on your own. The followinf link described how to generate your desired headers in order to call wsse secured web services, you should just implement your own SOAPHandler :

http://www.javadb.com/using-a-message-handler-to-alter-the-soap-header-in-a-web-service-client/