Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

1. The pom.xml configuration

Panel
Wiki Markup

To generate java code using the *moiraws* web service WSDL, use the Maven {color:blue}maven-antrun-plugin{color} and place following xml statements within your Maven project's pom.xml.

You must also create the system environment variable
\\
\\
You must also create the system environment variable JAVA_KEYSTORE_PATH and have it point to the directory that contains your application certificate keystore and your trusted server keystore.

Code Block
\\
\\
{code}
    <properties>
        <service.wsdl>https://ws-dev.mit.edu/moiraws/services/moira?wsdl</service.wsdl>
        <server.truststore>${env.JAVA_KEYSTORE_PATH}/myServerTrustStore.jks</server.truststore>
        <server.truststore.password>truststorePassword</server.truststore.password>
        <server.truststore.type>jks</server.truststore.type>
        <client.keystore>${env.JAVA_KEYSTORE_PATH}/myApplicationCertificateKeystore.jks</client.keystore>
        <client.keystore.password>keystorePassword</client.keystore.password>
        <client.keystore.type>jks</client.keystore.type>
    </properties>
       .
       .
       .
    <build>
       .
       .
       .
       <plugins>
           <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-antrun-plugin</artifactId>
               <executions>
                   <execution>
                       <id>generate java code for moira wsdl</id>
                       <phase>generate-sources</phase>
                       <configuration>
                           <tasks>
                               <property name="compile_classpath" refid="maven.compile.classpath" />
                               <echo message="service.wsdl ${service.wsdl}" />
                               <echo message="compile classpath: ${compile_classpath}" />
                               <java classname="org.apache.axis.wsdl.WSDL2Java" fork="true" classpathref="maven.compile.classpath" dir="src/main/java">
                                    <sysproperty key="javax.net.ssl.keyStore" value="${client.keystore}" />
                                    <sysproperty key="javax.net.ssl.keyStorePassword" value="${client.keystore.password}" />
                                    <sysproperty key="javax.net.ssl.keyStoreType" value="${client.keystore.type}" />
                                    <sysproperty key="javax.net.ssl.trustStore" value="${server.truststore}" />
                                    <sysproperty key="javax.net.ssl.trustStorePassword" value="${server.truststore.password}" />
                                    <sysproperty key="javax.net.ssl.trustStoreType" value="${server.truststore.type}" />
                                    <arg value="-v" />
                                    <arg value="-o${basedir}/src/main/java" />
                                    <arg value="${service.wsdl}" />
                               </java>
                           </tasks>
                       </configuration>
                       <goals>
                           <goal>run</goal>
                       </goals>
                   </execution>
               <executions>
           </plugin>
       </plugins>
       .
       .
       .
    <build>
        {code}
In the
above:
    Replace
 above:\\
\\
&nbsp;&nbsp;&nbsp;&nbsp;Replace {color:green}myServerTrustStore.jks{color} with the name of your Trusted Servers
keystore.
    Replace
 keystore.\\
&nbsp;&nbsp;&nbsp;&nbsp;Replace {color:green}myApplicationCertificateKeystore.jks{color} with the name of your Applicaiton Certificate
keystore.
    Replace truststorePassword with the password for your Trusted Servers keystore jks.
    Replace keystorePassword with the password for your Application Certificate keystore jks.
The above plug-in can be used to build the Java code for any of the DSPS supported web services. You only have to replace the property value of service.wsdl with any of the URL's shown below.
For example, if you wish to build the Java code for the uaws web service from the DSPS Production servers, change the line:
    <property
 keystore.\\
&nbsp;&nbsp;&nbsp;&nbsp;Replace {color:green}truststorePassword{color} with the password for your Trusted Servers keystore jks.\\
&nbsp;&nbsp;&nbsp;&nbsp;Replace {color:green}keystorePassword{color} with the password for your Application Certificate keystore jks.\\
\\
The above plug-in can be used to build the Java code for any of the DSPS supported web services.  You only have to replace the property value of *service.wsdl* with any of the URL's shown below.\\
\\
For example, if you wish to build the Java code for the uaws web service from the DSPS Production servers, change the line:\\
\\
&nbsp;&nbsp;&nbsp;&nbsp;<property name="service.wsdl" value="https://ws.mit.edu/moiraws/services/moira?wsdl"/>

to:
    <property
\\
\\
to:\\
\\
&nbsp;&nbsp;&nbsp;&nbsp;<property name="service.wsdl" value="https://ws.mit.edu/uaws/services/ua?wsdl"/>

\\
\\
Note: with the above plug-in configuration, maven will generate java code during generate-source phase.\\
Panel

The following are the web service wsdl's that are currently available:

indent
*Testing Servers:*\\
indent
2
2
* https://ws-test.mit.edu/geows/services/geo?wsdl
* https://ws-test.mit.edu/mitidws/services/mitid?wsdl
* https://ws-test.mit.edu/moiraws/services/moira?wsdl
* https://ws-test.mit.edu/uaws/services/ua?wsdl
indent
*Staging Servers:*\\
indent
2
2
* https://ws-stage.mit.edu/geows/services/geo?wsdl
* https://ws-stage.mit.edu/mitidws/services/mitid?wsdl
* https://ws-stage.mit.edu/moiraws/services/moira?wsdl
* https://ws-stage.mit.edu/uaws/services/ua?wsdl
indent
*Production servers:*
indent
2
2
* https://geows.mit.edu/geows/services/geo?wsdl
* https://mitidws.mit.edu/mitidws/services/mitid?wsdl
* https://moiraws.mit.edu/moiraws/services/moira?wsdl
* https://uaws.mit.edu/uaws/services/ua?wsdl