FRAGMENT

LANSA Integrator

FRAGMENT

A fragment is a partial segment of a complex data object. Fragments are used to build complex data structures, such as XML, using individual LANSA fields and single working lists. They are also used to convert incoming complex structures back into fields and working lists.

The optional keyword FRAGMENT can be used by content handlers and services that process XML, to help in the creation of outbound XML.

The FRAGMENT keyword value specifies the storage name for the created XML.

Internally, FunctionXML is created using the field list and list objects. This FunctionXML is then transformed using the supplied XSL into the desired flavor of XML.

If the resultant XML contains an <rdml:fragment /> tag, then a stored XML fragment under this name is merged into the resultant XML. If a FRAGMENT keyword is present, then the resultant XML is stored under the fragment name for later merging.

If no FRAGMENT keyword is present, the resultant XML becomes the final output XML message.

The FRAGMENT keyword is also used by the Soap Agent Service to assist in the creation of outgoing SOAP objects, and in retrieving the data in a SOAP response. Use the SOAP Wizard to specify which parts of the SOAP object represent fragments, and to give each fragment a name.

For XML services, if the OUTPUT option is *ADD then the fragment is concatenated to the fragment already stored under that name. The *NEW option will create a stored fragment if one does not exist or replace an existing one.

Example

 

SEND XSL(ORDER_DETAIL) FRAGMENT(DETAIL) SERVICE_LIST(...)