title: How to generate @HandlerChain using wsimport
body: <p>I'm generating Java from WSDL using wsimport (JAX-WS 2.1.3) and need to make it generate a @HandlerChain annotation. So I create a JAX-WS binding file:</p>
  
  <pre><code>&lt;jaxws:bindings
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
  xmlns:javaee="http://java.sun.com/xml/ns/javaee"
  wsdlLocation="../etc/MessageStudio.wsdl"&gt;
  
  &lt;jaxws:bindings node="wsdl:definitions"&gt;
      &lt;javaee:handler-chain&gt;
          &lt;javaee:handler-chain-name&gt;StrongmailHandlers&lt;/javaee:handler-chain-name&gt;               
              &lt;javaee:handler&gt;
                  &lt;javaee:handler-name&gt;OrganizationTokenHandler&lt;/javaee:handler-name&gt;         
                  &lt;javaee:handler-class&gt;com.bossmedia.strongmailadapter.deliveryadapter.OrganizationTokenHandler&lt;/javaee:handler-class&gt;           
              &lt;/javaee:handler&gt;                     
      &lt;/javaee:handler-chain&gt;
  &lt;/jaxws:bindings&gt;
  </code></pre>
  
  <p></p>
  
  <p>and run the wsimport Ant task:</p>
  
  <pre><code> &lt;wsimport 
          wsdl="../etc/MessageStudio.wsdl"
          sourcedestdir="../src/gen"
          destdir="../classes"
          verbose="false"
          binding="../etc/jaxws.bindings.xml"&gt;
   &lt;/wsimport&gt;
  </code></pre>
  
  <p>but I get no annotation and no handler chain XML file. Googling only finds me solutions for changing packages, methods and arguments and <a href="http://jax-ws.java.net/nonav/2.1.3/docs/customizations.html#2.10_Handler_chain_customization" rel="nofollow">the JAX-WS RI page</a> from where I copied the XML.</p>
  
  <p>Could you help me find the flaw in my configuration or another way, short of modifying the generated code, to get my handler into the chain?</p>