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.
|
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)''')