Now it is time to practice the things you have learned.
Introducing the protocol bridge example
The protocol bridge example that is included with the distribution is a service assembly that:
- receives an HTTP request
- transforms the message using XSL-T
- and sends it to a JMS queue
Exercise
Deploy the service assembly
The service assembly for this application is available in the distribution as <servicemix_home>/examples/bridge/bridge-sa-<version>.zip. Just deploy this service assembly on ServiceMix now (If you don't remember how to deploy a service assembly, take a look at 1.4. Beginner - Running the wsdl-first example).
However, the console output seems to indicate that something is not right with this service assembly. Can you figure out what is happening?
Components
ServiceMix tells you to install additional components. This example requires additional features from the ESB: some of the service units we want to deploy target components that have not been installed yet. In order to continue,you will need to install these additional JBI components:
- servicemix-jms will allow ServiceMix to send and receive JMS message
- servicemix-saxon provides support for XSL-T and XQuery
- servicemix-eip provides support for some Enterprise Integration Patterns
Go ahead and install these components now. Refer back to 1.3. Beginner - About components if necessary. If all goes well, your console should show this output
Not only does the logging show you that ServiceMix started the three components you just installed, it also continued the deployment of the bridge-sa-<version>.zip service assembly automatically. If you point your browser at http://localhost:8192 now, you should see that the additional service is now also available.
Testing and verifying the result with JMX
You can now go ahead and test this service assembly. The distribution also comes with an HTML page to help you test this service assembly. You find this page in <servicemix_home>/examples/bridge/client.html. If you click the send button in the left side of the page, you should get an message STATUS: 202 in the right side, indicating that the request has completed successfully.
The message has been sent to ActiveMQ, the embedded JMS server in ServiceMix. If you connect to ServiceMix using JMX, you can also use the MBean view to navigate to the ActiveMQ Queue information. The attributes for the bridge.output queue show the number of messages that have been received by this queue. Verify that the queue has received your message.
While you are using the JMX console, try to find the JBI components and service assembly you have just installed in there. We have learned how to do so in 1.5. Beginner - Using JMX to look inside the ESB.
Further reading