Create a Webservice Client using Maven ws-import Plugin


/ Published in: XML
Save to your folder(s)

Use this if you need Maven to automatically create a SOAP client for you.


Copy this code and paste it in your HTML
  1. <!-- Build Settings -->
  2. <build>
  3. <finalName>${rootArtifactId}-webservice-client</finalName>
  4. <plugins>
  5. <plugin>
  6. <artifactId>maven-compiler-plugin</artifactId>
  7. <configuration>
  8. <source>1.5</source>
  9. <target>1.5</target>
  10. <encoding>UTF-8</encoding>
  11. </configuration>
  12. </plugin>
  13. <plugin>
  14. <artifactId>maven-resources-plugin</artifactId>
  15. <configuration>
  16. <encoding>UTF-8</encoding>
  17. </configuration>
  18. </plugin>
  19. <plugin>
  20. <groupId>org.codehaus.mojo</groupId>
  21. <artifactId>jaxws-maven-plugin</artifactId>
  22. <version>1.10</version>
  23. <executions>
  24. <execution>
  25. <goals>
  26. <goal>wsimport</goal>
  27. </goals>
  28. <configuration>
  29. <wsdlUrls>
  30. <wsdlUrl>${basedir}/../WebService/target/jaxws/wsgen/wsdl/WebService.wsdl</wsdlUrl>
  31. </wsdlUrls>
  32. <packageName>${package}.ws.client</packageName>
  33. <sourceDestDir>${basedir}/src/main/java</sourceDestDir>
  34. <destDir>${basedir}/target/jaxws</destDir>
  35. </configuration>
  36. </execution>
  37. </executions>
  38. </plugin>
  39. </plugins>
  40. </build>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.