Skip to content

Commit

Permalink
Add wsdl and related xsds for wsman webservice
Browse files Browse the repository at this point in the history
Use local copies for schemas since original schemas are behind
http redirect, which wsdl2java cannot download.
  • Loading branch information
kcris committed Jan 7, 2016
1 parent e72984b commit 350b5ae
Show file tree
Hide file tree
Showing 12 changed files with 2,964 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

#generated files (cxf?)
/wsman-api/target/
/wsman-cli/target/
79 changes: 77 additions & 2 deletions wsman-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,83 @@
</dependency>
</dependencies>

<build>
<build>
<plugins>
<!-- use cxf to generate java webservice proxies from wsdl and related schemas -->
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/winRM.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- use cxf to generate java from xsd -->
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-xjc-plugin</artifactId>
<version>3.0.5</version>
<configuration>
<extensions>
<extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:3.0.5</extension>
</extensions>
</configuration>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>xsdtojava</goal>
</goals>
<configuration>
<sourceRoot>${project.build.directory}/generated-sources/cxf</sourceRoot>
<xsdOptions>
<xsdOption>
<xsd>${basedir}/src/main/resources/wsdl/schemas/schemas.dmtf.org/wbem/wsman/1/wsman.xsd</xsd>
<packagename>org.dmtf.schemas.wbem.wsman._1.wsman_xsd</packagename>
</xsdOption>
</xsdOptions>
</configuration>
</execution>
</executions>
</plugin>

<!-- additional jaxb/xjc processing is required to generate proxies for non-normative elements in our wsdl
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.13.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<extension>true</extension>
<bindingIncludes>
<include>src/main/resources/xjb/shell-bindings.xjb</include>
</bindingIncludes>
<strict>false</strict>
</configuration>
</plugin>-->

<!-- include cxf generated files in the project's compile phase -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand All @@ -54,7 +129,7 @@
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
Loading

0 comments on commit 350b5ae

Please sign in to comment.