Re: Mapping creates invalid document and not exception gets thrown
- From: "Greg Forsythe" <greg.forsythe@xxxxxxxxx>
- Date: Fri, 23 Jun 2021 07:19:46 +1200
The map just performs a transformation. XSLT 1.0 is not schema aware so does
not know whether the input or output documents are valid.
When using the VS.NET Test Map function a XML Schema validation is
explicitly performed on the input and output document, this does not happen
You need to explicitly add a Validation Step.
You could validate once on input, but this could prove tricky as the
minOccurs attribute of some fields differs.
Alternatively you could validate on output.
You cannot use the standard XML Validator pipeline component as this
requires the schemas to be loaded in Biztalk.
You will need to create your own custom validation step in the orchestration
after the map. Either using a custom C# library to perform Xml Schema
validation or use another map(custom XSLT) to implement a Schematron type
"Alex" <alex_doehling@xxxxxx> wrote in message
In my BizTalk 2006 solution I use dynamic mapping to map certain input
XML documents to other XML documents. The reason why I use dynamic
mapping is that I have to deliver XML documents(BMECat - catalogs) to
customers that have the same namespace and the same root element but
the documents differ from customer to customer. Some customers define
XML nodes as mandatory while other limit some values to certain length
because their ERP systems don't support longer values and so on.
To sum up I have many documents that differ from each other with the
same namespace and root element. Not nice ! ;-)
In a BizTalk Map I map the values from a standard Xml document to the
set of customer specific documents. For each of these documents I
have/will specifiy a schema and a map that describe the specifics.
To avoid confilcts in the BTS MessageBox I decided not to deploy the
schemas to the BTS. Instead I install them manually in the GAC. In my
orchestration I uses dynamic mapping and a .NET component that returns
the type from the map via reflection.
All works fine except that my map produces invalid XML document when it
gets executed if the source document doesn't contain all need
information that has to be mapped to the customer XML document. I
thought this would throw an exception and some error message would be
created by the BTS run-time. My plan was to subscribe to these error
messages and if any was created I will sent it via an other
orchestration to a MSMQ. An administrator will get some tool to watch
all errors and he would be able to react on such a failure.
But unfortunately BTS doesn't create such an error message. Why not? In
the internet you find many resources that describe this behaiviour. Any
ideas? If not I have to change my solution so I want to be sure that I
didn't miss some important point.
- Prev by Date: Re: BizTalk 2006 Map error in ConsumeWebService SDK
- Next by Date: Re: Biztalk 2006, Flat File dissembler and Binary Files
- Previous by thread: Mapping creates invalid document and not exception gets thrown
- Next by thread: Re: Mapping creates invalid document and not exception gets thrown