uCosminexus Service Platform, Basic Development Guide

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

2.6.1 Applicability of the service components that use Web service

The applicability of service components that use Web services is as follows:

Hint
WSDL and XML schema in this manual are described by mapping specific prefix and namespace URI. The following table describes the mapping of prefix and namespace URI:

Table 2-10 Mapping between the prefix and name space URI

Prefix Name space URI
wsdl http://schemas.xmlsoap.org/wsdl/
xsd http://www.w3.org/2001/XMLSchema
soap http://schemas.xmlsoap.org/wsdl/soap/
soap12 http://schemas.xmlsoap.org/wsdl/soap12/
Organization of this subsection
(1) Pre-requisite specifications
(2) Format of SOAP message
(3) Notes when defining WSDL (SOAP1.1 mode)
(4) Notes when defining and using WSDL(SOAP1.1/1.2 combined mode)
(5) Support range of WSDL1.1 specifications
(6) Life cycle

(1) Pre-requisite specifications

This section separately describes pre-requisite specifications for service components that use Web services, for SOAP1.1 mode and for SOAP1.1/1.2 combined mode.

(2) Format of SOAP message

SOAP message is configured with SOAP header and SOAP body. SOAP header includes additional information (such as identification information) of message and SOAP body includes the actual message.

In service components that use Web services, following conditions must be fulfilled as the format of SOAP message.

Also, in service platform having version prior to 08-53, you can create SOAP adapter based on WSDL that defines soap:header element, but soap:header element is ignored.

(3) Notes when defining WSDL (SOAP1.1 mode)

This section describes WSDL description format and notes when defining WSDL, when using SOAP1.1 mode. For support range of WSDL1.1 specifications, see "2.6.1(5) Support range of WSDL1.1 specifications".

(a) wsdl:types elements

wsdl:types element defines the information related to types used in SOAP message. Describe wsdl:types element according to the following rules.

(b) xsd:schema element

xsd:schema element describes XML schema. Describe xsd:schema element as the child element of wsdl:types element. For the rules applicable when describing XML schema, see "2.6.5 Scoping of XML schema".

(c) wsdl:import element

wsdl:import element is to be defined when importing WSDL. Describe wsdl:import element as a child element of wsdl:definitions element. Describe wsdl:import element according to the following rules:

(d) soap:binding element

soap:binding element defines SOAP binding. Describe soap:binding element according to the following rules.

(e) wsdl:operation element

Describe wsdl:operation element according to the following rules:

(f) soap:operation element

soap:operation element defines the operation information in SOAP binding. Describe soap:operation element according to the following rules:

(g) soap:body element

soap:body element defines messages under soap:body element of SOAP message. Describe soap:body element according to the following rules.

When style attribute is "document", you can specify parts attribute but it is ignored.

(h) wsdl:fault element

wsdl:fault element defines fault. Describe wsdl:fault element according to the following rules:

(i) soap:fault element

soap:fault element defines messages under detail child element included in soap:fault element of SOAP message. Describe soap:fault element according to the following rules:

Conditions when using fault
In SOAP Fault returned from service components, fault name is set as faultCode and handled as fault, when following conditions are fulfilled:
  • SOAP communication base(Web Services) must be used in service components
  • Element name# that shows exception type complexType defined in WSDL fault name(name attribute value of wsdl:fault element)and schema(in wsdl:types), must match including namespace.
When you use the WSDL that do not fulfill these conditions and you want to handle SOAP Fault returned from service component, define SOAP Fault operation definition file and set it as user-defined exception.
Note#
Element nameimplies "element that wsdl:part element referred by wsdl:fault specifies by using element attribute". Element name indicates element that WSDL can specify by striding over the following order.
1. wsdl:fault
2. wsdl:message (striding over of this element does not happen in some cases)
3. wsdl:part
4. xsd:element
When you generate WSDL file having style attribute of operation as "rpc", by using Java2WSDL command, which is development support command of service platform, WSDL file referred by type element and not by element is generated.
Therefore, use WSDL file by revising or re-generating, rather than using the generated WSDL file as it is. For details on revising or re-generating WSDL file, see Notes in "4.3.2 Creating a Service Component Message (for Web Services)".
When you use fault in service platform, it is recommended to use WSDL of document style.
(j) soap:header element

soap:header element defines messages under soap:header element of SOAP message. Describe soap:header element according to the following rules:

(k) wsdl:service element

wsdl:service element defines SOAP services. Specify only 1 wsdl:port element in 1 wsdl:service element. You cannot describe 2 or more elements.

(4) Notes when defining and using WSDL(SOAP1.1/1.2 combined mode)

When you use SOAP1.1/1.2 combined mode, describe WSDL with reference of "4.3.1 Creating WSDL file" in "Application Server Web Service Development Guide".

However, contents described in "4.3.1 Creating WSDL file" in "Application Server Web Services Development Guide" differ with operations of service platform in some aspects. This section describes notes at the time of defining WSDL, when using SOAP1.1/1.2 combined mode.

(a) Available WSDL definition styles

WSDL definition style is document/literal.

(b) wsdl:port element

If name attribute of wsdl:port element gets duplicated, error occurs. Specify unique name attribute in entire WSDL.

(c) wsdl:types element

When you define schema as child element of wsdl:types element, describe comments by using xsd:annotation.

Also, JAXB namespace "http://java.sun.com/xml/ns/jaxb" is added to the namespace declaration of message format created from WSDL in the service adapter.

(d) wsdl:operation element

Describe name attribute of wsdl:operation element with less than 255 bytes.

(e) Definition when using SOAP communication base in service components

When you use SOAP communication base in service components, match name attribute of wsdl:fault element with name element of xsd:element referred by wsdl:part element.

(f) Validating WSDL

(5) Support range of WSDL1.1 specifications

Following table shows the support range of WSDL1.1 specifications when using SOAP1.1 mode.

For support range of WSDL 1.1 specifications when using SOAP1.1/1.2 combined mode, see "20.1 Support range of WSDL 1.1 specifications" in "Application Server Web Service Development Guide".

Table 2-12 Support range of the WSDL1.1 specifications

Classification Support Remarks
Major classification Minor classification
Service definition: WSDL document structure Document Naming and Linking Y Has description about scoping of namespace
Authoring Style(acquisition of components by import element) Y Has description about acquisition by import element of other file
Language Extensibility and Binding N Has description about deploying wsdl:required attribute
Documentation Y Has description about comments in the element.
Service definition: wsdl:types Y Has description about data types that are handled
Service definition: wsdl:message Y Has description about logical definition of message
Service definition: Port type One-way Operation N Has description about one way operations of the message.
Request-response Operation Y Has description about request/response operations of the message.
Solicit-response Operation N Has description about send request/response operations of the message.
Notification Operation N Has description about notification operation of the message.
Names of Elements within an Operation Y Shows name attribute of input and output element. You cannot perform overload. Name must be unique in WSDL.
Parameter Order within an Operation Y Has description about order of parameter within operation. You can specify list of parameters according to parameterOrder attribute.
Service definition: wsdl:binding Y Has description about the definition of details on message format and protocol.
Service definition: wsdl:port Y Has description about physical definition of services.
Service definition: wsdl:service Y Has description about position of services. You cannot have correspondence of multiple SOAP services to a single WSDL.
SOAP binding soap:binding Y Has description about binding of SOAP format
soap:operation Y Has description about information of SOAP operation in SOAP message
soap:body Y Has description about display method of message part of SOAP body within SOAP message. You can describe parts attributes but it is ignored.
soap:fault Y Has description about contents of SOAP fault within SOAP message.
soap:header Y Has description about contents in SOAP header element within SOAP message.
soap:headerfault N
soap:address Y Has description about address of port element
MIME binding mime:content N Has description about MIME type
mime:multipartRelated N Optional set of MIME parts has been consolidated.
mime:part N Has description about each MIME part.
mime:mimeXml N Has description about XML payload having specific schema. It does not conform to SOAP.

(Legend)
Y: Supports
N: Does not support

(6) Life cycle

Even if it is set (setting up "Session", "Application" in DeployScope) to maintain session between execution environment and service components of service platform, you cannot perform stateful calling. It is always calling in "Request" in service platform.