Create a new bpe(synch)l with name SayHello
Uncheck the exposed as a SOAP ServiceClick ok
Click on xsd of SayHello Bpel
Modify xsd like this
After that come to our bpel
Take one assign activivty
Double click on assign activity do copy operation
Left side from expression and right side to variable
Click on expression builder
In Expression Builder do like this
Then click on okAssign this expression to output variable result
After that come to composite .xml file
Take one more bpel (synch) name it as SayWelcome
Than clilck on oknow expand saywelcome.xsdModify like this
Save all..Again come to saywelcome bpel
Take on e assign activity and name it as assign_outputDouble click on assign activity..FromType: expressionToType: variable
Now assign expression to output variable i.e for result
Then click apply
Now close all widows..again open composite.xmlJust drag and drop one mediator
You need to check the check box..The screen will be like this
Just expand the singlestring.xsd of mediatorin application navigator
Then go to HelloOrWelcome.wsdl
Click on source tab at below.
In the wsdl of HelloOrWelcome of mediator the request and response of type singlestringSo we need to modify the request of type and response of type.
So now click on singlestring.xsd
Modify singlestring name as HelloOrWelcomeRequest
Modify input name as name
After that add one more element
modify element name as targetof type string
Now double click on schema u will get screen like this
Rename the element 1 name as HelloOrWelcomeResponse
Add sequence for HelloOrWelcomeRespone element
It look like this
After insert element in sequence.
Name it as greetings for element 1
Set type for this element
And finally save all .You need to change the HelloOrWelcome.wsdl typeSo Modity Requestmessage element name as HelloOrWorldRequestModify Responsemassage element name as HelloOrWorldRespone
Save all .. Now go to composite.xmlNow make a wire to SayHello to our mediator
And make a one more wire to SayWelcome
The mediator mplan will be like this.
Just click on filter expressionyou wil get below screen
After that expand all nodes.Assign like this
Then ckick on ok.Now click on transformation usingcreate new Mapper file
Make transformation to name to name.And save all.And do transformation in synchronous reply.
Result to greeting..
And write filter condition for routing to SayWelcome..
OkAfter that click on transformation using of ..
Click ok and Make transformation
Do same as also in synchronous reply.result to greetings
And finally deploy ur object
U can test at em console level..target as either Hello Or Welcome
And then click web service,u wil get output like this.
Top Related