The OnRequestSend handler can be used in Synchronous and Asynchronous service outbound operations. It allows you to manipulate the message content before it get to the subscribing node and before any transformations happen. You can use this to customize the message or the connector properties specific to a node.
From PeopleBooks:
Any content data that is changed on the message or XMLDoc is sent to the subscribing node or used within a transformation.
import PS_PT:Integration:ISend;
class syncOnRequestSendHandler implements PS_PT:Integration:ISend
method OnRequestSend(&Msg As Message) Returns Message;
end-class;
method OnRequestSend
/+ &Msg as Message +/
/+ Returns Message +/
/+ Extends/implements PS_PT:Integration:ISend.OnRequestSend +/
&Msg.IBInfo.ConnectorOverride = True;
Local File &f;
&f = GetFile("D:\psft\OnRequestSend.log", "W", %FilePath_Absolute);
Local XmlDoc &xmldocRequest;
&xmldocRequest = &Msg.GetXmlDoc();
Local XmlNode &childNode;
&childNode = &xmldocRequest.DocumentElement.AddElement("OnRequestSend").AddText("I modified the message");
&f.WriteLine("time" | %Datetime);
&f.WriteLine(&xmldocRequest.GenXmlString());
&f.Close();
&Msg.SetXmlDoc(&xmldocRequest);
Return &Msg;
end-method;
Chris Malek is a PeopleTools® Technical Consultant with over two decades of experience working on PeopleSoft enterprise software projects. He is available for consulting engagements.
Work with ChrisSWS turns SQL into production REST APIs — ready for AI, modern apps, and partner integrations. One install, unlimited potential.
A powerful PeopleSoft bolt-on that makes REST web services easy. You bring the SQL, SWS handles the rest.
Traditional PeopleSoft web services cost $3,600–$13,000 each to develop. SWS deploys production REST APIs in under 5 minutes through configuration alone.
Turn PeopleSoft data into clean REST APIs for AI integrations, modern applications, and vendor data feeds. Configuration-driven — no PeopleCode required.