none
Accessing orignal EDI message (native EDI) within an orchestration. RRS feed

  • Question

  • When I receive a EDI message (270) I need to kick off an orchestration and send off an XML file.

    The XML file will contain some infomation from the EDI document, and also a copy of the native edi document(string) within the "Body".

    I can't seem to find anyway to access the orignal EDI from within the orchestration to be able to insert it.

    Here is a copy of the outgoing xml.

    <?xml version="1.0" encoding="utf-8"?>
    <ENVELOPE>
    <HEADER>
    <TranCode></TranCode>
    <MessageFormat>X12</MessageFormat>
    <Sender></Sender>
    <Receiver></Receiver>
    <Session></Session>
    <ProviderOfficeNbr></ProviderOfficeNbr>
    <ProviderTransID></ProviderTransID>
    </HEADER>
    <BODY></BODY>
    </ENVELOPE>

     

    Wednesday, September 29, 2010 6:54 PM

Answers

All replies

  • Try this code: Insert it inside an expression on the orchestration.

    xdoc = message(the message you want to see);

    sourceXml=  xdoc.OuterXml.ToString();

    System.Diagnostics.EventLog.WriteEntry("check" ,sourceXml);

     

    If that does not work, follow this post. It will take care of what you are tryin to do.

    http://social.msdn.microsoft.com/Forums/en-US/biztalkediandas2/thread/cc2ee8f2-48f8-49bb-94a4-32a0c2b6ba61


    Please Indicate "Mark as Answer" if this Post has Answered the Question
    Wednesday, September 29, 2010 7:03 PM
  • Thanks for your reply.

    The source I want to see is EDI not XML.

    Let me know if you can think of a way.

    Thanks!

     

    Wednesday, September 29, 2010 7:18 PM
  • I am afraid to say, it may not be possible directly access the EDI Message.

    You can write the incoming message in the pipeline component to a file, and read the file in the orchestartion to write to XML you are generating.

     

     


    Sathish
    Wednesday, September 29, 2010 9:01 PM
  • Thanks for your reply.

    The source I want to see is EDI not XML.

    Let me know if you can think of a way.

    Thanks!

     


    Not sure why you want to do that, but the best way is to subscribe the receive port to another send port that will basically do a passthought and copy the file to a destination. Other than that, xml is the best ticket. Biztalk will convert the message to xml right away. So if you need to see the origial file, you must do a passthought.
    Please Indicate "Mark as Answer" if this Post has Answered the Question
    • Proposed as answer by Carlos T. _ Monday, October 4, 2010 12:35 PM
    • Marked as answer by Andrew_ZhuModerator Thursday, October 7, 2010 7:40 AM
    • Unmarked as answer by MillaT Tuesday, October 19, 2010 12:57 PM
    Monday, October 4, 2010 12:34 PM
  • Hi,

    One option could be the following.

    Enable tracking on your receive port.

    Create an external c# assembly, based on Thiago Almeida´s code http://connectedthoughts.wordpress.com/2008/04/02/3-ways-of-programatically-extracting-a-message-body-from-the-biztalk-tracking-database/ and extract the original message directly from the tracking db.

    Best regards

    Rasmus Jaeger

    Monday, October 4, 2010 2:40 PM