What
is Middleware
A
software that helps disparate and distributed applications to collaborate with each otherSOA
is the hottest middleware
strategy till date.SOA Not
a technology or product, more a design approach
Oracle SOA Suite
Provides
“components” for designing, deploying, and managing
“composite applications”.
“Composites”
enable
you to easily assemble multiple technology components into one SOA
composite application
“Components”
BPEL
OSB
Mediator
Human
Workflow
Business
rules
Adapters
(FTP, DB, AQ, JMS, MQ, Apps, Siebel, PSFT…)
BAM
ODI
Introduction
to WSDL
Web
Services Description Language is an XML-based language used to define
Web services and describe how to access them.
Working with a Mediator : Echo Pattern
This blog shows you how to work with a Mediator component in Oracle SOA Suite 11g.
This example uses the Echo pattern of the Mediator. An Echo is a simple "reply to the caller" pattern where the requestor immediately gets back a response.
This is typically used in use cases where a certain message has to be enriched, or some filtering to be done, etc.
Creating a Mediator
Create a new SOA Project, name it MediatorEchoPattern, select empty template
Defining the Schema
To begin with, define the message structures that will be used in the example.
In this tutorial, we will send in a message {firstName, lastName} and get back {fullName}. Based on this, define the xsd file
Rt click on xsd folder --> new --> All technologies --> xml schema --> name itEchoPatternSchema

Define the schema as shown below

Creating the Mediator
Open composite.xml, drag and drop the Mediator component from the component palette to the components swimlane of the composite.xml
Name it EchoMediator, template as Define Interface Later. This interface will be created when we create a WebService and wire it to this, later.

This step creates an empty mediator.
Create a service endpoint
Mediator exists in the Components swimlane which is not directly exposed to the external world. In order to access it, we need to create a service endpoint through which external clients can access this component.
Here, we create a WebService with request and response types as defined in the schema earlier
To create a WebService, drag and drop the Web Service from the component palette to theExposed Services swimlane of the composite.xml
Name it EchoMediatorClient
In the WSDL url, select the second option Generate WSDL from Schema.
This will open a WSDL generation wizard where we need to select the Interface type and the message types for input and output. Select them as shown below

This will create a WebService in the composite.xml
Now, wire the Webservice to the mediator as shown

Creating the Echo Pattern
Now that the wiring is done, the only thing remaining is to define the message flow
In this example which is an echo pattern, the request comes from the WebService, goes to the mediator, undergoes some transformation in the mediator, and finally is routed back to the WebService.
Hence, we need to create a routing rule in the mediator with an Echo Pattern
Double click on the mediator component in the composite.xml which will open a .mplan file which is the heart of the mediator component where all the operations of the mediator as defined in the other blog are to be defined.
For this tutorial which is more like a HelloWorld example, just a transformation file would be sufficient.
Click on the + icon of the Routing Rules --> Static Routing Rule --> Echo


This will add a Routing rule section in the file.
Here, we add a transformation file to transform the input message to the output message. Transformation file is mandatory for any type of mediator as that is the link that connects the input to the output within the mediator.
Click on the button at the end of the Transform Using, create a new mapper file and accept the default name

This will open up a new wizard, where we can do all the transformations.
In this example, we need to concatenate the firstName & lastName, append hello to it, and assign it to the output
Concat function is available in the component palette at the right when you open the transformation file. Drag and drop this function to the middle section of the wizard,
then drag a line from each of the inputs to it, then double click on the concat function to addhello, and finally map it to the fullName at the right, as shown below

Thats it, you're done!
Deploy this project. How to deploy is mentioned in this blog
EM URL : http://<host>:<adminPort>/em
Select the project under SOA-->soa_infra, click on test



This is main logic behind Alarm
==========================================================================
SOA:JMS Queue Guide
==========================================================================
Java Messaging Service is an API that provides reliable, asynchronous communication between applications in a distributed computing environment. It enables a Java applications that share a messaging system to exchange messages and Simplifies application development by providing a standard interface for creating, sending, and receiving messages.
To Know about JMS Topic Please refer to: Basic JMS Demo using WebLogic Topic
What are major components of JMS system?
A). JMSServer: JMS server is an environment-related configuration entity that acts as management container for JMS queue and topic resources defined within JMS modules that are targeted to specific that JMS server.
B). JMS Modules: JMS modules contain configuration resources, such as standalone queue and topic destinations, distributed destinations, and connection factories. In WebLogic Server these Configurations can be seen inside “<DOMAIN_HOME>/config/jms” Directory.
C). JMS Client: A JMS is a JMS applications that either produce messages to destinations or consume messages from destinations.
D). JNDI : Java Naming And Directory interface,It is a Java API for a directory service that allows Java software clients to discover and look up data and objects via a name.
E). Persistent Store: It can be a UserDefined Persistent Store or a Default Persistent store. It is used for storing the Data (Messages).
Here we are going to see how we can configure WebLogic JMS Server, JMS Modules (Queue/ConnectionFactory) how to Target them and then How to test it using a Simpel Java Programs.
Step1). Start your WebLogic Server an Login to the AdminConsole.
Step2). Create a JMS Server…
Step3). Configuring JMS Module:
Step4). Creating Connection Factory:
Step5).Creating JMS Queue:
Step6). Now Write a Simple Java Program to send the Messages to this JMS Queue…like following:
“QueueSend.java”
Step7). Now run the “setWLSEnv.cmd” and then compile and Run the QueueSend program.
java QueueSend t3://localhost:7001
Step8). Now Login to AdminConsole to check that the Message is arrived in the JMS Queue or Not?
home—> Services–> Messaging–> JMS Modules–> MySystemModule–>MyQueue–> Monitoring–> MySystemModule –> MyQueue (Check the CheckBox)–> Show Messages(Click This Button)
Step9). Now write the following “QueueReceive.java” program to read JMS Messages from the JMS Queue.
“QueueReceive.java”
Step10). Now compile and run the QueueRecieve.java program to read the messages from WebLogic JMS Queue.
java QueueReceive t3://localhost:7001
Reference:http://middlewaremagic.com/weblogic/?p=1987


No comments:
Post a Comment