InboundSeparatedValue

LANSA Integrator

InboundSeparatedValue

The InboundSeparatedValue handler is used to receive posted separated values and to send separated values as a reply.

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

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

The handler checks that the content type belongs to the separated values 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 CSV.

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 reads the separated values into the working list.

Syntax:

Command

Keyword

Value

Developer notes for Command/Keyword/Value

RECEIVE

HANDLER

 

InboundSeparatedValue

ARCHIVE

 

Optional. See ARCHIVE.

SVROW

 

Optional. See SVROW.

SVROWLIMIT

 

Optional. See SVROWLIMIT.

SVMODE

 

Optional. See  SVMODE.

SVHEAD

 

Optional. See SVHEAD.

ENCODING

 

Optional. See ENCODING.

NUMBERFORMAT

 

Optional. See NUMBERFORMAT.

CONTENT

 

Optional. See CONTENT.

SEPARATOR

 

Optional. See SEPARATOR.

 

Example

 

RECEIVE HANDLER(InboundSeparatedValue) SVHEAD(ORDER) SERVICE_LIST(…)

 

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

The handler uses the value of the CONTENT keyword to determine the type of separated values to create:

  • If no content value is available, the handler defaults to application/comma-separated-values
  • If the content value is *CSV, then content type will be application/comma-separated-values
  • If the content value is *TEXTCSV, then content type will be text/comma-separated-values
  • If the content value is *TSV, then content type will be application/tab-separated-values
  • If the content value is *TEXTTSV, then content type will be text/tab-separated-values
  • If the content value is not a valid separated value content type then CSV data is created, but the specified content type is sent.

The optional SVHEAD keyword allows a header record to be inserted at the beginning of the data.

The handler creates Unicode data using all entries in the list, if there is no list argument then zero length content is created.

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

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.

Syntax:

Command

Keyword

Value

Developer notes for Command/Keyword/Value

SEND

HANDLER

 

InboundSeparatedValue

UAPATH

value

Optional. User agent save response path.

UAFILE

value

Optional. User agent save response file name.

UACACHE

value

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

UADISPOSITION

value

Optional. Content-Disposition filename.

NUMBERFORMAT

 

Optional. See NUMBERFORMAT.

CONTENT

*CSV

Default. Create CSV content.

*TSV

Create TSV content.

ENCODING

 

Optional. See ENCODING

SVHEAD

 

Optional. See SVHEAD

SVEXCLUDE

 

Optional. See SVEXCLUDE.

ARCHIVE

 

Optional. See ARCHIVE.

CHARSET

*YES

Optional. Include charset attribute.

*NO

Do not include charset attribute.

*TEXT

Default. Include charset attribute if content is text.

SEPARATOR

value

Optional. See SEPARATOR.

 

Example

 

SEND HANDLER(InboundSeparatedValue) CONTENT(*CSV) UAFILE(order.csv) SERVICE_LIST(…)