java.lang.ClassNotFoundException: com.sun.xml.wss.XWSSecurityException
<p>I am having an existing SOAP based web-service and I am trying to implement Spring web service security in it using 'XwsSecurityInterceptor' and 'SpringDigestPasswordValidationCallbackHandler'on it. This is how my spring configuration looks like.
<a href="https://i.stack.imgur.com/rgvs2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rgvs2.png" alt="enter image description here"></a></p>

<p>I am deploying this application in JBoss7.1 AS.While the application boots up, following exception is thrown.It complains that the 'com.sun.xml.wss.XWSSecurityException' is not found. </p>

<blockquote>
  <p>org.springframework.beans.factory.BeanCreationException: Error
  creating bean with name
  'org.springframework.ws.soap.addressing.server.AnnotationActionEndpointMapping#0':
  Invocation of init method failed; nested exception is
  java.lang.NoClassDefFoundError: com/sun/xml/wss/XWSSecurityException
  Caused by: java.lang.ClassNotFoundException:
  com.sun.xml.wss.XWSSecurityException</p>
</blockquote>

<p>Now I am trying to understand the root cause of that issue. So I am starting with the POM file.</p>

<p>Following dependencies are in pom.</p>

<pre><code>&lt;dependency&gt;
    &lt;groupId&gt;org.springframework.ws&lt;/groupId&gt;
    &lt;artifactId&gt;spring-ws-core&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.ws.version}&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.springframework.ws&lt;/groupId&gt;
    &lt;artifactId&gt;spring-ws-security&lt;/artifactId&gt;
    &lt;version&gt;${org.springframework.ws.version}&lt;/version&gt;
&lt;/dependency&gt;

&lt;dependency&gt;
    &lt;groupId&gt;com.sun.xml.wss&lt;/groupId&gt;
    &lt;artifactId&gt;xws-security&lt;/artifactId&gt;
    &lt;version&gt;3.0&lt;/version&gt;
&lt;/dependency&gt;

&lt;dependency&gt;
    &lt;groupId&gt;javax.activation&lt;/groupId&gt;
    &lt;artifactId&gt;activation&lt;/artifactId&gt;
    &lt;version&gt;1.1.1&lt;/version&gt;
&lt;/dependency&gt;

&lt;dependency&gt;
    &lt;groupId&gt;javax.xml&lt;/groupId&gt;
    &lt;artifactId&gt;xmldsig&lt;/artifactId&gt;
    &lt;version&gt;1.0&lt;/version&gt;
&lt;/dependency&gt;
</code></pre>

<p>As a part of my R&amp;D, I went down to the older(2.1.2) versions of 'spring-ws-core' &amp; 'spring-ws-security' along with '1.0.2' version of 'sjsxp'. Application got started and I got an authentication error when i gave an invalid password. Application responds fine if I give the correct credentials. This is what I want to achieve with latest version of these Jars.</p>

<p>Now I want to know why there is a missing with 2.3.0/2.4.0. </p>

<p>So I tried the 'mvn dependency:tree -Dverbose' and found that the 2.1.2 version brings the 'xws-security' along with it.</p>

<p><a href="https://i.stack.imgur.com/8fmHp.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8fmHp.png" alt="enter image description here"></a></p>

<p>So I thought of adding that dependency.</p>

<pre><code>    &lt;dependency&gt;
        &lt;groupId&gt;com.sun.xml.wss&lt;/groupId&gt;
        &lt;artifactId&gt;xws-security&lt;/artifactId&gt;
        &lt;version&gt;3.0&lt;/version&gt;
    &lt;/dependency&gt;
</code></pre>

<p>Now that is forcing me to add two more dependencies. I added those too.</p>

<pre><code>    &lt;dependency&gt;
        &lt;groupId&gt;javax.activation&lt;/groupId&gt;
        &lt;artifactId&gt;activation&lt;/artifactId&gt;
        &lt;version&gt;1.1.1&lt;/version&gt;
    &lt;/dependency&gt;

    &lt;dependency&gt;
        &lt;groupId&gt;javax.xml&lt;/groupId&gt;
        &lt;artifactId&gt;xmldsig&lt;/artifactId&gt;
        &lt;version&gt;1.0&lt;/version&gt;
    &lt;/dependency&gt;
</code></pre>

<p>But the second one 'xmldsig' is missing in the maven repository. I can download it and manually add it to my local m2 repo. But I would like to fix it in a proper way. 
While searching i came across this thread.
<a href="http://maven.40175.n5.nabble.com/where-to-get-xmldsig-1-0-jar-td92435.html" rel="noreferrer">http://maven.40175.n5.nabble.com/where-to-get-xmldsig-1-0-jar-td92435.html</a></p>

<p>There someone is talking about an alternative.</p>

<p><a href="https://i.stack.imgur.com/8ovgW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8ovgW.png" alt="enter image description here"></a></p>

<p>And i could see that this is available inside the 2.3.0 version of 'spring-ws-security:jar'.</p>

<p><a href="https://i.stack.imgur.com/Gdd5P.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Gdd5P.png" alt="enter image description here"></a></p>

<p>Now my question is, what needs to be avoided/added so that the application boots up with the latest version of jars??   fingers crossed.....</p>