none
WCF-SQL adapter debatching followed by immediate mapping RRS feed

  • Question

  • Good time of the day!

    A BizTalk newbie question here, please help.

    I've generated the adapter by using WCF-SQL wizard and choosing typed polling.  It worked out of the box.  I was able to create a send port of a file type where my message dropped in an XML batch.  As next step I debatched the messages by modifying the schema of a generated entity, changing it to an envelope and configuring leaf node.  Great, now I have a bunch of files, one per message sitting in my send port's file folder.  Now I am trying to crate a map against the newly created messages.  That's where the problems begin.  If I create a map based on the same schema that was generated for me by WCF-SQL wizard then I drag the whole structure of the Envelope -> Array -> Message, which of course does not match to the structure of a singular message and the map is not working.  If I am to create a new schema, based on a single XML message from send port's file directory, the schema it generates shares the name with an existing schema of my Envelope and BizTalk server throws an error as a result.

    I was thinking that maybe I could accomplish one of the following:

    • Split WCF-SQL generated schema into two, the Envelope + Array and the Message.  Not sure if it's possible.  Something about this idea doesn't seat well with me.
    • Somehow change the namespace of the debatched message.  Not sure how to achieve.

    Any ideas are welcome. Thank you!

    Thursday, February 26, 2015 6:06 PM

Answers

  • It sound like you have all the hard stuff done already so here's a couple of hints that will get you what you're looking for:

    • The Envelope Schema does not need to represent the entire Message Structure, just down to the Body element from where the debatched children are taken.
    • The debatched message would then be it's own separate Schema.
    • The Envelope Schema does not even need to reference the Message Schema in any way.
    • It's usually better to use a custom Pipeline with the the XmlDisassembler that has the Envelope Schemas and Document Schemas properties set at Design Time.

    The WCF binding actually generates the Schemas already separated for you.  When you create the Map, you would choose StoredProcedureResultSet0 instead of ArrayOfStoredProcedureResultSet0.  If you set the Root Reference, you would not get the choice so unset that if it is.

    • Proposed as answer by Muhammad Ehsan Friday, February 27, 2015 4:32 AM
    • Marked as answer by Angie Xu Monday, March 9, 2015 1:33 AM
    Thursday, February 26, 2015 7:09 PM
    Moderator