Skip to Content

Background

Messages, which pass BPM container, are validated for the Message Type referred in the abstract Interface. For some reasons it is useful to suppress the validation like in conventional message processing without BPM. This reasons could be:

    • No control at sender side, we expect serveral “dialects” of one message
    • The Business Process is used for more than one kind of sender Message Type
    • Preparing a complex data type would result a significant increase of development time

Solution by Serialization

The validation can be suppressed by serialization before and a deserialization after the Business Process. This can be done by a simple XSLT mapping, which transfers the content of a XML message to an unparsed string using the CDATA tag.

Message Flow

Example

In the following example any XML source can be used. The result of the mapping is wellformed XML with only a root element “STRING”. Its content is the CDATA element with the original XML message, which is now NOT parsed. The Datatype used
for the abstract Interface contains as well only one element “STRING”. The abstract Inteface / the container can be used for
EVERY message.

Serialization  

Source Codes

Serialization

<?xml version=”1.0″ encoding=”UTF-8″?>

<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform“>

<xsl:template match=”/”>

  <STRING>

   <xsl:text disable-output-escaping=”yes”><![CDATA[<![CDATA[]]></xsl:text>

   <xsl:copy-of select=”*”/>

   <xsl:text disable-output-escaping=”yes”><![CDATA[]]]]></xsl:text>

   <xsl:text disable-output-escaping=”yes”><![CDATA[>]]></xsl:text>

  </STRING>

</xsl:template>

</xsl:stylesheet>

Deserialization

<?xml version=”1.0″ encoding=”UTF-8″?>

<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform” xmlns:fo=”http://www.w3.org/1999/XSL/Format“>

<xsl:template match=”/”>

  <xsl:for-each select=”//STRING”>

   <xsl:value-of select=”.” disable-output-escaping=”yes”/>

  </xsl:for-each>

</xsl:template>

</xsl:stylesheet>

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply