NonStop SOAP User's Manual
NonStop SOAP Features and Functions
NonStop SOAP User’s Manual—520501-012
4-18
Session and Transaction Examples
Session and Transaction Examples
For examples of SOAP messages that conduct transactions with TS/MP services, see
Sessions and Transactions with TS/MP Servers and NonStop Processes on
page 6-24.
Exposing a Subset of DDL as a Web Service
NonStop SOAP allows you to expose a subset of a DDL definition as a Web service.
Often DDL declarations are large and have inherited fields that can be hidden or
omitted in a business process request. Using NonStop SOAP, a subset of the DDL can
be exposed as an XML document, saving processing time for a large document.
Therefore, you can customize the request to match the client’s profile. This feature
enables a single TS/MP service or NonStop process to be exposed as multiple web
services tailored to a client application’s requirement.
For example, consider this:
1. A TS/MP server class S1 expects a request that corresponds to DDL definition D-
Req.
2. A Service Provider needs to expose S1 as a Web service, but using DDL definition
D-Req-subset. D-Req-subset is a proper subset of D-Req, that is, all the fields in
D-Req-subset exist in D-Req and in the same order as in D-Req. Similarly, the
reply from S1 corresponds to a DDL definition D-Rsp and the Service Provider
wants to expose it using DDL definition D-Rsp-subset which is also a proper
subset of D-Rsp.
3. A NonStop SOAP server gets a message which corresponds to D-Req-subset. As
S1 expects a DDL buffer that corresponds to D-Req, the NonStop SOAP server
converts the request SOAP message to a DDL buffer that maps D-Req. Similarly
NonStop SOAP server converts the response which maps to D-Rsp to a SOAP
message that corresponds to D-Rsp-subset.
To specify a DDL definition D-Req-subset, which is a proper subset of D-Req, the
Service Provider adds DDL comments to D-Req using some tags that NonStop SOAP
can process. The DDL comment tag has to be entered before a field.
The NonStop SOAP comment tags supported are:
•
@SOAP_OPTIONAL: Indicates that the presence of an XML element
corresponding to this field is optional in the SOAP request message. When present
while marshaling a SOAP response, a corresponding XML leaf element is created
only if the content of the DDL buffer segment is not all spaces (for a COBOL
service) or nulls (for a C service).
•
@SOAP_SUPPRESS_IN: Do not expose this field for the SOAP request message.
The DDL field could be a group field or a leaf field.
•
@SOAP_SUPPRESS_OUT: Do not expose this field in the SOAP response
message.