Integrating MagooClient with JMS SOA (4)
Message Transformation
As can be seen from the WSDL definition, there are two operations involved in this scenario – rectifyPackingSlip and processPackingSlip – the latter is required when submitting PackingSlips back into the ProcessorService. Although the message contents are similar, the operation and therefore top-level element name under the SOAP Body differ. In order to re-submit the PackingSlip back onto the process queue therefore, MagooClient needs to transform the rectifyPackingSlip to a processPackingSlip message. This type of message transformation i.e. the copy of context or data from one message type to another when interacting with a Service is common within SOA message flows.
To facilitate this transformation, MagooClient offers two key pieces of functionality:
Click on Ok to proceed with the transform generation. MagooClient will attempt to identify commonalities between the parameter sets for the two messages and create XSLT copy-of elements accordingly. If no matches are detected then the transform will simply create an empty version of the target message type. As the transforms are based on standard XSLT then can be easily tailored to achieve the required transform behaviour.
Once the transform has been completed, select a sample rectifyPackingSlip message in the MagooClient inbox and click on Reply. A new processPackingSlip draft will be created from the rectifyPackingSlip message using the transform and all of the PackingSlip details will be copied across. Note that the target destination in the To: line will be automatically set to the process queue details from the WSDL definition.