0

When i try to Compile my program. I get the following error message:

Failed to execute goal org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.2:wsgen (generate-wsdl) on project SimpleWebServices: Error executing: wsgen [-keep, -s, etc..........

So, I begin poking around and further up the error, I see this:

Class not found: "com.test.ws.services.SimpleServiceImpl"

It would appear that for some reason, the WSGEN cannot find my value. Does anyone have any ideas?

Here's my POM if interested...

        <plugin>
            <groupId>org.jvnet.jax-ws-commons</groupId>
            <artifactId>jaxws-maven-plugin</artifactId>
            <version>2.2</version>
            <executions>
                <execution>
                    <id>generate-wsdl</id>
                    <phase>process-classes</phase>
                    <goals>
                        <goal>wsgen</goal>
                    </goals>
                    <configuration>
                        <sei>com.test.ws.services.SimpleServiceImpl</sei>
                        <genWsdl>true</genWsdl>
                        <verbose>true</verbose>
                    </configuration>
                </execution>
            </executions>
        </plugin>

User Edit: I think i got it (based on @Thomas suggestion). It appears that I didn't specify the source folder in the POM Build area. Resulting in my source not being compiled.

Adding:

<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>

Did the trick for me.

@Thomas if you post your answer, I'd be happy to give you answer credit.

Thanks for your reply,

n00bish
  • 35
  • 1
  • 5
  • 1
    Looks like a classpath issue, do you have the package that contains SimpleServiceImpl included? – Thomas Mar 23 '12 at 19:07
  • You mean that `SimpleServiceImpl` is also generated (because `${project.basedir}` is `target/` dir)? – dma_k Mar 25 '12 at 14:46
  • None of my code was being compiled(Which i didn't notice at first). So within the POM, I specified the sourceDirectory. This seemed then include my source in the compile and the rest was history.... – n00bish Mar 26 '12 at 14:47
  • curious enough that definition of `` solved it, since the path `${project.basedir}/src/main/java` is the default path. – childno͡.de Jul 17 '15 at 13:21

1 Answers1

1

just use

mvn clean compile jaxws:wsgen

instead of

mvn clean jaxws:wsgen

the problem is, that there is no compiled version available. wsgen will work for classpaths like JARs with ByteCode.

sourceDirectory ${project.basedir}/src/main/java is maven default, so you doesn't have to set it necessarily.

childno͡.de
  • 4,679
  • 4
  • 31
  • 57