none
WCF-SQL Adapter : Please ensure that your input XML conforms to the schema for the operation. RRS feed

  • Question

  • Hi,

     

    I am trying to insert the data in sql server for which i created the schema of inserting in particular table using Consume Adapter Service.

    I getting following error while inserting data in table.

     

    Details:"Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The start element with name "Insert" and namespace "http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/StagingTbl" was unexpected. Please ensure that your input XML conforms to the schema for the operation.

    In another project i am inserting records in same table, so I think the namespace are same (generate from Consume Adapter Service).

    I tried changing Target namespace of InsertTableOperation.dbo.StagingTbl.xsd with different name, but still getting error

    Both application are deployed on same machine.

    If I delete any one of them then it works fine, but both application cannot run simultaneously.
    Need a help ...
    Thank you
    Sachin

     


    Monday, June 13, 2011 9:16 AM

Answers

  • Hi Sachin,

    Inserting data in a table in SQL using WCF-SQL should not be a problem. I have an environment with BizTalk 2009, VS 2008 and SQL Server 2008 and it works, see my post on table operations. Error has nothing to do with installation of the adapter.

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly

     


    BizTalk
    Wednesday, June 15, 2011 6:46 AM
    Moderator

All replies

  • On your send port, have you specified the following SOAP Action header: "TableOp/Insert/dbo/StagingTbl"?

     

    Morten la Cour

    Monday, June 13, 2011 9:41 AM
  • Hi La Cour,

     

    Do you mean that while creating the Insert schema using consume adapter service i need to specific Inbound Id and same should be specified under SOAP Action header

    for e.g. "TableOp/Insert/dbo/StagingTbl"?InsertSalesData

    Thank for your reply.

     

    Sachin


    Monday, June 13, 2011 10:11 AM
  • Hi Sachin,

     

    No, the inbound ID won't be required as part of the SOAP action header.

     

    By the way, do you already have another application configured in the same BizTalk Server host instance that uses the same schema. If so, that could be causing this issue.


    ______ Nitin Mehrotra, BizTalk Server CCxG, http://blogs.msdn.com/nitinme/
    Monday, June 13, 2011 1:48 PM
  • Hi,

    I am not getting the solution.

    Yes I already have another application configured in the same BizTalk Server host instance that uses the similar schema i.e. INSERT schema generate by consume adapter service on same table.

    For example  : For StagingTbl -- Insert schema is generate using consume adapter service for one application and for same table StagingTbl Insert schema is generate using consume adapter service for another application.

      

    I tried creating new HOST instance and assigned to it. But still i getting the following error.

     This Assembler cannot retrieve a document specification using this type: "http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/StagingTbl#Insert" 

     

    Under SOAP Action Header i have already mention below code. 

    <BtsActionMapping xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

      <Operation Name="CustomerInsert" Action="TableOp/Insert/dbo/StagingTbl" />

    </BtsActionMapping>

     

    Do i need to specific anything else.

     

     

    Thanks for your help.

    SACHIN

     

    Tuesday, June 14, 2011 4:08 AM
  • It does not have to do with the SOAP action header. The issue is that there are two schemas referring to the same db object. So usually the way to solve this is to remove one of the generated schemas and reference the only one you deploy by both orchestrations. Basically BizTalk is not able to determine which one is the unique schema to use when there are two of them for the same db object.

    At deployment it is a good idea to use the same BizTalk application or use a shared BizTalk application for shared schemas that more than one BizTalk application references.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Tuesday, June 14, 2011 4:48 AM
    Moderator
  • Hi Ben,

    Yes you are right  The issue is that there are two schema referring to the same db object.

    Not getting how to go ahead.

    Can you explain the steps with your solution.

     

    Thanks,

    Sachin

    Tuesday, June 14, 2011 5:08 AM
  • Hi,

     

    No Reply .... :(

     

     

    Tuesday, June 14, 2011 11:10 AM
  • Sorry, I was sleeping since I posted my reply above. :) Sorry for the delay.

    1. Decide on which schema to use in both projects

    2. Remove the extra schema from your deployment and VS project

    3. Reference the same schema in VS. I usually do this with a referenced project - a BizTalk project referenced by two or more other BizTalk projects.

    4. At deployment time just deploy the shared project. I usually put it in a BizTalk app dedicated to shared components. Then you can add a BizTalk application reference to the shared BizTalk application.

    If you have any questions with this approach, please let me know.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Tuesday, June 14, 2011 1:49 PM
    Moderator
  • Hi,

    I did the same thing as you have mention but getting same error as earlier.

    I tried creating New solution and new project and then deployed it, but still facing same issue.

    This is strange ...

    I have done similar stuff in previous project and working fine.

    May be it is related to installation of adapter what ???

    I am using Biztalk 2009, Microsoft Visual Studio 2008 and SQL Server 2008.

     

    Thanks for the help.

    Sachin

    Wednesday, June 15, 2011 5:36 AM
  • Hi Sachin,

    Inserting data in a table in SQL using WCF-SQL should not be a problem. I have an environment with BizTalk 2009, VS 2008 and SQL Server 2008 and it works, see my post on table operations. Error has nothing to do with installation of the adapter.

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly

     


    BizTalk
    Wednesday, June 15, 2011 6:46 AM
    Moderator
  • Did you remove the extra schemas from your deployment like in step 2? There must be duplicates out there still. You use the all artifacts view in the BizTalk admin console to help you find the duplicates.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Wednesday, June 15, 2011 1:23 PM
    Moderator