0

I'm trying to send a SOAP Request with authentication. I'm using CXF to create the classes I need to call the web service. And I found out I needed to use wss4j to add the authentication informations in the header of the SOAP envelope. (I'm following this post) But I'm struggling with the libraries I have to include my project to make it work.

First I included the org.apache.cxf:cxf-rt-frontend-jaxws:3.1.9 with maven. To be able to use the Client, ClientProxy and Endpoint classes.

And then, I tried to include the org.apache.ws.security:wss4j:1.6.19 with maven, to use the WSS4JInInterceptor and WSS4JOutInterceptor classes. But they aren't in that library.

So, if someone could tell me wich library I have to use ?

EDIT : I finally found the library I needed to use the WSS4J Interceptors. It was org.apache.cxf:cxf-rt-ws-security:3.1.11 but I had to download the jar from mvnrepository because IntelliJ IDEA wasn't able to find it...

But now I have another problem... I got this Exception :

java.lang.NoSuchMethodError: org.apache.xml.security.utils.I18n.init(Ljava/util/ResourceBundle;)V

I read I had to add org.apache.wss4j:wss4j-ws-security-common library but it doesn't change a thing.

Community
  • 1
  • 1
Phoste
  • 1,141
  • 4
  • 18
  • 34
  • 1
    Check this post http://stackoverflow.com/questions/24522190/cxf-wss4j-maven-nosuchmethod-error – ssan May 11 '17 at 14:16
  • I tried to use a previous version of CXF... it doesn't work... I tried to compile the version 2.X.X of WSS4J... It doesn't compile... Why is it so difficult to use those damn libraries... – Phoste May 15 '17 at 09:56

0 Answers0