hi the  community

i am face to an issue that get get me crazy.
i have a wsdl and need to generate the request class with the XmlRootElement
annotation.
first idea is to use xjc:simple but it renames the collection names with
plurials that bug dozer camel connector.

second idea is to generate the annotation.

here my pom plugin declration :

                        <plugin>
                                
                                <groupId>org.apache.cxf</groupId>
                                <artifactId>cxf-codegen-plugin</artifactId>

                                <version>2.7.8</version>
                                <executions>
                                        <execution>
                                                <id>generate-sources</id>
                                                <phase>generate-sources</phase>
                                                <configuration>
                                                        <wsdlOptions>
                                                                <wsdlOption>
                                                                
<wsdl>${basedir}/src/main/resources/wsdl/ManageProductInstalled.wsdl</wsdl>
                                                                        
<extraargs>
                                                                                
<extraarg>-xjc-Xcollection-setter-injector</extraarg>
                                                                                
<extraarg>-impl</extraarg>
                                                                                
<extraarg>-p</extraarg>
                                                                        
<extraarg>http://www.orange.com/SOA/Interfaces/ManageProductInstBase/Model=com.providersoap.model</extraarg>
                                                                                
<extraarg>-p</extraarg>
                                                                        
<extraarg>http://www.orange.com/Interfaces/ManageProductInstalledBase=com.providersoap.mediation</extraarg>
                                                                                
<extraarg>-p</extraarg>
                                                                        
<extraarg>http://www.orange.com/BIE_EB/Interfaces/ManageProductInstalled/v1/root=com.providersoap.service.eb</extraarg>
                                                                                
<extraarg>-p</extraarg>
                                                                        
<extraarg>http://www.orange.com/BIE_EB/Interfaces/ManageProductInstalled/v1=com.providersoap.service</extraarg>
                                                                                
<extraarg>-xjc-Xannotate</extraarg>
                                                                                
<extraarg>-b</extraarg>
                                                                        
<extraarg>${basedir}/src/main/resources/wsdl/jaxb-binding.xjb</extraarg>
                                                                                
<extraarg>-b</extraarg>
                                                                        
<extraarg>${basedir}/src/main/resources/jaxws-binding.xml</extraarg>
                                                                                
<extraarg>-exsh</extraarg>
                                                                                
<extraarg>true</extraarg>
                                                                                
<extraarg>-verbose</extraarg>
                                                                        
</extraargs>
                                                                </wsdlOption>
                                                        </wsdlOptions>
                                                </configuration>
                                                <goals>
                                                        <goal>wsdl2java</goal>
                                                </goals>
                                        </execution>

                                </executions>
                                <dependencies>
                                        <dependency>
                                                
<groupId>org.apache.cxf</groupId>
                                                
<artifactId>cxf-xjc-ts</artifactId>
                                                
<version>${cxf.version}</version>
                                        </dependency>
                                        <dependency>
                                                
<groupId>org.jvnet.jaxb2_commons</groupId>
                                                
<artifactId>jaxb2-basics-annotate</artifactId>
                                                <version>0.6.4</version>
                                        </dependency>
                                        <dependency>
                                                
<groupId>net.java.dev.vcc.thirdparty</groupId>
                                                
<artifactId>collection-setter-injector</artifactId>
                                                <version>0.5.0-1</version>
                                        </dependency>
                                </dependencies>
                        </plugin>

here my binding file :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<jaxws:bindings
wsdlLocation="ManageProductInstalledRTMandCFU_BIE_EB_1.0.wsdl"
        xmlns:jaxws="http://java.sun.com/xml/ns/jaxws";
        xmlns:jaxb="http://java.sun.com/xml/ns/jaxb";
    xmlns:xsd="http://www.w3.org/2001/XMLSchema";
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
   
xmlns:root="http://www.orange.com/Interfaces/ManageProductInstalled/v1/root";
    xmlns:annox="http://annox.dev.java.net";
    jaxb:extensionBindingPrefix="annox">
        
         <jaxws:enableWrapperStyle>true</jaxws:enableWrapperStyle>
         
<jaxws:bindings
node="wsdl:definitions/wsdl:types/xsd:schema/xsd:element[@name='DebitUsage']">
                        <jaxb:bindings 
node="//xsd:complexType[@name='DebitUsageMessage']">
                                        <annox:annotate target="class">
                                                <annox:annotate 
annox:class="javax.xml.bind.annotation.XmlRootElement"
                                                        name="DebitUsageMessage"
namespace="http://www.orange.com/BIE_EB/Interfaces/ManageProductInstalled/v1/root";
/>
                                        </annox:annotate>
            </jaxb:bindings>

         </jaxws:bindings>

</jaxws:bindings>

// the node selection seem correct as i can rename the target class here 

and that won t work why ? what i am missing ?


best regards 
bruno




--
View this message in context: 
http://cxf.547215.n5.nabble.com/cxf-codegen-annox-xmlrootelement-never-generated-tp5738097.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to