How XSLT processes a SOAP request (high level only)

When importing a SOAP request, three things are necessary:

  1. The BIS service program must know the HTTP method being used,
  2. The SOAP method being requested, and
  3. The input parameter values for the SOAP request.

The soap_to_cobol.xsl is the XSLT document that describes this transformation. The BIS request document consists of four major parts.

The actual payload of the request is wrapped inside a <bis:content> element. ,

  1. The cookie values passed by the client are wrapped inside a <bis:cookies> element,
  2. The server variable values are wrapped inside a <bis:server-variables> element, and
  3. The query parameters from the URL are wrapped inside a <bis:query-params> element.

The latter three sets of values may be obtained by the service program by including the following group items (preserving the names) in the SOAP-Request-Response group item:

 05 s--cookies.
    07 s--cookie occurs 20.
       09 s--name pic x(40).
       09 s--value pic x(100).
 05 s--query-parameters.
    07 s--query-parameter occurs 20.
       09 s--name pic x(40).
       09 s--value pic x(100).
 05 s--variables.
    07 s--variable occurs 100.
       09 s--name pic x(40).
       09 s--value pic x(100).

Cookies, query parameters and server variables are typically presented as name-value pairs. The name-value pairs are stored in the arrays described above.

As part of the retrieval of the server variables, the value of the server variable named REQUEST_METHOD is placed in the http-method.

The remainder of the XSLT is devoted to retrieving the payload information from the <bis:content> element. The payload is a SOAP envelope, which in turn contains a <SOAP:body> element that contains the actual method request.

A document/literal wrapped SOAP request has a single element (the so-called wrapper element) inside the SOAP:body. The name of this element is the name of the requested method. By concatenating the element (method) name with the string xx the subsequent parameter values may be directed (imported) into the appropriate method's input parameter group.

After the method name has been determined, the elements subordinate to the wrapper element are processed to obtain the input parameter values. This processing is straightforward with the exception of discovering array elements which use a naming convention (see the description of WSDL processing above).