InboundXML

LANSA Integrator

InboundXML

The InboundXML handler allows XML requests to be received and XML responses to be sent.

More than one RECEIVE and SEND command can be issued to read and create different sections of a large XML document.

When the RECEIVE command of this content handler is executed the following steps occur:

If there is no content, then an OK status is returned.

The handler checks that the content type belongs to the XML group of content types, if it does not support the content type, then an error is returned to the program. Use the CONTENT keyword to override this check and to allow the handler to receive the data, it is assumed the data is XML.

The handler determines the encoding to apply to the receive byte stream to convert it to Unicode.

The handler determines if this Unicode data needs to be archived.

The handler then transforms the XML and binds the data into the program fields and list.

Syntax:

Command

Keyword

Value

Developer notes for Command/Keyword/Value

RECEIVE

HANDLER

 

InboundXML

XSL

 

Mandatory. See XSL

ENCODING

 

Optional. See ENCODING.

CONTENT

 

Optional. See CONTENT.

ARCHIVE

 

Optional. See ARCHIVE.

SCHEMA

 

Optional. See SCHEMA.

 

Example

 

RECEIVE HANDLER(InboundXML) XSL(ORDER) SERVICE_LIST(…)

 

When the SEND command of this content handler is executed the following steps occur:

The handler using the XSL keyword transforms the program fields and list into the resultant XML. If a FRAGMENT keyword is present this transformation is stored, as this is only a fragment of the final XML to be sent. When no FRAGMENT keyword is present this transformation is treated as the last and the final output XML is constructed and ready to be sent.

The handler determines if this Unicode data needs to be archived.

The handler uses the value of the CONTENT keyword to determine the value of the HTTP protocol content-type.

  • If no content value is available, the handler defaults to application/xml.
  • If the content value is *XML, then content type will be application/xml.
  • If the content value is *TEXTXML, then content type will be text/xml.

The handler creates a HTTP response to return to the remote client.

The optional UAFILE and UAPATH keywords are available to inform the remote client program of a recommended path and filename for the content. LANSA Integrator UserAgent will add these file and path names to the save popup menu on the response panel.

The service property inbound.xml.default.contenttype can be used to set the default content type.

Syntax:

Command

Keyword

Value

Developer notes for Command/Keyword/Value

SEND

HANDLER

 

InboundXML

XSL

 

Mandatory. See XSL.

FRAGMENT

 

Optional. See FRAGMENT.

OUTPUT

 

Optional. See OUTPUT.

UAPATH

value

Optional. User agent save response path.

UAFILE

value

Optional. User agent save response filename.

UACACHE

value

Optional. Cache-Control max-age.
Default.0.

UADISPOSITION

value

Optional. Content-Disposition filename.

ARCHIVE

 

Optional. See ARCHIVE.

ENCODING

 

Optional. See ENCODING.

CONTENT

 

Optional. See CONTENT.

CHARSET

*YES

Optional. Include charset attribute.

*NO

Do not include charset attribute.

*TEXT

Default. Include charset attribute if content is text.

 

Example

 

SEND HANDLER(InboundXML) XSL(…) UAFILE(…) UAPATH(…) SERVICE_LIST(…)