Skip to main content

wsgen & maven : how to ?

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
srhngsn
Offline
Joined: 2012-01-26

I'm trying to use wsgen to generate client artifacts from an annotated class endpoint.

I have the following config in my pom.xml :

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jaxws-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>wsgen</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sei>fr.extelia.ibabi.ws.convergence.impl.ServiceWSConvergence</sei>
                    <keep>true</keep>
                    <verbose>true</verbose>
                    <sourceDestDir>target/generated-sources/artifacts</sourceDestDir>
                    <packageName>fr.extelia.ibabi.ws.convergence.stub</packageName>
                </configuration>
                <dependencies>
                <dependency>
                    <groupId>javax.jws</groupId>
                    <artifactId>jsr181-api</artifactId>
                    <version>1.0-MR1</version>
                </dependency>
                    <dependency>
                        <groupId>com.sun.xml.ws</groupId>
                        <artifactId>jaxws-rt</artifactId>
                        <version>2.2.5</version>
                    </dependency>
                </dependencies>
            </plugin>

The build fails with the dreaded "Could not find class file for fr.extelia.ibabi.ws.convergence.impl.ServiceWSConvergence"

Trying a command line generation as below yeilds the same error :

C:\wsgen -cp C:\workspace\ibabi\trunk\ibabi-ws\ibabi-ws-service\target\classes -keep -s C:/workspace/ibabi/trunk/ibabi-ws/ibabi-ws-service/target/generated-sources/artifacts fr.extelia.ibabi.ws.convergence.impl.ServiceWSConvergence

PS : specifying the classes folder in the classpath gets me the furthest in command line as putting the src folder instead just results in an input error.

I'd really appreciate any help on this one. Spent a whole day searching for the solution and it seems like a load of people are stumped by this.

Thanks