Re: Mapping creates invalid document and not exception gets thrown

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
at runtime.

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
validation.

Greg

"Alex" <alex_doehling@xxxxxx> wrote in message
news:1150984596.171107.246260@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello !

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.


Thanks!
Alex



.



Relevant Pages

  • Re: Mapping creates invalid document and not exception gets thrown
    ... When using the VS.NET Test Map function a XML Schema validation is ... the documents differ from customer to customer. ... All works fine except that my map produces invalid XML document when it ...
    (microsoft.public.biztalk.general)
  • Mapping creates invalid document and not exception gets thrown
    ... In my BizTalk 2006 solution I use dynamic mapping to map certain input ... the documents differ from customer to customer. ... All works fine except that my map produces invalid XML document when it ...
    (microsoft.public.biztalk.general)
  • Re: Schema Question
    ... Is there a good example how to use a schema to map to ... with another application via xml. ... Well you can generally parse an XML document without validating or having ...
    (microsoft.public.dotnet.xml)
  • RE: Handling xml:lang attributes
    ... BizTalk produces the following XSLT code from the map: ... standard one for the "xml" prefix, ... but if the schema is re-saved in VS it ... Then create and use a BizTalk map with the "Custom XSL Path" ...
    (microsoft.public.biztalk.general)
  • Re: problem - get the @@identity in MAP
    ... this is my updategram schema structure(i.e Destination schema for Map) ... The adapter "SQL" raised an error message. ... The adapter failed to transmit message going to send port ...
    (microsoft.public.biztalk.general)