Using Web Services Tools from JDK

<project>
  ...
  <build>
    ...
    <plugins>
      <plugin>
        <groupId>org.jvnet.jax-ws-commons</groupId>
        <artifactId>jaxws-maven-plugin</artifactId>
        <version>2.3</version>
        <executions>
          <execution>
            <id>wsgen-from-jdk</id>
            <goals>
              <goal>wsgen</goal>
            </goals>
            <configuration>
              <executable>${tool.wsgen}</executable>
              <sei>com.mycompany.MyService</sei>
              ...
            </configuration>
          </execution>
          <execution>
            <id>wsimport-from-jdk</id>
            <goals>
              <goal>wsimport</goal>
            </goals>
            <configuration>
              <executable>${tool.wsimport}</executable>
              <wsdlUrls>
                <wsdlUrl>http://example.org/sample.wsdl</wsdlUrl>
              </wsdlUrls>
              ...
            </configuration>
          </execution>
          ...
        </executions>
      </plugin>
      ...
    </plugins>
    ...
  <build>
  ...

  <!-- setup corresponding executables on win/*nix -->
  <profiles>
    <profile>
      <id>win</id>
      <activation>
        <os>
          <family>windows</family>
        </os>
      </activation>
      <properties>
        <tool.wsgen>${java.home}/../bin/wsgen.exe</tool.wsgen>
        <tool.wsimport>${java.home}/../bin/wsimport.exe</tool.wsimport>
      </properties>
    </profile>
    <profile>
      <id>nix</id>
      <activation>
        <os>
          <family>!windows</family>
        </os>
      </activation>
      <properties>
        <tool.wsgen>${java.home}/../bin/wsgen</tool.wsgen>
        <tool.wsimport>${java.home}/../bin/wsimport</tool.wsimport>
      </properties>
    </profile>
    ...
  </profiles>
</project>

Terms of Use; Privacy Policy; Copyright ©2013-2014 (revision 20131025.e7cbc9d)
 
 
Close
loading
Please Confirm
Close