users@jaxb2-commons.java.net

Generate service port implements user interface

From: Grégoire Rolland <grolland.jspirit_at_gmail.com>
Date: Wed, 12 Feb 2014 18:51:46 +0100

Hello,

I'm trying to use JAXB 2 Basic plugin to generate a web service client from
wsdl.

I'm using this jaxws bindings for my wsdl :

<jaxws:bindings wsdlLocation="NOEEBulletinOption.wsdl" xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xs="
http://www.w3.org/2001/XMLSchema"
    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:jaxws="
http://java.sun.com/xml/ns/jaxws"
    xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
    xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance"
      jaxws:extensionBindingPrefixes="xjc"
    version="2.1">

    <jaxws:bindings node="wsdl:definitions">
        <jaxws:package name="noee.bo.service" />
    </jaxws:bindings>

    <jaxws:bindings node="wsdl:definitions/wsdl:portType">

<inheritance:implements>fr.s2e.web.services.facades.newnoee.NewNoeeService</inheritance:implements>
    </jaxws:bindings>

</jaxws:bindings>

I'm using the plugin with maven (3.0.4) and CXF 2.5.2, here is an extract
of the pom :

<plugin>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-codegen-plugin</artifactId>
    <version>2.5.2</version>
    <executions>
        <execution>
            <id>generate-sources</id>
            <phase>generate-sources</phase>
            <configuration>
                <fork>true</fork>

<sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
                <wsdlOptions>
                    <wsdlOption>

<wsdl>${basedir}/src/main/resources/wsdl/bo/NOEEBulletinOption.wsdl</wsdl>
                        <bindingFiles>

<bindingFile>${basedir}/src/main/resources/wsdl/bo/jaxb-bindings.xml</bindingFile>

<bindingFile>${basedir}/src/main/resources/wsdl/bo/jaxws-bindings.xml</bindingFile>
                        </bindingFiles>
                        <extraargs>
                            <extraarg>-client</extraarg>
                            <extraarg>-xjc-Xinheritance</extraarg>
                        </extraargs>
                    </wsdlOption>
                </wsdlOptions>
            </configuration>
            <goals>
                <goal>wsdl2java</goal>
            </goals>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>org.jvnet.jaxb2_commons</groupId>
            <artifactId>jaxb2-basics</artifactId>
            <version>0.6.5</version>
        </dependency>
    </dependencies>
</plugin>

But, unfortunaly, the service interface generated don't implements
fr.s2e.web.services.facades.newnoee.NewNoeeService.

Is there an issue ?

Best Regards,
Grégoire Rolland