Cookies property: ConnectorInfo collection
Description
Use this property to access the cookies associated with a message.
You can accept a synchronous response message containing cookies, save those cookies in a global variable, and later return them to the target node in an outbound synchronous or asynchronous request message.
You can access this property only in an inbound synchronous response message or an outbound request message.
This property is read/write.
Example
The following example retains the cookies from a response message to a global variable:
Local Message &SalesRequest, &SalesResponse;
Local Rowset &SALES_ORDER;
Global string &SalesCookies;
&SALES_ORDER = GetLevel0();
&SalesRequest = CreateMessage(OPERATION.SALES_ORDER_SYNC);
&SalesRequest.CopyRowsetDelta(&SALES_ORDER);
/* Send the synchronous request; the return value is the response
message object */
&SalesResponse = &SalesRequest.SyncRequest();
/* Retrieve cookies from the response message */
&SalesCookies = &SalesResponse.IBInfo.IBConnectorInfo.Cookies;
The following example retrieves the previously retained cookies from the global variable and inserts them into a new request message:
Local Message &SalesRequest, &SalesResponse;
Local Rowset &SALES_ORDER;
Global string &SalesCookies;
&SALES_ORDER = GetLevel0();
&SalesRequest = CreateMessage(Message.SALES_ORDER_SYNC);
&SalesRequest.CopyRowsetDelta(&SALES_ORDER);
/* Insert the cookies in the request message */
&SalesRequest.IBInfo.IBConnectorInfo.Cookies = &SalesCookies;
/* Send the asynchronous request */
%IntBroker.Publish(&SalesRequest);