Receiving an X.400 Notification

The principles for receiving notifications (Trading Networks document type x400statusln) are the same as for receiving messages. For each message output (message, notification, report) submitted, there must be a positive or negative (in case of an error) acknowledgment. For more information about sending messages, see Receiving Inbound Messages.

Overview inbound notification processing

The following list illustrates how Adapter for X.400 processes inbound notifications:

  1. The scheduled wm.x400gateway.Gw:sendAndFetch or wm.x400gateway.Gw:fetch services invoke the ADDONMAIL-UAFI (third party product), which fetches the messages and notifications out of your X.400 mailbox. The sendAndFetch and fetch services convert the messages and notifications into XML and store them in the Inbound folder for further processing.
  2. You should create a client that one of the following services to retrieve the messages from the Inbound folder:
    • wm.x400gateway.Inbound:getFilelist
    • wm.x400gateway.Inbound:getFileContent
    • wm.x400gateway.Inbound:deleteFile
    Note: You can also create a scheduled task to periodically invoke the wm.X400forTN.wm.x400.tn.rec:receiveX400 service.

Adapter for X.400 stores received notifications in the Trading Networks database and sets the user status to X.400 received.

Additionally, Adapter for X.400 creates a Transactions relationship between the notification and the original document the notification refers to.

To see relationships go to IBM My webMethods Server > Monitoring > Integration > B2B > Transactions, search for a transaction and click on the icon in the column Related Documents

Structure of an Inbound Notification (x400statusln)

The following structure is an example of the structure of an inbound notification (Trading Networks document type x400statusln):
Note: Typically an inbound notification contains one notification type per file.
<?xml version="1.0"?>
<!— X.400 incoming status-->
<x400statusIn> to be change to 400statusOut
<statusType> </statusType>

<deliveryReportIn>
	<msSequenceNumber>UA-FI-RSP-DELIVERED-MS_ENTRY_NO</msSequenceNumber>
	<mtsId>UA-FI-RSP-MTS_ID</mtsId>
	<localId>UA-FI-RSP-CONTENT_ID</localId>
	<p7originator>
		<x400address>UA-FI-RSP-P7_ORIGINATER_X400ADDRESS</x400address>
	</p7originator>
	<deliveryTime>UA-FI-RSP-DELIVERY_TIME</deliveryTime>
</deliveryReportIn>


<record name="requires" javaclass="com.wm.util.Values">
	<value name="WmSAP">*.*</value>
</record>

<nonDeliveryReportIn>
	<msSequenceNumber>UA-FI-RSP-DELIVERED-MS_ENTRY_NO </msSequenceNumber>
	<mtsId>UA-FI-RSP-MTS_ID</mtsId>
	<localId> UA-FI-RSP-CONTENT_ID</localId>
	<p7originator>
		<x400address>UA-FI-RSP-P7_ORIGINATER_X400ADDRESS</x400address>
	</p7originator>
	<reason>UA-FI-RSP-REASON</reason>
	<diagnostic>UA-FI-RSP-DIAGNOSTIC</diagnostic>
	<supplementaryInfo>UA-FI-RSP-SUPPLEMENTARY_INFO</supplementaryInfo>
</nonDeliveryReportIn>

<receiptNotificationIn>
	<msSequenceNumber>UA-FI-RSP-DELIVERED-MS_ENTRY_NO</msSequenceNumber>
	<localId>UA-FI-RSP-LOCAL_ID</localId>
	<p2originator>
		<x400address>UA-FI-RSP-P2_ORIGINATER_X400ADDRESS</x400address>
	</p2originator>
	<receiptTime>UA-FI-RSP-RECEIPT_TIME</receiptTime>
</receiptNotificationIn>

<nonReceiptNotificationIn>
	<msSequenceNumber>UA-FI-RSP-DELIVERED-MS_ENTRY_NO</msSequenceNumber>
	<localId>UA-FI-RSP-LOCAL_ID</localId>
	<p2originator>
		<x400address>UA-FI-RSP-FROM_X400ADDRESS</x400address>
	</p2originator>
	<nrnReason>UA-FI-RSP-REASON</nrnReason>
</nonReceiptNotificationIn>

<positiveEdiNotificationIn>
	<msSequenceNumber>UA-FI-RSP-DELIVERED-MS_ENTRY_NO</msSequenceNumber>
	<localId>UA-FI-RSP-LOCAL_ID</localId>
		<from>
			<x400address>UA-FI-RSP-FROM_X400ADDRESS</x400address>
		</from>
	<notificationTime>UA-FI-RSP-NOTIFICATION_TIME</notificationTime>
	<supplementaryInfo>UA-FI-RSP-SUPPLEMENTARY_INFO</supplementaryInfo>
</positiveEdiNotificationIn>

<negativeEdiNotificationIn>
	<msSequenceNumber>UA-FI-RSP-DELIVERED-MS_ENTRY_NO</msSequenceNumber>
	<localId>UA-FI-RSP-LOCAL_ID</localId>
	<from>
		<x400address>UA-FI-RSP-FROM_X400ADDRESS</x400address>
	</from>
	<notificationTime>UA-FI-RSP-NOTIFICATION_TIME</notificationTime>
	<nnGeneratedBy>UA-FI-RSP-GENERATED_BY</nnGeneratedBy>
	<nnReason>UA-FI-RSP-NN_REASON</nnReason>
	<nnDiagnostic>UA-FI-RSP-NN_DIAGNOSTIC</nnDiagnostic>
	<supplementaryInfo>UA-FI-RSP-SUPPLEMENTARY_INFO</supplementaryInfo>
</negativeEdiNotificationIn>

<forwardedEdiNotificationIn>
	<msSequenceNumber>UA-FI-RSP-MS_ENTRY_NO</msSequenceNumber>
	<localId> UA-FI-RSP-LOCAL_ID </localId>
	<from>
		<x400address>UA-FI-RSP-P2_ORIGINATER_X400ADDRESS</x400address>
	</from>
	<notificationTime>UA-FI-RSP-NOTIFICATION_TIME</notificationTime>
	<forwardedTo>
		<x400address>UA-FI-RSP-FORWARDED_TO_X400ADDRESS</x400address>
	</forwardedTo>
	<fnGeneratedBy>UA-FI-RSP-GENERATED_BY</fnGeneratedBy>
	<fnReason>UA-FI-RSP-FN_REASON</fnReason>
	<fnDiagnostic>UA-FI-RSP-FN_DIAGNOSTIC</fnDiagnostic>
	<supplementaryInfo>UA-FI-RSP-SUPPLEMENTARY_INFO</supplementaryInfo>
</forwardedEdiNotificationIn>

<submittedNotificationIn>
	<localId>UA-FI-RSP-LOCAL_ID</localId>
	<mtsId>UA-FI-RSP-MTS_ID</mtsId>
	<submissionTime>UA-FI-RSP-SUBMISSION_TIME</submissionTime>
</submittedNotificationIn>

<nonSubmittedNotificationIn>
	<localId>UA-FI-RSP-LOCAL_ID</localId>
	<errorCode>UA-FI-RSP-ERROR_CODE</errorCode>
	<errorText>UA-FI-RSP-ERROR_TEXT</errorText>
</nonSubmittedNotificationIn>
</x400statusIn>


For more details about the parameters of an X.400 notification (e.g., localID, p7originator), see the ADDONMAIL UA-FI Programmer’s Guide for the chapter about receiving IP notifications and the chapter about receiving EDI notifications.

Receiving Submitted and Non-submitted Notifications

You will receive a submitted notification from Adapter for X.400, if the IP or EDI message was successfully sent by the ADDONMAIL UA-FI to the X.400 server. If the ADDONMAIL UA-FI could not send the message to the X.400 server, you will receive a non-submitted notification.

Before you can receive submitted or non-submitted notifications for X.400 messages, fulfill the following prerequisite:

To receive X.400 submitted or non-submitted notifications, you must invoke the receiveX400 service.

After you invoke the service, the Adapter for X.400 receives X.400 messages (both IP and EDI) and notifications (Trading Networks document type x400statusln) via the X.400 Gateway from a X.400 mailbox.

The following table specifies what input parameters you need to provide for the receiveX400 service based on the type of message you are receiving if the X.400 Gateway does not reside on the local machine:

Type of X.400 message Input parameters for the receiveX400 service
IP message Alias Name of the remote Integration Server.
EDI message Alias Name of the remote Integration Server.
Note: You can create a scheduled task for this service, as well as for the sendandFetch or fetch service, to automate receipt of the notification.

Receiving Delivery and Non-delivery Notifications

You can request to receive a delivery notification if Adapter for X.400 successfully sent the X.400 IP and EDI message to the receiver's mailbox. If the X.400 MTA (Message Transfer Agent) could not send the message to the receiver's X.400 mailbox, you receive a non-delivery notification.

Before you can receive delivery or non-delivery notifications for X.400 messages, fulfill the following prerequisites:

  1. Create a scheduled task that runs the sendAndFetch or fetch service. For more information, see Sending to and Fetching Messages from X.400 Server.
  2. Configure the profile for the receiving partner and define the X.400 extended fields based on the type of messages (IP or EDI). When defining the X.400 extended fields, you must set the following parameters:
    • Content type is set to P2 or P22 or PEDI for the receiver
    • replyRequest is set to Yes
    • Either a requestDN or requestND notification in case of an IP message
    • requestDN and requestND in case of an EDI message
    For more information about the X.400 extended fields for a Trading Networks profile, see, Defining the Receiver Profile.

    For more information, see Manage Partner Profiles for the Adapter.

To receive X.400 delivery or non-delivery notifications, you must invoke the receiveX400 service.

After you invoke the service, Adapter for X.400 receives the X.400 messages (both IP and EDI) and notifications (Trading Networks document type x400statusln) from an X.400 mailbox via the X.400 Gateway.

The following table specifies what input parameters you need to provide for the receiveX400 service based on the type of message you are receiving if the X.400 Gateway does not reside on the local machine:

Type of X.400 message Input parameters for the receiveX400 service
IP message Alias Name of the remote Integration Server.
EDI message Alias Name of the remote Integration Server.
Note: You can create a scheduled task for this service, as well as for the sendandFetch or fetch service, to automate receipt of the notification.

For more details about the structure and parameters of an X.400 notification (e.g., localID, p7originator), see the ADDONMAIL UA-FI Programmer’s Guide for the chapter about receiving notifications.

Receiving Receipt and Non-receipt Notifications

You can have Adapter for X.400 send a receipt notification informing you that the receiver has read your IP message. You can also have Adapter for X.400 send you a non­ receipt notification containing the reason code for non-receipt of the IP message.

Before you can receive receipt or non-receipt notifications for X.400 messages, fulfill the following prerequisites:

  1. Create a scheduled task that runs the sendAndFetch or fetch service. For more information, see Sending to and Fetching Messages from X.400 Server.
  2. Configure the profile for the receiving partner and define the X.400 extended fields based on the type of messages (IP). When defining the X.400 extended fields, you must set the following parameters:
    • Content type is set to P2 or P22 for the receiver
    • replyRequest is set to Yes
    • Either a requestRN or requestNR notification
    For more information about the X.400 extended fields for a Trading Networks profile, see Defining the Receiver Profile.

    For more information, see Manage Partner Profiles for the Adapter.

To receive X.400 receipt or non-receipt notifications, you must invoke the receiveX400 service.

The following table specifies what input parameters you need to provide for the receiveX400 service based on the type of message you are receiving if the X400 Gateway does not reside on the local machine:

Type of X.400 message Input parameters for the receiveX400 service
IP message Alias Name of the remote Integration Server.
Note: You can create a scheduled task for this service, as well as for the sendandFetch or fetch service, to automate receipt of the notification.

For more details about the receipt and non-receipt notifications, see the ADDONMAIL UA-FI Programmer’s Guide for the chapter about receiving notifications.

Receiving EDI Notifications

Adapter for X.400 provides three types of EDI notifications:

  • Positive EDI notification. If the receiver processed the original X.400 EDI message, you receive a positive EDI notification.
  • Negative EDI notification. If something went wrong with the original X.400 EDI message, you receive a negative EDI notification containing the reason and diagnostic codes.
  • Forwarded EDI notification. If the X.400 EDI message was forwarded, you receive a forwarded EDI notification containing the reason code and the X.400 address of the receiver the message was forwarded to.

Before you can receive positive, negative, or forwarded EDI notifications, fulfill the following prerequisites:

  1. Create a scheduled task that runs the sendAndFetch or fetch service. For more information, see Sending to and Fetching Messages from X.400 Server.
  2. Configure the profile for the receiving partner and define the X.400 extended fields based on the type of messages (EDI). When defining the X.400 extended fields, you must set the following parameters:
    • Content type is set to PEDI for the receiver
    • replyRequest is set to Yes
    • Either a requestDN or requestNN or requestFN notification
    For more information about the X.400 extended fields for a Trading Networks profile, see , see Defining the Receiver Profile.

    For more information, see Manage Partner Profiles for the Adapter.

To receive X.400 positive, negative, and forwarded EDI notifications, you must do the following. In your client code that receives the document, invoke the receiveX400 service.

The table below specifies what input parameters you need to provide for the receiveX400 service:

Type of X.400 message Input parameters for the receiveX400 service
EDI message Alias Name of the remote Integration Server, if the X.400 Gateway does not reside on the local machine..