...
- Go to ESB management console and select Main→Web Services→Add→Proxy Service from the side panel.
- Click Based Proxy to create a new WSDL based proxy.
- Fill the form as follows:
- Insert a suitable Proxy Service Name (eg:
Simple_Stock_Quote_Service_Proxy)
- Set
http://localhost:9000/services/SimpleStockQuoteService?wsdl
as the WSDL URI - Set
SimpleStockQuoteService
as the WSDL service - Set
SimpleStockQuoteServiceHttpSoap11Endpoint
as the WSDL Port
- Insert a suitable Proxy Service Name (eg:
- Click Create.
- Click on the newly created proxy's name (Simple_Stock_Quote_Service_Proxy in this case) to go to its dashboard.
Adding a BAM Mediator to WSDL
...
proxy service
After creating a sample WSDL Proxy Serviceproxy service, the user can add one or more BAM mediators to the sequence of WSDL Proxy Service as follows.
- Go to the ESB's management console and select Main→Main > Axis2 Services→List from side panelServices > List menu.
- Click on Simple_Stock_Quote_Service_Proxy to go to its dashboard.
- Click on Edit link under category , Specific Configuration.Click on Next> button and then click Next.
- Select option Define Inline under category , Define In Sequence and then click on its the Create link associated with it.
- Click on Configuration Registry link, select [Sequence]-fault from the drop down list and click OK button.
- Click on Add Child link on the Root, select Agent→BAM Agent > BAM from menus.
- Select BAM element from the sequence tree and go to the form appeared below.
- Select Server Profile from the available set of server profiles in the drop down list.
- Select .
- In the form that appears, select a Server Profile and a Stream Name from the available set of stream names with the selected BAM server profile in the drop down list.Select Stream Version from the available set of stream versions with the selected stream name in the drop down list.
Click Update button. You can observe lists. Similarly, select a Stream Version. For example, Click Update. You can view the mediator XML generated for the BAM Mediator by
clicking onselecting the switch to source view
linkoption.
You canTo go back to the design view
by clicking on, click switch to design view
link.
The mediator XML is in the following format. (This is an example.). Given below is an example how the mediator XML looks:
Code Block language html/xml <bam xmlns="http://ws.apache.org/ns/synapse">
<serverProfile name="profile1">
<streamConfig name="stream1" version="1.0.0" ></streamConfig>
</serverProfile>
</bam>
Add more mediators to the WSDL Proxy Service if required.
- Click Save button, then Next and then Finish.
- Click Next> button. Click Finish button.
Now the BAM mediator is added to the WSDL Proxy Service
...
named Simple_Stock_Quote_Service_Proxy.
Send
...
messages to the ESB
At the moment all above mentioned steps should be finished to test the BAM mediator. In this step the user can send custom messages through the previously created WSDL Proxy Service and test whether they are correctly stored in the Cassandra database. This is only an example but the same type of steps can be followed to use the BAM mediator in the production environment.
...