My previous blogpost was about how to configure the SOA Suite EDN for JMS ( EDN-JMS ) instead of AQ (EDN-DB) and in this blogpost I will show you how you can publish events from Java and OSB.
Before we start you should know that we can only make Remote Event Connections because you are running the Java or OSB process in a different JVM then the SOA Suite. And only asynchronous subscriptions will be supported for remote event connections.
First let's create a Java Client which publish the events directly to the SOA Suite Server. I will use the jars of the SOA Suite. This is not necessary. You can just publish a JMS text message and set some JMS Header properties (MessageType and SideCar )
Make a new JDeveloper project which contains the following libraries.
Here is my test class.
And this will produce the following event on the EDN Queue.
The second part of this blogpost is how to do this in OSB.
Before we can work on the Proxy or Business Service we need to create a Foreign JNDI Provider on the WebLogic Service. ( You can also use a JNDI Provider of the OSB Configuration project )
Provide the SOA Server details.
Provide the local and remote EDN-JMS JNDI Link names. The Remote JNDI Names are fixed but you can change your local ones.
Restart the OSB Server and open OEPE or the SBConsole.
Create a new Business Service and choose for Messaging Service as Service Type.
Event is an One Way Operation so only need to set the Request Message Type to text.
Use the Local JNDI names of the Foreign JNDI Provider in the Endpoint URI
Select Text as Message Type.
Create a Proxy Service which call this Business Service, where we will replace the Body contents with the event data and set some JMS Headers in the Transport Header.
My test event, the values of Id and ecid element contains unique UUID values.
And the last part is to set the Messagetype and SideCar JMS Headers
SideCar in my case
You can test the Proxy Service in the SBConsole.