none
WCF and EDI RRS feed

  • Question

  • Has anyone accomplished EDI Transaction IN and EDI Transactions Out using WCF Custom adapters? If so please share your scenario.

    TIA
    SV
    Wednesday, March 24, 2010 1:43 PM

Answers

  • In the receive Pipeline, create a custom pipeline component to set the RouteDirectToTP property to false for the NULL message.

    Have Look at  http://blog.tsathish.com/?p=101

    --Sathish

     

    • Marked as answer by vai2000 Tuesday, October 5, 2010 6:04 PM
    Monday, September 20, 2010 12:21 AM

All replies

  • Hi,

    Kind of. We have a scenario where we get EDI-files (that sometimes can contain several EDI messages) by calling an (elderly) ASMX SOAP-Service. This is done with BTS 2009, WCF-BasicHttp SendPort that polls the other server. The EDI is contained inside a CDATA-section, inside SOAP:Body (and some other field for routing logic). 

    A BTS Orch strips our custom envelope, converts to a binary stream in apropriate encoding, and saves the EDI-message to disk (PassThruTransmit). New since 3 weeks ago and has been running fine, transporting some 30.000 instances.

    /Ola

     

     

     


    Sys.developer.Dotnet
    Friday, March 26, 2010 4:06 PM
  • I read somewhere that the EDI Disassembler and EDI Assembler pipelines can't be called within orchestration
    SV
    Monday, March 29, 2010 12:23 PM
  • Hi

    You are right, calling EDI pipelines is currently not supported within orchestration. Is there any specific problem you are facing the let me know.

    Regards

    Nikhil

    Monday, March 29, 2010 3:15 PM
  • Yes, We have a partner who wants to communicate EDI transactions with us using WebServices!

    SV
    Monday, March 29, 2010 6:46 PM
  • Hi

    EDI transactions are independent of the adapter you are using. In biztalk all the EDI processing takes place in the pipeline. Once it is out of EDI recieve you have an xml out of it or if its EDI Send the you will have an EDI out of it. If you are looking for some solution for using web serivces for EDI transaction then you can let me know if there is any perticular challenge you are facing. For using web services in biztalk refer this link http://msdn.microsoft.com/en-us/library/ee253844(BTS.10).aspx

    • Marked as answer by Andrew_ZhuModerator Wednesday, March 31, 2010 12:50 AM
    • Unmarked as answer by vai2000 Thursday, June 10, 2010 3:10 PM
    Tuesday, March 30, 2010 7:02 AM
  • I am facing a scenario in which once the message is received by the EDI Pipeline context properties are promoted which overrides context properties needed by the WCF Adapter to route back the message to the calleee. I am not sure how to avoid this? or which context properties are MUST for the message to travel back to the callee [ Request/Response] type of port.

    Using Calc example from SDK but have plugged in the EDI Receive and Send Piplines into it [On the receive location]


    SV
    Tuesday, June 8, 2010 11:49 AM
  • Sorry, it took a while to understand your question.

    One thing that would help you would be to look at the BizTalk subscription viewer to compare the properties on a WCF request/response port and those used with EDI. If you open the BizTalk admin console, go to the group hub page, then click on "Grouped By Application" or another link, then the query box comes up. You can choose Subscriptions from the Search for drop down box.

    It looks like a WCF request/response port uses the SPTransportId with a Guid. Is this one of the context properties that gets overriden? If so, you might try putting a custom pipeline component to read this value out and perhaps log it to a database table so that after the EDI pipelines execute you can try setting this value again in another custom pipeline component.

    If this does not work you may need to switch to separate send and receives to WCF and handle the response back in a separate port. This is obviously annoying but is basically a workaround.

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Tuesday, June 8, 2010 6:55 PM
    Moderator
  • Thanks, will let you know the results!
    SV
    Wednesday, June 9, 2010 2:03 PM
  • Did a compare on all the context properties, seemed OK, getting this error instead

    System.Xml.XmlException: Root element is missing.
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
       at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
       at System.Xml.XmlTextReaderImpl.Read()
       at System.Xml.XmlReader.MoveToContent()
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.BizTalkBodyWriter.ValidateStreamContainsXml(Stream stream)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.BizTalkBodyWriter..ctor(Stream stream, BodyReadCallback callback, Object state, Boolean validateStreamIsXml)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfMarshaller.CreateWcfMessage(CreateWcfMessageSettings settings)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendRequestMessage(IBaseMessage bizTalkMessage, IRequestChannel channel)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage)

     

    My SendPort is not able to relay back the message to the client if EDI Pipelines are in the mix!


    SV
    Wednesday, June 9, 2010 8:52 PM
  • Could you give a full description of all of the components in the the pipeline?

    Thanks,


    If this answers your question, please use the "Answer" button to say so | Ben Cline
    Wednesday, June 9, 2010 9:07 PM
    Moderator
  • =========================Receive Location [Request Response]

    Receive location has custom pipeline which has: EDI Receive Pipeline-->SoapWrapperComponent which Wraps up the Method Signature back and replaces < >

    <GetData xmlns="http://tempuri.org"><value>XML Payload from EDI dissassembler</value></GetData>

    Send Pipeline:

    Custom Pipeline-->EDI Assembler -->SoapWrapperOut puts

    <GetDataResponse xmlns="http://tempuri.org"><GetDataResult>EDI Payload after assembler</GetDataResult></GetDataResponse>

    =========================

    Send Port [Request Response]

    Pass through on both ends

    =========================

    Very similar to Calc example from WCF Samples

    My WCF Service signature is

    [ServiceContract(Namespace = "http://tempuri.org")]
        public interface IService
        {

            [OperationContractAttribute(Action = "*", ReplyAction = "*")]
            string GetData(string value);

        
        }


    SV
    Thursday, June 10, 2010 11:52 AM
  • In the receive Pipeline, create a custom pipeline component to set the RouteDirectToTP property to false for the NULL message.

    Have Look at  http://blog.tsathish.com/?p=101

    --Sathish

     

    • Marked as answer by vai2000 Tuesday, October 5, 2010 6:04 PM
    Monday, September 20, 2010 12:21 AM