uCosminexus Application Server, Web Service Development Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Glossary]](FIGURE/GLOSS.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
(1) Operations and support range of the JAX-WS engine on the Web Service
This point describes operations of the JAX-WS engine on the Web Service and shows the support range of the Web Service client that uses the Web Service.
(a) JAX-WS engine operations on the Web Service
The JAX-WS engine on the Web Service operates with the following procedure:
- Receives the SOAP request message using the POST HTTP method from the Web Service client, un-marshals the message, and converts it into a Java object.
- Discovers the target Web Service Implementation Class or the Provider Implementation Class (discovery) and invokes the method corresponding to the operation (dispatch).
- Receives the Java object expressing the SOAP response message and fault message from the target Web Service Implementation Class or the Provider Implementation Class, marshals the object, and returns it to the invocation source as a SOAP response message or fault message.
For discovery and dispatch, see 10.2.2 Discovery and dispatch.
Also, if the JAX-WS engine at the Web Service machine uses the HTTP GET method to request a WSDL that is the Meta data of the Web Service, and the WSDL does not exist in the WAR file, the WSDL will be automatically generated and returned. For issuing the Meta data, see 10.6 Issuing the Meta data.
Note that if the JAX-WS engine on the Web Service is invoked using an HTTP method that is neither POST nor GET, the HTTP status code 405 Method Not Allowed is returned.
This section describes the relationship of the JAX-WS engine on the Web Service and the Web Service client.
For a Web Service Implementation Class
The following figure shows the relationship between a JAX-WS engine on the Web Service machine and a Web Service client, in the case of a Web Service Implementation Class:
Figure 10-1 Relationship of the JAX-WS engine on the Web Service and the Web Service client (For a Web Service Implementation Class)
![[Figure]](FIGURE/ZU090100.GIF)
The messages that can be received by the JAX-WS engine on the Web Service and the conditions of the Web Service client at the connection source are as follows:
- Web Service client operated using the Cosminexus JAX-WS functionality
The Web Service client developed using the commands provided in the Cosminexus JAX-WS functionality and operated using the Cosminexus JAX-WS functionality can be used. If the Cosminexus JAX-WS functionality at the connection destination has an earlier version, you can only use the functionality that is supported by that version.
- RPC-type SOAP application client operated using the SOAP Communication Infrastructure
The RPC-type SOAP application client developed using the SOAP application development support function and operated using the SOAP Communication Infrastructure can be used.
The version of SOAP application development support function and SOAP Communication Infrastructure used for development must be 07-10 or a later version. Also, the Web Service in this case must be developed starting from a document/literal-type WSDL generated using the Java2WSDL command of the SOAP Communication Infrastructure.
- Other Web Service clients
You can use a Web Service client that supports the Meta data (WSDL) issued by the Web Service operated using the Cosminexus JAX-WS functionality and can send and receive SOAP Messages of any of the following specifications# with applied WS-I Basic Profile 1.1 and Attachments Profile 1.0:
- SOAP 1.1 specifications
- SOAP 1.2 specifications
- SwA specifications (when using attachments in wsi:swaRef format)
- MTOM/XOP specifications (when using attachments in the MTOM/XOP specification format).
For the WSDL support range, see 20.1 Support range of the WSDL 1.1 specifications.
- #
- From the nature of standard specifications, some ambiguous parts still remain even within the SOAP 1.1 specifications, SOAP 1.2 specifications, SwA specifications or MTOM/XOP specifications having the WS-I Basic Profile 1.1 and the Attachments Profile 1.0. Therefore, perform the operations after studying interconnectivity properly.
For a Provider Implementation Class
The following figure shows the relationship between a JAX-WS engine at the Web Service machine and a Web Service client, in the case of a Provider Implementation Class:
Figure 10-2 Relationship between a JAX-WS engine at the Web service machine and the Web Service client (For a Provider Implementation Class)
![[Figure]](FIGURE/ZU090200.GIF)
The following are the messages that the JAX-WS engine can receive at the Web Service machine and the conditions for the Web Service client at the connection source machine:
- A Web Service client operating with the Cosminexus JAX-WS functionality
You can use a Web Service client that is developed using the APIs provided by the Cosminexus JAX-WS functionality and operated using the Cosminexus JAX-WS functionality. If the Cosminexus JAX-WS functionality at the connection destination machine has an earlier version, you can only use the functionality that is supported by that version.
- A dispatch-based Web Service client operating with the Cosminexus JAX-WS functionality
- A SOAP application client using the SAAJ 1.2 specifications
You can use a SOAP application client that is developed using the SOAP application development support functionality and operated with the SOAP Communication Infrastructure using the SAAJ 1.2 specifications.
The SOAP application development support function used during the development and the SOAP Communication Infrastructure must have 07-10 or later versions. Also, the SOAP application must send and receive the SOAP Messages supported by both the SOAP application development support functionality and the Cosminexus JAX-WS functionality.
- Other Web Service clients
You can use a Web Service client that can send and receive the SOAP Messages of any of the following specifications# with applied WS-I Basic Profile 1.1 and Attachments Profile 1.0:
- SOAP 1.1 specifications
- SOAP 1.2 specifications
- SwA specifications (when using attachments in wsi:swaRef format)
- #
- Due to the nature of standard specifications, some ambiguous parts still remain even with SOAP 1.1 specifications, SOAP 1.2 specifications, or SwA specifications having WS-I Basic Profile 1.1 and Attachments Profile 1.0. Therefore, perform the operations after studying interconnectivity properly. Specially note that the variance of SOAP Messages that you can send and receive becomes large for Provider Implementation Classes.
This point describes the operations of the JAX-WS engine on the Web Service client and shows the support range of the Web Service available from the Web Service client.
(a) JAX-WS engine operations on the Web Service client
The JAX-WS engine on the Web Service client operates with the following procedure:
- Receives the Java object expressing the SOAP request message through the JAX-WS API from the Web Service client.
- Marshals the received Java object, and sends as a SOAP request message.
- Receives the SOAP response message and fault message from the invocation destination, un-marshals the message, and returns it to the Web Service client.
The Web Service client accesses the JAX-WS engine through the generated class or JAX-WS API; hence, the JAX-WS engine need not be considered.
Also, since the generated class and JAX-WS API are based on the JAX-WS 2.2 specifications, the implementer of the Web Service client need not consider an interface other than the standard specifications. The invocation of the Web Service (sending of the SOAP request message) and the receipt of the SOAP response message and fault message are performed within the support range for the interface in standard specifications.
(b) Support range of JAX-WS engine on the Web Service client
This section describes the relationship of the JAX-WS engine on the Web Service client and the Web Service.
For a stub-based Web Service client
The following figure shows the relationship between a JAX-WS engine at the Web Service client machine and a Web Service, in the case of a stub-based Web Service client:
Figure 10-3 Relationship of the JAX-WS engine on the Web Service client and the Web Service (For a stub-based)
![[Figure]](FIGURE/ZU090300.GIF)
The conditions for the Web Service that can be invoked by the JAX-WS engine on the Web Service client are as follows:
- A Web Service Implementation Class developed using the commands provided in the Cosminexus JAX-WS functionality
The Web Service Implementation Class developed using the commands provided in the Cosminexus JAX-WS functionality and deployed on the JAX-WS engine can be invoked. If the Cosminexus JAX-WS functionality at the connection destination machine has an earlier version, you can only use the functionality that is supported by that version.
- RPC-type SOAP application operated using the SOAP Communication Infrastructure
The RPC-type SOAP application developed using the SOAP application development support function and deployed on the SOAP Communication Infrastructure can be invoked.
The version of SOAP application development support function and SOAP Communication Infrastructure used for development must be 07-10 or a later version. Also, the SOAP application must be of the document/literal-type generated using the Java2WSDL command of the SOAP Communication Infrastructure.
- Other Web Services
The Web Service that publishes WSDL, coded in the range supported by the Cosminexus JAX-WS functionality, as Meta data and can send and receive SOAP Messages of any of the following specifications# with applied WS-I Basic Profile 1.1 and Attachments Profile 1.0 can be used:
- SOAP 1.1 specifications
- SOAP 1.2 specifications
- SwA specifications (when using attachments in wsi:swaRef format)
- MTOM/XOP specifications (when using attachments in the MTOM/XOP specification format).
For the WSDL support range, see 20.1 Support range of the WSDL 1.1 specifications.
- #
- From the nature of standard specifications, some ambiguous parts still remain even with SOAP 1.1 specifications, SOAP 1.2 specifications, SwA specifications, or MTOM/XOP specifications having WS-I Basic Profile 1.1 and Attachments Profile 1.0. Therefore, perform the operations after studying interconnectivity properly.
For a dispatch-based Web Service client
The following figure shows the relationship between a JAX-WS engine at the Web Service client machine and a Web Service, for a dispatch-based Web Service client:
Figure 10-4 Relationship between a JAX-WS engine at the Web Service client machine and a Web Service (For a dispatch-based)
![[Figure]](FIGURE/ZU090400.GIF)
The following are the conditions for a Web Service that the JAX-WS engine can invoke at the Web Service client machine:
- A Web Service Implementation Class developed using the commands provided by the Cosminexus JAX-WS functionality
You can invoke a Web Service Implementation Class developed using the commands provided by the Cosminexus JAX-WS functionality and deployed on the JAX-WS engine. If the Cosminexus JAX-WS functionality has an earlier version, you can only use the functionality that is supported by that version.
- A Provider Implementation Class developed using the commands provided by the Cosminexus JAX-WS functionality
You can invoke a Provider Implementation Class developed using the commands provided by the Cosminexus JAX-WS functionality and deployed on the JAX-WS engine.
- An RPC-type SOAP application running on the SOAP Communication Infrastructure
You can invoke an RPC-type SOAP application developed using the SOAP application development support functionality and deployed on the SOAP Communication Infrastructure.
The SOAP application development support functionality used during the development and the SOAP Communication Infrastructure must have 07-10 or later versions. Also, the SOAP application must have the document/literal format that is generated using the Java2WSDL command of the SOAP Communication Infrastructure.
- A messaging-type SOAP application running on the SOAP Communication Infrastructure
You can use a messaging-type SOAP application client developed using the SOAP application development support functionality and deployed on the SOAP Communication Infrastructure of 07-10 or later versions.
The SOAP application must be able to send and receive the SOAP Messages supported by both the SOAP application development support functionality and the Cosminexus JAX-WS functionality.
- Other Web Services
You can use a Web Service client that can publish the WSDL coded within the support range of the Cosminexus JAX-WS functionality, as Meta data and can send and receive the SOAP Messages of any of the following specifications# having WS-I Basic Profile 1.1 and Attachments Profile 1.0:
- SOAP 1.1 specifications
- SOAP 1.2 specifications
- SwA specifications (when using attachments in wsi:swaRef format)
For the WSDL support range, see 20.1 Support range of the WSDL 1.1 specifications.
- #
- Because of the nature of standard specifications, some ambiguous parts still remain even with the SOAP 1.1 specifications, SOAP 1.2 specifications, or SwA specifications having WS-I Basic Profile 1.1 and Attachments Profile 1.0. Therefore, perform operations after properly studying the interconnectivity. Specially note that the variance of the SOAP Messages that you can send and receive becomes large when the WSDL is not published as the Meta data.
(3) Notes for using arrays and java.util.List
Note that when sending a SOAP Message, the status in which element count of array and the java.util.List object are 0 indicating the empty status and the null status cannot be differentiated.
The sections 10.2.1(3)(a) Sending SOAP Messages and 10.2.1(3)(b) Receiving SOAP Messages describe the operations of the JAX-WS engine. Also, for the operations when both the Web Service machine and the Web Service client machine use the Cosminexus JAX-WS functionality, see the section 10.2.1(3)(c) When both the Web Service machine and the Web Service client machine use the Cosminexus JAX-WS functionality.
The following methods are used as examples in the description:
@WebMethod
public List<String> test( List<Integer> param )
(a) Sending SOAP Messages
This subsection describes a request message when an implementation class of the Web Service client invokes the methods with the following procedure:
- Invoking the method by passing null to the first argument
- Invoking the method by passing an object of a concrete class of java.util.List with zero number of elements to the first argument
The following is an excerpt of request messages sent by the JAX-WS engine at the Web Service client machine:
<test/>
Even if you invoke the method with any condition, the elements corresponding to the param parameter do not appear in request messages. The same holds true for response messages when the implementation class of the Web Service returns a return value.
(b) Receiving SOAP Messages
When any of the conditions described in the following table is fulfilled, the implementation class of the Web Service client and the Web Service that receives the messages of the section 10.2.1(3)(a) Sending SOAP Messages accept arrays and objects of concrete classes of java.util.List in an empty state without elements:
Table 10-2 Conditions for accepting an empty array or an object of a concrete class of java.util.List
| Item no. |
Condition |
| 1 |
When operating the java.util.List object with an implementation class of the Web Service client |
| 2 |
When operating the java.util.List object with an implementation class of the Web Service developed with a WSDL as the starting point |
| 3 |
When operating an array and java.util.List that appears directly in the arguments of the method corresponding to the WSDL operation (method annotated with the WebMethod annotation), with an implementation class of the Web Service developed with SEI as the starting point |
Note that with the Web Service Implementation Class developed with SEI as the starting point, the properties of the arrays and java.util.List, included in the JavaBeans class that appear with the arguments of the method corresponding to the WSDL operation, depend on the implementation of the JavaBeans class. If an element corresponding to a property does not exist in the request message, the JavaBeans class accepts the arrays and objects of concrete classes of java.util.List with the null value.
(c) When both the Web Service machine and the Web Service client machine use the Cosminexus JAX-WS functionality
The operations of the Cosminexus JAX-WS engine are in accordance with the sections 10.2.1(3)(a) Sending SOAP Messages and 10.2.1(3)(b) Receiving SOAP Messages. Particularly when both; a Web Service client and a Web Service exist on the Cosminexus server with the implementation class of the Web Service client and the implementation class of the Web Service satisfying the conditions shown in Table 10-2, if one of the Web Service client or the Web Service sends null as an array and the java.util.List object, the other machine receives the array and the concrete class of java.util.List with zero number of elements.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.