none
WCF-Oracle adapter select and Microsoft.BizTalk.DefaultPipelines.XMLReceive RRS feed

  • Question

  • Hello there,

    I've been trying hard to get this working but it's beyond my knowledge what I'm doing wrong.

    I ran the Consume-Adapter (oracle) wizard to make a basic Select, that works fine and I receive a message with an amount of records, I know this part of the process is running OK because I send the Select-Response message to the disk and it's all there.

    My main problem is that I need to process every record in the Select-Response message.

    To do so, I am betting for a receive pipeline by doing an xml disassemble which is not working at all...

    I need to note that I am new to the BizTalk world.

    I am working with the adapter generated schema, there are 2 nodes which I type my messages from

    "Select" and "SelectResponse"

    Then I made 2 more schemas, a "SelectResponse_Envelope schema" and a "singleRecord schema" yet, I am not sure they have been done properly because honestly I'm a little lost with this envelopeSchema - receivepipeline relationship.

    I'll attach an image of how my orchestration looks like and what's in the construct and expression shapes.

    AssignPipelineShape:

    rcvPipeline = Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline(typeof(Microsoft.BizTalk.DefaultPipelines.XMLReceive),msgSelectResponseEnvelope);
    

    MessageAssignShape:

    rcvPipeline.GetCurrent(msgSingleRow); 
    System.Diagnostics.EventLog.WriteEntry("BTS_APP", "message debatched");
    

    Any help will be greatly appreciated!
    Feel free to ask any questions about this thread! 

    Friday, September 30, 2011 10:27 AM

Answers

All replies

  •  "Finding the document specification by message type "http://Microsoft.LobServices.OracleDB/2007/03/A01TAR01/Table/myTable#SelectResult" failed. Verify the schema deployed properly. ".
    Friday, September 30, 2011 11:32 AM
  • Check this article:

    http://kiranasokan.wordpress.com/2009/04/15/de-batching-polling-records-wcf-oracle-lob-adpter-in-biztalk/

     

    Also make sure that you have properly defined your “Envelope” and “Document” schemas in your XML disassembler.

     

    Regards,

    Zia


    Hope this helps. Zia Saeed | Don’t forget to mark the post(s) as “Answered” that answered your question
    • Proposed as answer by Edmund Y Zhao Friday, September 30, 2011 4:28 PM
    • Marked as answer by CarlosEd Tuesday, October 4, 2011 7:38 AM
    Friday, September 30, 2011 1:06 PM
  • Hi Carlos,

    You can loop through complete resultset of SQL response, and determine count and looping using xpath. I can recommend looking at the following solutions (which you can download and port to higher version of BizTalk through visual studio):

    HTH

    Regards,

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


    BizTalk
    • Marked as answer by CarlosEd Tuesday, October 4, 2011 7:39 AM
    Friday, September 30, 2011 3:42 PM
    Moderator
  • Thanks Steef, I have already taken a look at those, I try to research before recurring to the forums, I know your time is valuable!

    The thing is that I have read that looping through XPath is ineficient, as many persistence points are created, so I decided to go for the pipeline, now I'm having issues with the messages because though I think I have the theory clear, I lack of knowledge on how to implement it, therefore I am needing someone to point me to a very clear explanation on how to use the default receive pipelines or a custom-yet-simple one, including the envelope messages, I am having trouble understanding them, not the theory but how to implement them correctly.

    Best Regards

    Carlos

    Friday, September 30, 2011 10:34 PM
  • Thanks a lot, Zia... 

    Though I have already looked at that document, I will give it a deeper try next monday.

     

    Carlos

    Friday, September 30, 2011 10:35 PM
  • To get the concept , you can try this simple example in this blog post around XMLReceive and de-batching envelop schemas.
    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    My Blog:dpsbali-biztalkweblog
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    • Marked as answer by CarlosEd Tuesday, October 4, 2011 7:39 AM
    Saturday, October 1, 2011 4:26 AM
  • Thanks DPS Bali, I just checked it out.

    I am currently following http://connectedpawns.wordpress.com/2010/10/12/de-batching-within-an-orchestration-using-xpath-or-calling-a-pipeline/ mainly because it looks very simple, but I am getting an error...

    These are my schemas: 

    ---------------------------------------------------------------------------------------------------------------

    Inner exception: There was a failure executing pipeline "Microsoft.BizTalk.DefaultPipelines.XMLReceive". Error details: "Finding the document specification by message type "http://Microsoft.LobServices.OracleDB/2007/03/myPACKAGE/Table/myTABLE#SelectResult" failed. Verify the schema deployed properly. ".  

    Exception type: XLANGPipelineManagerException

    Source: Microsoft.XLANGs.Pipeline

    Target Site: Microsoft.XLANGs.Pipeline.ReceivePipelineOutputMessages ExecutePipeline(Microsoft.BizTalk.PipelineOM.ReceivePipeline, Microsoft.XLANGs.BaseTypes.XLANGMessage)

    ---------------------------------------------------------------------------------------------------------------
    Do you guys have any idea of what could be causing this? I believe that's the proper one
    Thanks!

    Monday, October 3, 2011 7:59 AM
  • I am copying the contents of my response-from-select message to my-evelope-message through a mapping, or at least I am trying because it is not copying the contents, I just get the same amount of records but with empty content, just the tags... I sent the envelope message to disk.
    Monday, October 3, 2011 10:25 AM
  • For this error you will have to deploy the schema. You can check this in the BizTalk Admin console for all artifacts > schemas to see if this message type is deployed or not.
    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    My Blog:dpsbali-biztalkweblog
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    Monday, October 3, 2011 11:03 AM
  • It is indeed deployed... 

    I deleted most of the orchestration and started over following http://kiranasokan.wordpress.com/2009/04/15/de-batching-polling-records-wcf-oracle-lob-adpter-in-biztalk/

    Let's see how it goes. This is frustrating

    Monday, October 3, 2011 11:06 AM
  • Just recalled this.. Can you try saving the suspended message on file using the BizTalk Admin console. I am sure it will not be conforming to the schema you are using. I had this issue once and then found that the Error in the event log didnt serve the purpose. It was the XMl that was incorrect(not conforming to the schema).
    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    My Blog:dpsbali-biztalkweblog
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    Monday, October 3, 2011 12:13 PM
  • Hey Bali,

    I tried checking all the options in tracking dialogs on all the ports and orchestration but I never get to see the messages, it always say 

     

     

    TITLE: BizTalk Server Administration
    ------------------------------

    The message was not found in the Message Box or the Tracking databases. This may be caused by one of the following conditions: (1) message tracking is not enabled; (2) the message(s) is no longer referenced by a running or suspended service instance; (3) the Message Box tracking tables have been automatically purged; or (4) the SQL Server agent is not running on the Message Box servers. (Microsoft.BizTalk.Administration.SnapIn)

    And also... I'm using 

    rcvPipeline.GetCurrent(msgSingleRecord);

    I have also promoted a field that I want to monitor but when I execute the following code, it fails.

     

    myPromotedField = msgSingleRecord.PromotedField;
    System.Diagnostics.EventLog.WriteEntry("myBTSProject", myPromotedField.ToString());
    


    Exception type: NullReferenceException

    • Edited by CarlosEd Monday, October 3, 2011 5:28 PM added exception
    Monday, October 3, 2011 4:06 PM
  • Can you make sure that the SQL Server agent is running this is often caused when this windows service is down. It is manual by default you will have to start the service. Type services.msc in run and then look for the service and start it. 
    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    My Blog:dpsbali-biztalkweblog
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    • Edited by DPS Bali Monday, October 3, 2011 6:21 PM
    Monday, October 3, 2011 6:19 PM
  • Hey guys, it's working... however partially

    I am able to send the individual messages through a send port out to disk and the message is there, but if I try to access a distinguished field just before sending it to disk I get a null reference exception.

    Exception: Object reference not set to an instance of an object.
    • Edited by CarlosEd Tuesday, October 4, 2011 7:53 AM Exception
    Tuesday, October 4, 2011 7:44 AM
  • Are you accessing the distinguished field in the orchestration. Try to suspend the message and see what context properties are associated with it and whether the one you are trying to access is there. Also Distinguished Fields cannot be accessed in the ports or in pipeline components. You will have to promote the property using a property schema. Hope this helps.
    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    My Blog:dpsbali-biztalkweblog
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    Tuesday, October 4, 2011 9:18 AM
  • I'm accessing it within the atomic scope where I do the pipeline looping.

    I am sorry, I don't know how to suspend a message

    Thanks a lot for your great help!

    Tuesday, October 4, 2011 9:22 AM
  • Your welcome .. If this is your development environment you can use the Suspend Shape in the orchestration temporarily to check the message and its properties.
    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    My Blog:dpsbali-biztalkweblog
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    Tuesday, October 4, 2011 1:37 PM
  • Aww...

    Note
    You cannot place a Suspend shape inside an atomic transaction.

    The message I'm trying to read is inside an atomic transaction...

     

     

    Tuesday, October 4, 2011 1:53 PM