Raritan Computer CC-WSAPI-0B-v5.1.0-E Marine Radio User Manual


 
30
This section focuses on CC-SG specific topics regarding WS client
development in Java.
In This Chapter
Choose a WS Library .............................................................................. 30
Certificates information for Java users .................................................... 30
Setting the CCSG Address ...................................................................... 31
Calling a Web Service ............................................................................. 32
Sample Application for Java .................................................................... 32
Choose a WS Library
As of this writing, Java API for XML Web Services (JAX-WS) 2.1 is the
most recent specification for Java Web Services. Glassfish contains a
JAX-WS implementation under Metro which can be found at https://jax-
ws.dev.java.net/. This document is based on version 2.1.5, but you may
use a different version or an entirely different WS system to suit your
needs.
The Glassfish implementation includes a tool called wsimport that one
can use to generate WS client code for one's application using WSDL
files from the WS server. Such tools are invaluable in WS development.
Please consult the documentation of your chosen JAX-WS system for
details on wsimport, other tools, and non-CCSG related information.
Certificates information for Java users
Create a truststore for the trusted server certificate, or add the certificate
to a truststore you already use.
To tell a Java client about the trusted server certificate:
You can do this via -Djavax.net.ssl.trustStore=jssecacerts.
Save the client certificate from the CC-SG's WS client configuration
window. The file is in PKCS12 format. You can pass the client certificate
to a Java client using the following parameters:
-Djavax.net.ssl.keyStore=new_client.p12
-Djavax.net.ssl.keyStorePassword=pass (Where pass is the
password you entered in the client configuration page.)
-Djavax.net.ssl.keyStoreType=pkcs12
Appendix B
Web Services Development in Java