Solving a multiple schema definiton problem

Home Page Forums BizTalk 2004 – BizTalk 2010 Solving a multiple schema definiton problem

Viewing 1 reply thread
  • Author
    Posts
    • #17372

       

      Hello,

       

      Our problem is the same old multiple schema definiton case:

                 

                  Cannot locate document specification because multiple schemas matched the message type COMPANY_CONFIRMATION.

       

      ..which actually is not a problem on the Biztalk side because it uses the root node and namespace to uniquely identify the type of the message.

       

       

      Our case is simple, we receive different types of xml files to a single location. The file naming convention is same for all these files so we cannot filter them by name or extension.

       

      We're using the schema generator to produce the schemas.

       

       

      The xml files we receive share the same root node name. They only differ by their InstrumentType attribute.

      There's also no namespace information within the file.

       

      Here are three sample root nodes:

       

      <COMPANY_CONFIRMATION InstrumentClass="FX" InstrumentType="TYPE1">

       

      <COMPANY_CONFIRMATION InstrumentClass="FX" InstrumentType="TYPE2">

       

      <COMPANY_CONFIRMATION InstrumentClass="FX" InstrumentType="TYPE3">

       

       

      We tried several things such as the custom pipeline solution by producing and applying different schemas to the incoming files during the disassemble phase. We also set different target namespaces for each schema hoping that the disassembler would match the suitable schema with the file.

       

      We also set the InstrumentType fixed property of the attributes respectively as TYPE1, TYPE2, TYPE3.

       

       

      Since none of these worked, the question comes along: Is there any way we can tell Biztalk to match the file to an appropriate schema when there's no namespace information within the files and the root node names are the same? Using the provided Biztalk 2006 tools?

       

       

      Thanks and regards.

       

       

      Emre.

    • #17373

      Emre,

      I think you have the same problem we did; XMLs exported from a legacy system were missing the namespace so to BizTalk they were all the same.  As we needed to process several XMLs at once, our solution was to split off the metadata from the XML so there were two inbound schemas.  Works like a charm!  The inbound schema with the metadata goes nowhere, the schema with the data gets processed.

      I have some pics but this thing won't let me paste them.  Let me figure this out and hopefully I can help you.

       

      • #17411

        Hi Henry,

        Thanks for the input.

        Here is what we did to solve the issue:

        Since all the message types had somewhat similar node elements in common with different orders with no specific sequence, we designed a single common schema definiton with "Group Order Type" set to "All" instead of "Sequence".

        Surely that was not by itself enough, we had to set the "minOccurs" property of the uncommon child record elements to 0. By this way, we were able to produce a common schema for all messages. Also the need for a custom receive pipeline was eliminated, the default xmlreceive pipeline was just sufficient.

        In fact this workaround was suitable for our situtation where incoming message types shared a common backbone and things are not so complex.

        Thanks again for input and hope this helps others.

        Emre.
         

         

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.