BizTalk Generic WCF Service exceptions

The BizTalk WCF adapter provides a very nice feature for implementing a Generic WCF Service that eats any SOAP message it receives. However when trying to test this with Altova XMLSpy I encountered the next exceptions:

The adapter “WCF-BasicHttp” raised an error message. Details “System.NotSupportedException: Specified method is not supported.

In this case the SOAPAction was “BizTalkSubmit” which will throw a NotSupportedException as documented. So if you generate a client for this web service you need to change the SOAPAction into something else. I think anything but “BizTalkSubmit” will do.

The adapter “WCF-BasicHttp” raised an error message. Details “System.InvalidOperationException: Text cannot be written outside the root element.

The default setting of the WCF adapter uses the “contents of <soap:Body> element” option for the inbound message body. It seems that when you have an indented XML message the filtered body starts with whitespace which causes this exception. For me it was enough to use “/*” as body path expression instead to solve it.

clip_image002

5 Responses to BizTalk Generic WCF Service exceptions

  1. Colin Dijkgraaf says:

    Thanks, your blog post solved the “Text cannot be written outside the root element.” issue for me.

  2. Ranjith says:

    where can i find this dialog box?

    • robboxman says:

      Go to the properties of a Solocit-Response send port, choose one of the WFF transport types, press the Configure-button, and select the messages-tab.

  3. ravindarjobs says:

    Thank you very much. It worked.

Leave a reply to Colin Dijkgraaf Cancel reply