Integrating MagooClient with Apache ActiveMQ/CXF(3)
MagooClient: WSDL Import
In order to recognize and validate a SOAP/XML message, MagooClient needs to be able to associate certain elements within the message with a schema or WSDL definition. Therefore for MagooClient to ‘learn’ the processPackingSlip and rectifyPackingSlip types, it is first necessary to import the WSDL.
The simplest way to do this is to select the New button in the main MagooClient window. A list of recognized message types will be displayed. Click on the Import WSDL… button and browse to the MagooLogisticsApacheCXF_2_0_1.wsdl file located in the wsdl directory of the demo pack. Click on OK and two new message types (MagooLogisticsService_processPackingSlip, MagooLogisticsService_rectifyPackingSlip) should appear in the list of available types.
MagooClient will now be able to recognize SOAP messages corresponding to these service operations and validate them accordingly.
MagooClient: JMS Configuration
As can be seen from the WSDL definition above, the RectifierService, representing the MagooClient human interaction uses a queue (dynamicQueues/demo.rectify) as the service endpoint. Therefore it is necessary to configure a JMS transport to enable MagooClient to listen on this queue. Setting up a JMS transport also allows MagooClient to send to an arbitrary JMS destination based on the configured connection factory and JNDI details.
Select Communications… from the Configure menu in the main MagooClient menu system. The list of configured transports will appear. Click on Add… and select ActiveMQ. A JMS Transport configuration dialog will then appear – this will be pre-filled with the default settings for an ActiveMQ 4.1.1 JMS client:
If the default Apache ActiveMQ settings are used then only the following fields will need to be filled-in:
Click on Test Connection and a message box should appear indicating that connection has been successfully established. Now click on Save to store the details and activate the transport.
A transport icon representing the ActiveMQ transport should now appear in the main MagooClient window with a green arrow symbol indicating that the transport is actively listening. A rectifyPackingSlip message will also immediately appear in the inbox.
This message was put onto the rectify queue by the ProcessorService during the demo component set-up. Note that MagooClient has automatically validated the inbound message. Double-click on the message to open it using the MagooClient message editor. The default rendering engine will be applied to create a form based on the MagooLogistics WSDL and Schema information. In a later section we’ll see how the form look and feel can be easily customized using standard XSL stylesheets.