title: Add Custom Annotation on post processor for Apache CXF WSDL2Java
body: <p>I need to identify the files generated by Apache CXF in case of Soap WebServices via WSDL2Java tool. Is there a postprocessor where I can manipulate the byte data for these generated files to add a custom annotation on these files? </p>
  
  <p>Following is my Maven Plugin Configuration</p>
  
  <pre><code>&lt;plugin&gt;
              &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
              &lt;artifactId&gt;cxf-codegen-plugin&lt;/artifactId&gt;
              &lt;version&gt;${cxf.version}&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;generate-sources&lt;/id&gt;
                      &lt;phase&gt;generate-sources&lt;/phase&gt;
                      &lt;configuration&gt;
                          &lt;strict&gt;false&lt;/strict&gt;
                          &lt;sourceRoot&gt;${basedir}/src/main/java&lt;/sourceRoot&gt;
                          &lt;wsdlOptions&gt;
                              &lt;wsdlOption&gt;
                                  &lt;wsdl&gt;${basedir}/src/main/resources/wsdl/CustomerService.wsdl&lt;/wsdl&gt;
                                  &lt;extraargs&gt;
                                      &lt;extraarg&gt;-xjc annox&lt;/extraarg&gt;
                                  &lt;/extraargs&gt;
                                  &lt;bindingFiles&gt;
                                      &lt;bindingFile&gt;${basedir}/src/main/resources/wsdl/binding.xml&lt;/bindingFile&gt;
                                  &lt;/bindingFiles&gt;
                              &lt;/wsdlOption&gt;
                          &lt;/wsdlOptions&gt;
                          &lt;plugins&gt;
                              &lt;plugin&gt;
                                  &lt;groupId&gt;org.jvnet.jaxb2_commons&lt;/groupId&gt;
                                  &lt;artifactId&gt;jaxb2-basics&lt;/artifactId&gt;
                                  &lt;version&gt;0.6.0&lt;/version&gt;
                              &lt;/plugin&gt;
                              &lt;plugin&gt;
                                  &lt;groupId&gt;org.jvnet.jaxb2_commons&lt;/groupId&gt;
                                  &lt;artifactId&gt;jaxb2-basics-annotate&lt;/artifactId&gt;
                                  &lt;version&gt;0.6.0&lt;/version&gt;
                              &lt;/plugin&gt;
                          &lt;/plugins&gt;
                      &lt;/configuration&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;wsdl2java&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>and this is my binding.xml</p>
  
  <pre><code>&lt;jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
  xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:annox="http://annox.dev.java.net"&gt;
  &lt;!-- &lt;jaxws:enableAsyncMapping&gt;true&lt;/jaxws:enableAsyncMapping&gt; --&gt;
  &lt;jaxws:enableWrapperStyle&gt;true&lt;/jaxws:enableWrapperStyle&gt;
  &lt;jaxws:bindings node="wsdl:definitions/wsdl:types/xs:schema"&gt;
      &lt;jxb:globalBindings&gt;
          &lt;jxb:javaType name="java.util.Date" xmlType="xs:dateTime"
              parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime"
              printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDateTime" /&gt;
          &lt;jxb:javaType name="java.util.Date" xmlType="xs:date"
              parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDate"
              printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDate" /&gt;
      &lt;/jxb:globalBindings&gt;
  
      &lt;jxb:bindings node="/xs:complexType"&gt;
          &lt;annox:annotate target="class"&gt;
              &lt;annox:annotate annox:class="javax.xml.bind.annotation.XmlRootElement"
                  name="GetRecordsType" /&gt;
          &lt;/annox:annotate&gt;
      &lt;/jxb:bindings&gt;
  &lt;/jaxws:bindings&gt;
  </code></pre>
  
  <p></p>