In SOA Suite 10g we were having ESB-Enterprise service bus whose main function was routing and transformation,From 11g ESB has been removed.Now we have Mediator component in place of ESB for doing the job of ESB and we have most advanced service bus Oracle Service Bus.For now don't ask me abt OSB we will check it later.
We will just use the previous exercise test case to just understand the look and field and functionality of Mediator component.
Drag and drop a mediator component in to your Jdeveloper 11.1.1.3 and choose define service later.I always prefer to define the service later even if i am using a BPEL service this is not recommended but its a gud approach.
Now choose the arrow sign in exposed service and connect it to Mediator similarly choose the outgoing arrow sign and map it to external service so your process should look like this.
Now double click on the mediator and you will see a familiar screen as of esb.
This is probably not a gud example but is only for understanding because mapping here wont be a fun to see.Again there is one important field in this page called as Resequence.This field can be set to route the data in a sequential order.
I will use a simple assign activity in this mediator to show the use case for this mediator,Just click on the assign activity in last of assign values section a window will come up like this
Click on + activity and choose expression on both the side as below
Choose on expression builder tool and select the input value that you want to get assigned.
Similarly choose output variable also to whom you want to assign the data.
Say ok and you can now see the variable in the assign
NOw in this process we are trying to get the values from the database hence it should have a synchronous reply block also defined.
For that click on the target service operation and you will get a window like this
Click on service and choose the and choose the service from which you want a call back.IN our case we want a reply from database wsdl so we chooses that.
Again we can create a variable of input type to store the values returned by the database.You can either use transformation or assign activity to get this done.I am not covering this and leaving it to you to explore its features.
Again i have found some issue with my reply from database,I used assign activity to assign the variable received from database to another variable and i got my database adapter response for the variable as
I am not sure why this attribute gets added the i went in to the source of the xsd and found it was set as
xs:element name="fName" minOccurs="0" nillable="true"
nillable="true" was the value causing the value to be displayed when i removed it ,it saw the normal structure of the elements.
Element that is nillable means that the element ca be empty without causing a validation error. For each of the XML schema built-in types that map to a Java primitive, there is a corresponding Java primitive wrapper that can be used if a nillable="true" attribute is specified.
No comments:
Post a Comment