Sending EDI through the WCF Adapter in BizTalk 2010 RRS feed

  • Question

  • Hello,     We have a project where EDI messages are exchanged over the WCF adapter.  Since everything is supposed to be XML in the web services world, we used the "custom XML template" feature in the WCF Adapter's receive location dialog.  The outgoing string of X12 characters created by the EdiSend pipeline is wrapped by a relatively short XML schema on transmission to the trading partner.

    There have been a couple funny experiences with this approach.  One challenge, which I no longer intend to solve, was that the trading partner wanted some values in the wrapping XML to change from message to message.  That is, they wanted dynamic XML around the EDI message rather than static XML.  I spent a lot of time trying to call the EdiSend pipeline from our orchestration before finding an MSDN page stating that this is not supported (  So I gave up on dynamic XML around the EDI.  Did others give up, too?

    Additionally, the trading partner expected to be able to navigate to "?wsdl" and to "?xsd=xsd3" on the WCF adapter's configured URL & get something useful back.  The WSDL was fine, but the XSD was for the schema BizTalk uses to represent HIPAA 278 messages, which the trading partner neither can nor should understand.  So, while I already know the answer, I would like to pose the question to the group whether future versions of the WCF adapter might take any custom XML templates configured by the administrator into account, when producing WSDL/XSD for the client.

    Other general feedback?


    Friday, December 30, 2011 9:13 PM


  • My guess is that the WSDL/XSD produced by BizTalk in the future would not utilize a custom Xml template because this seems like an edge case. Usually the WSDL/XSD stuff should be static because this is the contract you expose. Alternately, you could expose custom generated WSDL and transform the WSDL/XSD yourself although this is not something that can be done with any out of the box BizTalk components (that I know of). You could use a custom behavior with WCF like with this: and then use the behavior in BizTalk.

    I would expect the dynamic stuff to be exposed as headers that occur outside the bounds of the message - maybe you could ask if this could be web service headers?

    It sounds like an interesting approach for doing EDI over WCF, I know several people who have tried this and this is definitely difficult to do right now. You usually have to resort to some custom pipeline components to repackage the message or do a custom transform to get the EDI that is in Xml formatted for your partner. This may be something that will be addressed in the AppFabric EDI release (now in public CTP) - you might look at this as a future solution to some of the challenges of EDI over WCF.


    If this answers your question, please use the "Answer" button to say so | Ben Cline

    Monday, January 2, 2012 6:12 PM