uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

Appendix A.1 Installing an upgraded version

The SOAP application development support function, SOAP Communication Infrastructure, JAX-WS functionality, and JAX-RS functionality are installed when installing Cosminexus.

This subsection describes the procedure and precautions for installing an upgraded version on a machine that has an earlier version installed.

Organization of this subsection
(1) Migrating a J2EE server
(2) Un-deploying a Web Service
(3) Switching the operating environment
(4) 08-70 are upgraded to 09-00 or later

(1) Migrating a J2EE server

You install an upgraded version of Cosminexus in accordance with the migration procedure described in 10.3 Migration procedure of Application Server in the uCosminexus Application Server Maintenance and Migration Guide (in the case of update installation) or 3.9.2 Migration procedure of Application Server in the uCosminexus Application Server Maintenance and Migration Guide.

If you install an upgraded version, the settings are such that SOAP application development support function and the SOAP Communication Infrastructure are used.

(2) Un-deploying a Web Service

When you migrate a Web Service (or a SOAP application), first un-deploy the Web Service (or the SOAP application) deployed on the J2EE server.

(3) Switching the operating environment

The switching of the SOAP application development support function, SOAP Communication Infrastructure, JAX-WS engine, and the JAX-RS engine is defined in the option definition file for J2EE servers. This subsection describes the specified contents and the specification method of the option definition file for J2EE servers.

For details on the option definition file for J2EE servers, see 2.3 usrconf.cfg (Option definition file for J2EE servers) in the manual uCosminexus Application Server Definition Reference Guide.

Notes
You specify the settings so as to avoid the inconsistency in the lines to be enabled and disabled. For example, the operations might not function properly if all the lines hitsaaj.jar, cjjaxws.jar, and cjjaxrs.jar are removed or added.

The methods of editing the option definition file for J2EE servers are as follows:

In both the described methods, restart the J2EE server after editing (storing) the option definition file for the J2EE server. If the J2EE server is not restarted, the edited contents are not applied.

(a) Directly editing the option definition file for J2EE servers

To directly edit the file, open the option definition file for a J2EE server stored in the following location, in a text editor and change the contents:

Cosminexus-installation-directory/ CC/ server/ usrconf/ ejb/ J2EE-server-name/ usrconf.cfg

(b) When using the management portal of Management Server

When using the management portal of Management Server, you specify the settings using the extension parameters of the J2EE container settings window.

The following figure describes an example for specifying the settings with the JAX-WS and JAX-RS engines.

Figure A-1 Example of settings with the JAX-WS and JAX-RS engines when using the management portal

[Figure]

The following figure shows an example for specifying the settings when using the SOAP application development support function and SOAP Communication Infrastructure.

Figure A-2 Example of settings for the SOAP application development support function and SOAP Communication Infrastructure when using the management portal

[Figure]

For details on setting the J2EE container window of the management portal, see the section 10.9.2 J2EE container settings in the uCosminexus Application Server Management Portal User Guide.

(c) When the Smart Composer functionality is used

When you use the Smart Composer functionality, the option definition file for J2EE servers is added as an extension parameter of J2EE in the Easy Setup definition file. For details on the Smart Composer functionality, see the uCosminexus Application Server System Setup and Operation Guide. For details on the Easy Setup definition file, see Chapter 4 Files Used in the Smart Composer functionality in the uCosminexus Application Server Definition Reference Guide.

The following example describes the settings when using the JAX-WS and JAX-RS engines:

<param>
 <param-name>add.class.path</ param-name>
 <param-value>&lt;cosminexus.home&gt;\jaxws\lib\cjjaxws.jar</ param-value>
</ param>
<param>
 <param-name>add.class.path</param-name>
 <param-value>&lt;cosminexus.home&gt;\jaxrs\lib\cjjaxrs.jar</param-value>
</param>

The following is an example of setup when the SOAP application development support function and SOAP Communication Infrastructure are used:

<param>
 <param-name>add.class.path</ param-name>
 <param-value>&lt;cosminexus.home&gt;\c4web\lib\hitsaaj.jar</ param-value>
</ param>

(4) 08-70 are upgraded to 09-00 or later

This subsection describes the notes for upgrading from 08-00 through 08-70 and installing Cosminexus 09-00 or later.

(a) Verifying host name in an SSL connection

Hostname Verification in an SSL connection differs in 08-00 through 08-70 and in 09-00 or later.

08-00 through 08-70
When connecting from a Web Service client to an SSL protocol-compliant Web Service, whether the host name included in the endpoint address matches with the authorized host name is not verified.

09-00 or later
When connecting from a Web Service client to an SSL protocol-compliant Web Service, whether the host name included in the endpoint address matches with the authorized host name is verified. HostnameVerifier to be used is a part of the default implementation of JDK. For details on the operations of default HostnameVerifier of JDK, see the JDK documentation.
Specify true in the com.cosminexus.xml.ws.client.http.HostnameVerificationProperty property to disable the verification of the host names in 09-00 or later in the same way as in 08-00 through 08-70.
(b) Mapping from a fault through an exception class

When you execute the cjwsimport command, a WSDL fault is mapped to a Java type according to the JAX-WS 2.2 specifications. In such cases, the conditions for creating the wrapper exception class differ in 08-00 through 08-70 and in 09-00 or later.

08-00 through 08-70
When the corresponding wsdl:fault element is defined for the child element of the wsdl:binding and wsdl:portType elements, the wrapper class is generated. If the wsdl:fault element is defined for any one of the wsdl:binding and wsdl:portType elements, the wrapper class is not generated.

09-00 or later
When the wsdl:fault element is defined for the child element of the wsdl:portType element, the wrapper class is generated. You need not define the corresponding wsdl:fault element as the child element of the wsdl:binding element.
(c) Operation of the Javax.activation.DataHandler object

The operation of the javax.activation.DataHandler object differs in 08-00 to 08-70 and 09-00 or later.

08-00 to 08-70
When the data received in the attachment of the wsi: swaRef format or MTOM/XOP specifications format is the javax.activation.DataHandler object, import all the data from the input stream.

09-00 or later
When the data received in the attachment of the wsi: swaRef format or the MTOM/XOP specification format is the the javax.activation.DataHandler object, sequentially import the data from the input stream.
Because the receiving process does not complete at the receiver side of the attachment in the wsi: swaRef format or the MTOM/XOP specification format unless all the data is imported from the input stream contained in the javax.activation.DataHandler object, the sending process at sender side waits until the receiving process completes at the receiving side.
To eliminate this state, you must either import all the data from the java.io.InputStream object contained in the javax.activation.DataHandler object, or export the imported stream data to the output stream by using writeTo(java.io.OutputStream) method of the javax.activation.DataHandler class.
(d) Operation of the javax.xml.transform.Source object

The operation of the javax.xml.transform.Source object differs in 08-00 to 08-70 and 09-00 or later.

08-00 to 08-70
When the data received in the attachment of MTOM/XOP specification format is the javax.xml.transform.Source object, import all the data from the input stream.

09-00 or later
When the data received in the attachment of MTOM/XOP format is the javax.xml.transform.Source object, sequentially import the data from the input stream. The JAXB converts the javax.xml.transform.Source object into javax.xml.transform.stream.StreamSource object.
Because the receiving process does not complete at the receiving side of attachment in the MTOM/XOP specification format unless all the data is imported from the input stream contained in the javax.xml.transform.stream.StreamSource object, the sending process at the sender side waits until the receiving process completes at the receiving side.
To eliminate this state, you must import all the data from the java.io.Reader object contained in the javax.xml.transform.stream.StreamSource object.
(e) Differences in operation when apt command is used

When the apt command is used while combining all the following conditions, the operations differ in 08 to 08-70 and 09-00 or later.

08-00 to 08-70
The error message is output in the standard error output and log, and the process ends (KDJW61093-E).

09-00 or later
The process successfully ends.

The examples of implementation are as follows.

Parent Web Services Implementation Class

@WebService
@SOAPBinding(style=SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL, 
 parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
public class AddNumbersParentImpl {
    ...
    @WebMethod
    public int addNumbers1(int number1, int number2) {
 ...
    }
    public int addNumbers2(int number1, int number2) {
 ...
    }
}

Child Web Services Implementation Class

@WebService
@SOAPBinding(style=SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL, 
 parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
public class AddNumbersChildImpl extends AddNumbersParentImpl {
 ...
    @WebMethod(exclude=true)
    public int addNumbers1(int number1, int number2) {
 ...
    }
}
(f) Differences in run time operation at service side when the addressing functionality is used

When the addressing functionality is used and when all the following conditions are combined, the run time operations at the service side differ in 08-50 to 08-70 and 09-00 or later.

08-50 to 08-70
Returns HTTP Status Code: 202

09-00 or later
Returns HTTP Status Code: 500.