Invoking Synchronous Oracle Mediator/ESB-Based Services
This section discusses how to:
-
Manage routing definitions for invoking synchronous Oracle Mediator/ESB-based services.
-
Set message and error logging for invoking synchronous Oracle Mediator/ESB-based services.
-
Invoke a synchronous Oracle Mediator/ESB-based service.
Prerequisites for Invoking Synchronous Oracle Mediator/ESB-Based Services
Before you can invoke a synchronous Oracle Mediator/ESB-based service, you must first consume it. Consuming Oracle Mediator/ESB-based services is described elsewhere in this section.
Managing Routing Definitions for Invoking Synchronous Oracle Mediator/ESB-Based Services
The PeopleSoft Integration Broker Consume Services Wizard creates an outbound routing definition for the consumed service.
Before you invoke a synchronous Oracle Mediator/ESB-based service in the PeopleSoft system, perform these tasks:
-
Access the Routings – Connector Properties page ( and click the Connector Properties tab).
-
Ensure that the Connector ID field is set to HTTPTARGET.
-
Ensure that the value in the Primary URL field is set to the endpoint URL.
-
Set any other HTTP target connector properties as desired.
Setting Message and Error Logging for Invoking Synchronous Oracle Mediator/ESB-Based Services
To capture the maximum amount to message and error logging and information when you invoke the service, set the following options:
-
On the Routings – Routing Definitions page () set the value in the Log Detail field to Header and Detail.
-
In the integrationGateway.properties file set the ig.log.level property equal to 5.
Invoking a Synchronous Oracle Mediator/ESB-Based Service
The following sample PeopleCode demonstrates one way to invoke a synchronous Mediator/ESB-based service:
Local string &payload, &responseStr;
Local Message &msg, &reply;
Local XmlDoc &xml;
/* --- set input request message--- */
&payload = "<?xml version='1.0' encoding='UTF-
8'?><SynchAdd_ESBProcessRequest
xmlns='http://xmlns.oracle.com/SynchAdd_ESB'><input1>1234</input1><input2>12
34</input2></SynchAdd_ESBProcessRequest>";
MessageBox(0, "Request Message", 0, 0, &payload);
&xml = CreateXmlDoc(&payload);
&msg = CreateMessage(Operation.ESBSYNCADD, %IntBroker_Request);
&msg.SetXmlDoc(&xml);
&reply = %IntBroker.SyncRequest(&msg);
If All(&reply) Then
&responseStr = &reply.GenXMLString();
MessageBox(0, "Request Message", 0, 0, (&responseStr));
Else
WinMessage("Error. No reply (or NULL) from LaunchSyncESBProcess");
End-If;
On execution the system displays the request message that the system sends to Oracle Mediator/ESB. If the invocation is successful, the system displays another box that shows the response from Oracle Mediator/ESB.
Use the PeopleSoft Integration Broker message logs to view the flow of the messages. You can also use the Integration Broker Service Operations Monitor to view information about the outbound transaction.
See Managing Integration Gateway Message and Error LoggingIntegration Broker Service Operations Monitor: Viewing Monitor Output for Synchronous Service Operations Data.
Use the Oracle Mediator/ESB Console to check for the Mediator/ESB instance and for the successful invocation of the Mediator/ESB service.