Messaging Methods
This section describes methods used in messaging and the application classes in which they are contained.
Outbound Messaging Methods
This section describes methods used on outbound messages from PeopleSoft to other systems.
| Term | Definition |
|---|---|
|
OnRequestSend |
Implement for outbound synchronous and asynchronous service operations to override connector properties before sending a message to the integration gateway. This method is contained in the ISend application class. The OnRequestSend method passes in a message to your derived application class method. The returned value needs to be a message. The following is an example implementation of this method.
See Setting and Overriding Target Connector Properties at Runtime. When using the ISend handler with message parts, specifically with rowset-based message parts, the rowsets of the parts must be retrieved in the order that the content data will be sent. The following is an example that can be used for ISend events that use rowset-based parts (even for the cases where one is just overriding the connectors):
|
|
OnAckReceive |
Implement for outbound asynchronous service operations to access the body of a message acknowledgement to check for SOAP faults. This method is contained in the IReceiver application class. The following is an example implementation of this method.
|
Inbound Messaging Methods
This section describes methods used on inbound messages to PeopleSoft from other systems.
| Term | Definition |
|---|---|
|
OnRequest |
Implement for inbound synchronous service operations. This method is contained in the IRequestHandler application class. The following is an example implementation of this method:
|
|
OnNotify |
Implement for inbound asynchronous service operations. This method can be used for code that does subscription processing, and for validating and loading message data. This method is contained in the INotificationHandler application class. The following is an example implementation of this method:
|
|
OnResponse |
Implement for inbound response asynchronous service operations. This method can be used for code that does response subscription processing. This method is contained in the INotificationHandler application class. The following is an example implementation of this method and shows how to get the request TransactionID.
|
Error-Handling Methods
Each application class contained in the Integration application subpackage contains an OnError method that you can use for custom error handling.
Custom error handling can include sending an email notification or entering data in a log when an error occurs.
For the IRequestHandler application class, the OnError function returns a string. This enables you to send back custom error messages, for example SOAP faults, to non-PeopleSoft consumers. If the message consumed was a SOAP message and the custom error message is already wrapped in SOAP, it will not be modified and is sent as-is. However, if the OnError message is not SOAP, it is wrapped as a standard SOAP fault and returned to the sender.
If the message consumer is another PeopleSoft system the message set/message ID framework applies.
If an error occurs the OnError method, if implemented, is automatically invoked. The type of exception can be viewed by using the Message object to retrieve an Exception object populated with information about the error, using the message class IBException property.
The following is an example of the OnError method implementation:
/*On Error Implementation */
method OnError
/+ &MSG as Message +/
/+ Returns String +/
/+ Extends/implements PS_PT:Integration:IRequestHandler.OnError +/
Local integer &nMsgNumber, &nMsgSetNumber;
Local string &sText;
&nMsgNumber = &MSG.IBException.MessageNumber;
&nMsgSetNumber = &MSG.IBException.MessageSetNumber;
rem &sText = &exception.DefaultText;
&sText = &MSG.IBException.ToString();
/* ADD SPECIFIC ERROR INFO HERE */
Return &sText;
end-method;
See PeopleCode API Reference: Understanding Exception Class.
See PeopleCode API Reference: IBException property: Message class.