Integrating MagooClient with Apache ActiveMQ/CXF(5)

MagooClient Stylesheet Overview

MagooClient allows its default form-rendering capability to be overridden using user-defined stylesheets. These stylesheets convert the XML message content to an XHTML representation which is then rendered by MagooClient. This rendering is somewhat similar to a regular browser but in the MagooClient case, it is augmented by automatic field validation based on the underlying WSDL/Schema. This allows the customizability of XSL stylesheets to be combined with the powerful validation capabilities of MagooClient.

 

Stylesheets are based on standard XSL 1.0 and a stylesheet generator is provided to speed-up the stylesheet development process.

 

Configuring Stylesheets

The MagooLogisticsForm.zip contains two stylesheets to render the rectifyPackingSlip and processPackingSlip messages. This stylesheets customize message presentation by hiding, re-positioning and re-naming fields – images and additional text have also been added to make the look and feel more user-friendly.

 

In the case of the processPackingSlip message, buttons have also been added to allow users manipulate the message content – in this case adding/removing ErrorNote and ShipItem elements. Scripts (based on JavaScript + XML) are associated with the onClick attributes of buttons within the form and are activated accordingly. These scripts use regular JavaScript (E4X) to add and remove XML content. The form view is automatically re-rendered once a script has been run to reflect any changes to the underlying message XML content.

 

To configure the stylesheets, select Configure->Message Types… from the main MagooClient menu. Double-click on the processPackingSlip message type and select the Stylesheets tab. Click on the Add… button for the Request Stylesheets and select the MagooLogisticsService_processPackingSlipRequest.xsl stylesheet. Now click on Default to set this as the default stylesheet for requests of this message type.

 

 

Now select a rectifyPackingSlip message in the MagooClient inbox and click on Reply. A new processPackingSlip draft will be created and the form will be rendered using the stylesheet. Note that the left-hand navigation tree and advanced menu items such as script, stylesheet and transform menus can be hidden by setting the User Mode to ‘User’ – this is achieved using the Configure->Settings… dialog from the main MagooClient menu.

 

 

Note that the target To: address is automatically set to the ProcessorService endpoint in the WSDL definition i.e. dynamicQueues/demo.process. Also, even thou the form appearance has been customized, the underlying XML validation is still in operation – the Account Nr. field has been highlighted as it should contain a valid numeric value.

 

This completes the blueprint scenario. For further details on MagooClient, including free evaluations, please see www.magoosoft.com or contact info@magoosoft.com if you have any further questions.

 

 

< Previous 1 2 3 4 5