Hi Dan,

thank you for your help, but if I try configure the pom like:
---------------------------------------
<plugin>
               <groupId>org.apache.cxf</groupId>
               <artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version> <!-- <cxf.version>2.2</cxf.version> -->
               <executions>
                   <execution>
                       <id>generate-sources</id>
                       <phase>generate-sources</phase>
<configuration> <plugins>
                            <plugin>
                             <groupId>org.jvnet.hyperjaxb3</groupId>
                             <artifactId>hyperjaxb3-ejb-plugin</artifactId>
                             <version>0.5.3</version>
</plugin> </plugins> <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot> <wsdlOptions>
                               <wsdlOption>
<wsdl>src/main/webapp/WEB-INF/wsdl/myService.wsdl</wsdl> <extraargs> <extraarg>-xjc-Xhyperjaxb3-ejb</extraarg>
                               </extraargs>
<bindingFiles> <bindingFile>${basedir}/src/main/resources/jaxb_binding.xml</bindingFile> </bindingFiles> </wsdlOption> </wsdlOptions> </configuration>
                       <goals>
                           <goal>wsdl2java</goal>
                       </goals>
                   </execution>
               </executions>
           </plugin>
-----------------------------------------------
I get the following error:

[INFO] XJC reported 'BadCommandLineException' for -xjc argument:-extension -Xhyperjaxb3-ejb
avaliable plugin options:
 -Xlocator          :  enable source location support for generated code
-Xsync-methods : generate accessor methods with the 'synchronized' keyword -mark-generated : mark the generated code as @javax.annotation.Generated
 -episode <FILE>    :  generate the episode file for separate compilation
unrecognized parameter -Xhyperjaxb3-ejb


what's wrong configured?

I also tried to configue the use of hyberjaxb3 in the bindingfile(jaxb_binding.xml):

<jaxb:bindings version="2.1"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"; xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"; xmlns:hj3="http://hyperjaxb3.jvnet.org/ejb/schemas/customizations";
             xmlns:orm="http://java.sun.com/xml/ns/persistence/orm";
             jaxb:extensionBindingPrefixes="xjc hj orm">

<jaxb:bindings schemaLocation="file:/C:/eclipse-3.4.2/eclipse/workspace/MyProject/src/main/webapp/WEB-INF/wsdl/mySchema.xsd" node="/xsd:schema">

 <jaxb:bindings node="/xsd:schema/xsd:complexty...@name='myDefinedType']">
           <hj3:entity>
               <orm:table name="test"/>
           </hj3:entity>
 </jaxb:bindings>
 </jaxb:bindings>
</jaxb:bindings>

but here I get the error:
[INFO] Thrown by JAXB : Unsupported binding namespace "http://hyperjaxb3.jvnet.org/ejb/schemas/customizations";. Perhaps you meant "http://java.sun.com/xml/ns/jaxb/xjc";?


sorry, I'm new in this topic.
Thanks
Anne

-----------------------
Daniel Kulp schrieb:
You should just be able to use the hyperjaxb3 xjc plugin with the cxf-codegen-
plugin to accomplish this.   Basically, where you configure the cxf-codegen-
plugin, add a dependency on the hyperjaxb jar ( org.jvnet.hyperjaxb3:hyperjaxb3-ejb-plugin) and then add the -xjc-Xhyperjaxb3- ejb flags to the configuration to cause wsdl2java to invoke that plugin when it calls into jaxb. That should just work.

Dan


On Thu June 4 2009 12:48:48 pm Anne Kümpel wrote:
Hi,

I'm using cxf  with the maven cxf-codegen-plugin (goal:wsdl2java). I
like to use the generated Java classes as JPA persistence entities. So,
I can decorate them with the JPA annotations, but this means I have to
write in the generated classes (and I have to renew it when the wsdl
changes). Is there any possibility to generate the JPA annotation
automatically (like Hyperjaxb3 does) ?

thanks a lot for help
anne


Reply via email to