Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

To generate java code using the moiraws web service WSDL, use the Maven maven-antrun-plugin and place following xml statements within the <plugins> element of the Maven project's pom.xml:

Code Block
    <properties>
        <moira.wsdl>https://ws-dev.mit.edu/moiraws/services/moira?wsdl</service.wsdl>
        <server.truststore>${env.JAVA_KEYSTORES}/serverTrustStore.jks</server.truststore>
        <server.truststore.password>changeit</server.truststore.password>
        <server.truststore.type>jks</server.truststore.type>
        <client.keystore>${env.JAVA_KEYSTORES}/mapping.app.mit.edu.jks</client.keystore>
        <client.keystore.password>changeit</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 frommoira wsdl</id>
                       <phase>generate-sources</phase>
                       <configuration>
                <tasks>
           <tasks>
         <property name="service.wsdl" value="https://mapws.mit.edu/moiraws/services/moira?wsdl"/>
                    <property name="server.truststorecompile_classpath" value="/path/to/keystore/<the name of your Trused Servers keystore>.jks" />
refid="maven.compile.classpath" />
                               <property<echo namemessage="client.keystore" value="/path/to/keystore/<the name of your application certificate keystore>.jks." />
moira.wsdl ${moira.wsdl}" />
                               <property<echo namemessage="compile_ classpath" refid="maven.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="<clientKeystorePassword>${client.keystore.password}" />
                                    <sysproperty key="javax.net.ssl.keyStoreType" value="jks"${client.keystore.type}" />
                                    <sysproperty key="javax.net.ssl.trustStore" value="${server.truststore}" />
                                    <sysproperty key="javax.net.ssl.trustStorePassword" value="<trustStorePassword>${server.truststore.password}" />
                                    <sysproperty key="javax.net.ssl.trustStoreType" value="jks${server.truststore.type}" />
                                    <arg value="-v" />
                                    <arg value="-o${basedir}/src/main/java" />
                                    <arg value="${servicemoira.wsdl}" />
                               </java>
                           </tasks>
                       </configuration>
                       <goals>
                           <goal>run</goal>
                       </goals>
                   </execution>
               <executions>
           </executions>
</plugin>
plugin>
       </plugins>
       .
       .
       .
    <build>
        

  Where in the above:

     Replace /path/to/keystore/<the name of your Trused Servers keystore>.jks with the path to and name of the Trusted Servers keystore.
     Replace /path/to/keystore/<the name of your Trused Servers keystore>.jks with the path to and name of the Applicaiton Certificate keystore.
     Replace <trustStorePassword> with the password for your <the name of your Trusted Servers keystore>.jks.
     Replace <clientKeystorePassword> with the password for your <the name of your Application Certificate keystore>.jks.

The above plug-in can be used to build the Java code for any of the ISDA 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 name="service.wsdl" value="https://mapws.mit.edu/moiraws/services/moira?wsdl"/>

to:

   <property name="service.wsdl" value="https://mapws.mit.edu/uaws/services/ua?wsdl"/>

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

...