none
WCF-SQL Adapter and Multiple Schema Matched Error RRS feed

  • Question

  • Hello,

    This newbie (me) is trying to poll from two separate SQL data sources using the WCF-SQL Adapter.  I'm getting the following error:

    Cannot locate document specification because multiple schemas matched the message type "http://schemas.microsoft.com/Sql/2008/05/Polling/#Polling".

    I understand why this is happening.  When I look at the XSD file that is automatically generated in Visual Studio, I notice that the targetNamespace is "http://schemas.microsoft.com/Sql/2008/05/Polling/".  How can I change the namespace generated using the WCF-SQL adapter so that it is unique?

    Note that I am just using "Polling" instead of "TypedPolling" because the schema of what I'm polling may differ from request to request.  Also, I've tried entering in a value for "XmlStoredProcedureRootNodeNamespace", but it seems to be ignored.  My backup plan is to use the old SQL Adapter as it's easy to specify a namespace there.

    Here's a copy of the XSD generated.  Thanks!!

    glenn.

    <?xml version="1.0"?>

    <schema xmlns:ns3="http://schemas.datacontract.org/2004/07/System.Data" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/Sql/2008/05/Polling/" version="1.0" xmlns="http://www.w3.org/2001/XMLSchema">

      <import schemaLocation=".\SQL1Test_System_x2eData.xsd" namespace="http://schemas.datacontract.org/2004/07/System.Data" />

      <annotation>

        <appinfo>

          <fileNameHint xmlns="http://schemas.microsoft.com/servicemodel/adapters/metadata/xsd">Polling</fileNameHint>

        </appinfo>

      </annotation>

      <element name="Polling">

        <annotation>

          <documentation>

            <doc:action xmlns:doc="http://schemas.microsoft.com/servicemodel/adapters/metadata/documentation">Polling</doc:action>

          </documentation>

        </annotation>

        <complexType>

          <sequence>

            <element minOccurs="1" maxOccurs="1" name="PolledData" nillable="true" type="ns3:ArrayOfDataSet_b29dd4" />

          </sequence>

        </complexType>

      </element>

    </schema>

     

     

    • Moved by Ben Cline1Moderator Thursday, May 5, 2011 12:14 AM Related to adapters (From:BizTalk Server General)
    Wednesday, May 4, 2011 5:21 PM

Answers

All replies

  • You can specify a inboundID  in the connection string to make it unique.

    http://msdn.microsoft.com/en-us/library/dd788529(BTS.10).aspx


    Rohit Singh
    Friday, May 6, 2011 11:31 AM
  • I also get this error regarding my polling, even though I have specified an Inbound ID as described above.

    Does BT need a schema for the Polling Response?

    • Edited by Jimbox13 Wednesday, September 21, 2011 7:03 PM
    Wednesday, September 21, 2011 7:02 PM
  • You need the schema for polling response, if you are using XML pipeline. For pass-through pipeline it is not required.

    Also, you need to specify the InboundID both while generating the schemas (in VS), and while configuring the physical port in ( Biztalk MMC).


    Rohit Singh
    Thursday, September 22, 2011 6:00 AM
  • From my understanding, this has nothing to do with Inbound ID. Gkcvan is using 2 different data sources, so the Inbound id would already be different.

    The error is typical of having more than 1 schema with the same messagetype deployed in you app. 

    So to answer you question, In general, you can change the namespace of the schema you want in the vs schema editor (namespace property..).

    But if you have more than one schema of type  http://schemas.microsoft.com/Sql/2008/05/Polling/#Polling that are deployed, you will have to remove one and it will work   


    Patrick Delifer, MCTS BizTalk Server 2006
    Thursday, September 22, 2011 2:23 PM
  • If it a normal case of types conflict, you can also check the check-box(bottom left corner of the adapter wizard) "Generate unique Types" while generating the schemas.
    Rohit Singh
    Thursday, September 22, 2011 2:32 PM
  • Thanks for the insight everybody.

    Where does the type "http://schemas.microsoft.com/Sql/2008/05/Polling/#Polling" come from?  I've looked high and low in all of my source files (searched all file contents) and cannot find it anywhere in the artifacts.  It must be coming from the Admin Console/Service/Innards of Biztalk?!?!

    I suspect that it is a special Microsoft reserved schema. But if not, why would the generated tools use the same name?? Usually the files/names get auto generated with a # at the end.  GeneratedFile.xsd,  GeneratedFile1.xsd, etc?

    Any tidbit of into at all will help shed some light on this for me...

     

    Thursday, September 22, 2011 2:56 PM
  • look in the bts admin console under schemas (Biztalk.System or Biztalk.App1 application)
    Patrick Delifer, MCTS BizTalk Server 2006
    Thursday, September 22, 2011 3:03 PM
  • Thanks for the speedy reply!

    I went in the bts Admin Console, under <All Artifacts>  - Schemas.  and sorted by "Target Namespace" and also tried "Name" and do not see it.  I also looked under "BizTalk.System" Application - Schemas with no luck.

    Is it supposed to be there?  Maybe that's my problem?

    I assumed it was a Microsoft reserved/special Schema that was basically just a single integer column to hold the result of Polling Data Available.  (The one where if there is >0 rows it will call the polling statement).  Isn't that what this is?  If so, I wonder why BT doesn't recognize it's own internal construct?

    Do I have an install problem? should I create a new Schema by hand?


    • Edited by Jimbox13 Thursday, September 22, 2011 3:19 PM
    Thursday, September 22, 2011 3:18 PM
  • What does the namespace of the generated polling schemas liike ?

    Can you share the schemas genarated when you add the polling operation to your project ?


    Rohit Singh
    Thursday, September 22, 2011 3:23 PM
  • As far as I know, I didn't add polling to my BizTalk project (sln and btproj in VS).  I hoped that I could just change the Recieve Location and not alter/recompile/redeploy the whole solution again?  Seems like there is going to be a lot of coupling in BT...

    Do I have to add another schema to the project for the Polling Available stored procedure?  If so, how do I tie this in to the sqlbindings?  I'd prefer to not used a typed Polling Avail response.  The integer 0 or >0 approach is preferred.

    Below is the schema generated when I provided the stored procedure that will be used as the Poll Statement (not Polling Data Available Statement)

    - <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:ns3="http://schemas.datacontract.org/2004/07/System.Data" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/Sql/2008/05/Procedures/dbo" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:import schemaLocation=".\SN_DataSetSchema.xsd" namespace="http://schemas.datacontract.org/2004/07/System.Data" />
    - <xs:annotation>
    - <xs:appinfo>
      <fileNameHint xmlns="http://schemas.microsoft.com/servicemodel/adapters/metadata/xsd">Procedure.dbo</fileNameHint>
    - <references xmlns="http://schemas.microsoft.com/BizTalk/2003">
      <reference targetNamespace="http://schemas.datacontract.org/2004/07/System.Data" />
      </references>
      </xs:appinfo>
      </xs:annotation>
    - <xs:element name="procAmpSelect">
    - <xs:annotation>
    - <xs:documentation>
      <doc:action xmlns:doc="http://schemas.microsoft.com/servicemodel/adapters/metadata/documentation">Procedure/dbo/procAmpSelect</doc:action>
      </xs:documentation>
      </xs:annotation>
    - <xs:complexType>
      <xs:sequence />
      </xs:complexType>
      </xs:element>
    - <xs:element name="procAmpSelectResponse">
    - <xs:annotation>
    - <xs:documentation>
      <doc:action xmlns:doc="http://schemas.microsoft.com/servicemodel/adapters/metadata/documentation">Procedure/dbo/procAmpSelect/response</doc:action>
      </xs:documentation>
      </xs:annotation>
    - <xs:complexType>
    - <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="procAmpSelectResult" nillable="true" type="ns3:ArrayOfDataSet" />
      <xs:element minOccurs="1" maxOccurs="1" name="ReturnValue" type="xs:int" />
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:schema>



    • Edited by Jimbox13 Thursday, September 22, 2011 3:40 PM Clarification
    Thursday, September 22, 2011 3:30 PM
  • "  I hoped that I could just change the Recieve Location and not alter/recompile/redeploy the whole solution again?  "

    Is this a migration scenario(migrating from the old adapter to the WCF-SQL adapter)?

    If that is the case, then did you have alook of XMLPolling ?

    Section  3.  in the following post describes XMLPolling -

    http://blogs.msdn.com/b/adapters/archive/2008/10/06/multiple-ways-to-poll-receive-location-in-biztalk-in-the-sql-adapter.aspx


    Rohit Singh
    Friday, September 23, 2011 6:20 AM
  • Thanks for reading my question and responding!

    No I am not moving from an old adapter to a new one, but I will read the document there at that link.

    (FYI I am building a new setup from scratch.)

    Friday, September 23, 2011 2:51 PM