title: Location for Handler class in Java web service
body: <p>I'm trying to add a SOAP Handler to a web service.</p>
  
  <p>The annotation added to the web service right after the @WebService annotation is:</p>
  
  <pre><code>@HandlerChain(file="MyHandler.xml")
  </code></pre>
  
  <p>The web service is packaged with the service class under WEB-INF/classes and the handler class is in a jar located under WEB-INF/lib.</p>
  
  <p>For example:</p>
  
  <pre><code>WEB-INF/classes/com/.../MyService.class
  WEB-INF/classes/com/.../MyServiceImpl.class
  WEB-INF/classes/com/.../MyHandler.xml
  .
  .
  .
  WEB-INF/lib/JarProvidedToMe.jar  &lt;--- Has the handler class (MyHandler.class) in it that is referenced in MyHandler.xml
  </code></pre>
  
  <p>MyHandler.xml (Changed the fully qualified name):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;handler-chains xmlns="http://java.sun.com/xml/ns/javaee"&gt;
      &lt;handler-chain&gt;
          &lt;handler&gt;
              &lt;handler-name&gt;com.full.path.MyHandler&lt;/handler-name&gt;
              &lt;handler-class&gt;com.full.path.MyHandler&lt;/handler-class&gt;
          &lt;/handler&gt;
      &lt;/handler-chain&gt;
  &lt;/handler-chains&gt;
  </code></pre>
  
  <p>When I try to deploy the web service I get ClassNotFoundException for the handler class (MyHandler.class) referenced in the MyHandler.xml.</p>
  
  <p>Using Eclipse I have been able to add my own handler using the dialogs in eclipse. Eclipse put the handler class in the same location as the service class. But I need to be able to use the handler that has been provided to me in a jar file.</p>
  
  <p>The web service is being deployed in an ear file to WebLogic 10.3</p>
  
  <p>Please let me know if I need to describe something better. I'm new to web services and Java.</p>
  
  <p>Thanks.</p>