Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
udo_martens
Active Contributor

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.

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.


 

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>

Labels in this area