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 for Command/Keyword/Value |
SEND |
HANDLER |
|
OutboundMultiPart |
URI |
value |
Mandatory. Remote URI. |
|
HOST |
value |
Mandatory. Remote server. |
|
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 |
*YES |
Optional. Default is 0. |
|
*NO |
Do not wait for HTTP response. |
||
value |
Wait read time in milliseconds. |
||
TIMEOUT |
value |
Optional. Default is 0 which means disabled. |
|
LOCALE |
|
Optional. See LOCALE. |
|
NUMBERFORMAT |
|
Optional. See NUMBERFORMAT. |
|
ENCODING |
|
Optional. See ENCODING. |
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(LANSA01) URI(/order_process.jsp) SERVICE_LIST(TYPE,NAME,VALUE)''')