IPWorks EDI 2020 Kotlin Edition

Questions / Feedback?

ReadRequest Method

Reads the AS4 request.

Syntax

public fun readRequest(request: javax.servlet.http.HttpServletRequest?)

Remarks

To begin, when a request is received first call ReadRequest. This reads the AS4 request from the specified HttpServletRequest.. Alternatively the request data may be passed directly to the component by specifying calling SetRequestStream. After calling ReadRequest the following properties may be checked:

The first step after calling ReadRequest is to determine if the client is sending files (push) or requesting files (pull). To determine this check the value of AgreementRef and MPC. For instance:

if (server.AgreementRef == "" && server.MPC != "")
{
  //The client is requesting files from the specified MPC
  //No other relevant properties are populated
}
else //AgreementRef is not empty, and MPC is empty
{
  //The client is sending files. AgreementRef is populated with the agreement reference.
  //AS4From, AS4To, ConversationId, etc are populated
}

Determining if the request contains an asynchronous receipt from a previous transmission may also be done at this time by checking the IncomingReceipt property's Content field. If it is populated a receipt is present. To verify the receipt set AsyncReceiptInfoDir to the directory where information about the message was originally stored and call VerifyReceipt. If the receipt is signed SignerCert must also be set. See the section below and also SendFiles for more details.

Once information about the request is determined the component may then be configured to respond appropriately depending on the operation.

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks EDI 2020 Kotlin Edition - Version 20.0 [Build 8033]