Versions Compared

Key

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

...

Panel

To generate java code using the uaws 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
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-antrun-plugin</artifactId>
    <executions>
        <execution>
            <id>generate java code from wsdl</id>
            <phase>generate-sources</phase>
            <configuration>
                <tasks>
                    <property name="service.wsdl" value="https://mapws-mit-edu.ezproxyberklee.flo.org/uaws/services/ua?wsdl"/>
                    <property name="server.truststore" value="/path/to/keystore/<the name of your Trused Servers keystore>.jks" />
                    <property name="client.keystore" value="/path/to/keystore/<the name of your application certificate keystore>.jks." />
                    <property name="compile_classpath" refid="maven.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>" />
                        <sysproperty key="javax.net.ssl.keyStoreType" value="jks"/>
                        <sysproperty key="javax.net.ssl.trustStore" value="${server.truststore}" />
                        <sysproperty key="javax.net.ssl.trustStorePassword" value="<trustStorePassword>" />
                        <sysproperty key="javax.net.ssl.trustStoreType" value="jks" />
                        <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>
  Where in the
indent
1
1
Where in the above:
indent
121
2
Replace {color:green}/path/to/keystore/<the name of your Trused Servers keystore>.jks{color} with the path to and name of the Trusted Servers keystore.
Replace {color:green}/path/to/keystore/<the name of your Trused Servers keystore>.jks{color} with the path to and name of the Applicaiton Certificate keystore.
Replace {color:green}<trustStorePassword>{color} with the password for your {color:green}<the name of your Trusted Servers keystore>{color}.jks.
Replace {color:green}<clientKeystorePassword>{color} with the password for your {color:green}<the name of your Application Certificate keystore>{color}.jks.

The above plug-in can be used to build the Java code from 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 moiraws web service from the DSPS Production servers, change the line:

indent
1
1
  
<property name="service.wsdl" value="https://mapws-mit-edu.ezproxyberklee.flo.org/uaws/services/ua?wsdl"/>

to:

   <property name="service.wsdl" value="https://mapws-mit-edu.ezproxyberklee.flo.org/moiraws/services/moira?wsdl"/>

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

...