Soap confusion with maven

52 views Asked by At

I've done the following:

  • Generated a SOAP request and received a response
  • Added the jaxws-maven-plugin maven plugin - and generated some .class files in my target directory

So the question is what do I do next - I assume I somehow would like to bind my SOAPResponse to my .class files but I'm not sure what to do.

How does my java class access the .class files - it doesn't seem to know about them.

1

There are 1 answers

2
Rudi Angela On

are you generating a server or a client? What do you mean with 'generated a soap request and received a response'? To receive a response you have to send a request to some server, so apparently you are creating a client? Supposing you have configured your pom to generate the sources for you in

${project.build.directory}/generated-sources/java/ 

then you should also include the maven add-source plugin to add the generated source directory to source directories as maven sees them at build time:

    <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.7</version>
        <executions>
            <execution>
                <id>add-source</id>
                <phase>generate-sources</phase>
                <goals>
                    <goal>add-source</goal>
                </goals>
                <configuration>
                    <sources>
                        <source>${project.build.directory}/generated-sources/java/</source>
                    </sources>
                </configuration>
            </execution>
        </executions>
     </plugin>