Use wsdlLocation as a path prefix for multiple WSDL URLs

<project>
  ...
  <dependencies>
      ...
    <dependency>
      <groupId>com.sun.xml.ws</groupId>
      <artifactId>jaxws-rt</artifactId>
      <version>2.2.8</version>
    </dependency>
    ...
  </dependencies>
  ...
  <build>
    ...
    <plugins>
      <plugin>
        <groupId>org.jvnet.jax-ws-commons</groupId>
        <artifactId>jaxws-maven-plugin</artifactId>
        <version>2.3</version>
        <executions>
          <execution>
            <goals>
              <goal>wsimport</goal>
            </goals>
            <!-- Following configuration will invoke wsimport once for each wsdl. -->
            <configuration>
              <wsdlLocation>http://example.com/mywebservices/*</wsdlLocation>
              <wsdlDirectory>src/mywsdls</wsdlDirectory>
              <wsdlFiles>
                <wsdlFile>a.wsdl</wsdlFile>                         <!-- produces wsdlLocation = http://example.com/mywebservices/a.wsdl -->
                <wsdlFile>b/b.wsdl</wsdlFile>                       <!-- produces wsdlLocation = http://example.com/mywebservices/b/b.wsdl -->
                <wsdlFile>${basedir}/src/mywsdls/c.wsdl</wsdlFile>  <!-- produces wsdlLocation = /path/to/basedir/src/mywsdls/c.wsdl -->
              </wsdlFiles>
            </configuration>
          </execution>
        </executions>
      </plugin>
      ...
    </plugins>
    ...
  <build>
  ...
</project>

Terms of Use; Privacy Policy; Copyright ©2013-2014 (revision 20140418.2d69abc)
 
 
Close
loading
Please Confirm
Close