WCF-SQL Binding property UseDatabaseNameInXsdNamespace RRS feed

  • Question

  • Hi,

    There is a binding property named "UseDatabaseNameInXsdNamespace" that can be used in the WCF-SQL send ports.  It is explained here (Microsoft doco):


    Specifies whether the XSD generated for a particular artifact contains the database name. Set this to True to include the database name. Otherwise, set this to False. Default is False.

    This is useful in scenarios where a single application wants to execute operations on identically named artifacts with different metadata in different databases. If there is no database name in the namespace, the generated metadata will conflict. By setting this binding property you can include the database name in the namespace, thereby making them unique. Here is an example highlighting the change in namespace.

    UseDatabaseNameInXsdNamespace = False

    UseDatabaseNameInXsdNamespace = True

    Notice that the database name is included in the namespace when the binding property is set to True.


    I have tried this but Im getting the following error:

    A message sent to adapter "WCF-SQL" on send port "[send port name]" with URI "mssql://localhost//BizTalkSqlWcfTesting?" is suspended.

    Error details: Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The start element with name "Student" and namespace "" was unexpected. Please ensure that your input XML conforms to the schema for the operation.

    The message looks like this:

    <ns0:Insert xmlns:ns0="">
        <ns1:Student xmlns:ns1="">
          <ns1:Name>John Smith</ns1:Name>
        <ns1:Student xmlns:ns1="">
          <ns1:Name>Joe Blow</ns1:Name>

    The database name is BizTalkSqlWcfTesting and its trying to insert records to the table Student.  When I did not have the database name in the namespace and the property was set to false all is fine.

    Has anyone got this property to work?

    Thanks in advance. 


    Monday, February 8, 2010 1:01 AM


  • Hi John,

    I think you have to create three schema's (for each environment). I do not think you can get around the fact that the namespace database must match the send port database name.


    Steef-Jan Wiggers
    MCTS BizTalk Server
    If this answers your question please mark it accordingly

    BizTalk Server
    • Marked as answer by John Devers Wednesday, February 10, 2010 10:11 PM
    Wednesday, February 10, 2010 8:24 AM

All replies