Hi Maxim,

the other plugin did the trick....

Thanks Peter

Am 06.04.2018 um 09:47 schrieb Peter Dähn:
Hi Maxim,

thanks for your answer... We try to figure this out...

Greetings Peter

Am 05.04.2018 um 17:40 schrieb Maxim Solodovnik:
One class per method looks wrong to me :(
Maybe you can separate in by packages?

or ask us...@cxf.apache.org <mailto:us...@cxf.apache.org> mailing list?

or try another plugin? https://stackoverflow.com/questions/18338196/how-to-generate-classes-from-wsdl-using-maven-and-wsimport


On Thu, Apr 5, 2018 at 6:16 PM, Peter Dähn <da...@vcrp.de <mailto:da...@vcrp.de>> wrote:

    Hi there,

    We want to generate Java source files from wsdl files. Our pom.xml
    looks like that:

    [...]

    <plugin>

    <groupId>org.apache.cxf</groupId>

    <artifactId>cxf-codegen-plugin</artifactId>

    <version>2.7.5</version>

    <executions>

    <execution>

    <id>generate-sources</id>

    <phase>generate-sources</phase>

    <configuration>

<sourceRoot>${basedir}/src/main/java</sourceRoot>

    <wsdlOptions>

    <wsdlOption>

<wsdl>${project.basedir}/src/main/resources/wsdl/CalendarService.wsdl</wsdl>

    <extraargs>

    <extraarg>-client</extraarg>

    </extraargs>

    </wsdlOption>

    <wsdlOption>

<wsdl>${project.basedir}/src/main/resources/wsdl/RoomService.wsdl</wsdl>

    <extraargs>

    <extraarg>-client</extraarg>

    </extraargs>

    </wsdlOption>

    <wsdlOption>

<wsdl>${project.basedir}/src/main/resources/wsdl/UserService.wsdl</wsdl>

    <extraargs>

    <extraarg>-client</extraarg>

    </extraargs>

    </wsdlOption>

    </wsdlOptions>

    </configuration>

    <goals>

    <goal>wsdl2java</goal>

    </goals>

    </execution>

    </executions>

    </plugin>

    [...]

    Generating the code works fine but we get a flat file structure:

    So we get two files Kick.java. One from RoomWebService and the
    other from UserWebService. And the second overwrites the first so
    we get an error when calling the webservice from Java code.

    Do you have an example pom.xml which we can use to build the Java
    sources from wsdl files correctly?


    Greetings Peter





--
WBR
Maxim aka solomax

Reply via email to