OutboundMultiPart

The OutboundMultiPart handler can post name value pair data and file data using the multipart/form-data format.

Refer to 5.1.6 Web Browser Content.

Command

Keyword

Value

Developer notes

SEND

HANDLER

OutboundMultiPart

 

URI

value

Required. Remote URI.

HOST

value

Required. Remote server.

SNISERVER

value

Optional. SNI host name used by TLS handshake. Use specified value or *HOST for the value of the HOST keyword value.

LANSA Integrator can only support SNI when the Java Virtual Machine (JVM) is at Java version 1.8 or higher.

USER

value

Optional. Basic authentication user.

PASSWORD

value

Optional. Basic authentication password.

PROXY

value

Optional. Proxy server.

PROXYUSER

value

Optional. Basic authentication user.

PROXYPASSWORD

value

Optional. Basic authentication password.

VERSION

value

Optional. See VERSION.

SECURE

*YES

Optional. Use HTTPS protocol.

*NO

Default. Use HTTP protocol.

WAIT

*NO

Optional. Do not wait for HTTP response.

*YES

Default is 0. Infinite wait for HTTP response.

value

Wait read time in milliseconds.

TIMEOUT

value

Optional. Default is 0 which means disabled.
Host connection timeout in milliseconds.

LOCALE

 

Optional. See LOCALE.

NUMBERFORMAT

 

Optional. See NUMBERFORMAT.

ENCODING

 

Optional. See ENCODING.
Used to encode field values.

 

The name value pair data and the file data are passed using a list argument.

The first field of the list contains the component's content type of FIELD or FILE.

The second field contains the component's name.

The third field contains the component value or the component file path.

An optional fourth field controls how the file contents are MIME encoded. Possible values are 8bit or base64. The default MIME encoding is 8bit. The MIME body part Content-Type is determined by the file extension using the Java Activation Framework.

The field value encoding is determined by the ENCODING keyword.

Example

DEFINE FIELD(#TYPE) TYPE(*CHAR) LENGTH(10)

DEFINE FIELD(#NAME) TYPE(*CHAR) LENGTH(20)

DEFINE FIELD(#VALUE) TYPE(*CHAR) LENGTH(100)

DEF_LIST NAME(#WRKLST) FIELDS(#TYPE #NAME #VALUE) TYPE(*WORKING)

 

CHANGE FIELD(#TYPE) TO(FIELD)

CHANGE FIELD(#NAME) TO(COMPANY)

CHANGE FIELD(#VALUE) TO(ACME)

ADD_ENTRY TO_LIST(#WRKLST)

 

CHANGE FIELD(#TYPE) TO(FILE)

CHANGE FIELD(#NAME) TO(ORDER_FILE)

CHANGE FIELD(#VALUE) TO('''/order/month-order.xml''')

ADD_ENTRY TO_LIST(#WRKLST)

 

CHANGE FIELD(#JSMCMD) TO('''SEND HANDLER(OutboundMultiPart) SECURE(*YES) HOST(SERVER1) URI(/order_process.jsp) SERVICE_LIST(TYPE,NAME,VALUE)''')