This post was originally published here

I was creating a demo  using the Logic App Adapter for BizTalk 2016.

I was sending a message from the Logic App to BizTalk.

I used the JSON Schema wizard and used the default setting. Root,  for the  Root element.

When testing I received the following error.

There was a failure executing the receive pipeline: "CRMDemo.ReceivePipeline1, CRMDemo, Version=, Culture=neutral, PublicKeyToken=17c282d81ae800e3" Source: "XML validator" Receive Port: "CRMReceivePort" URI: "/GetCRMAccount/Service1.svc" Reason: The XML Validator failed to validate. Details: The element 'Root' in namespace 'http://CRMDemo.JSONSchema1' has invalid child element 'id'. List of possible elements expected: 'body'..

I looked at the message body from suspended message

{"id":"94bf6bf8-4a96-e611-80ea-c4346bdc7221","name":"Silly Goose two","phone":"748-852-1256"}

There wasn’t a body node.     💡

I then checked the source from the Logic App

    "Send_message": {
            "inputs": {
                "body": {
                    "id": "@{triggerBody()?['accountid']}",
                    "name": "@{triggerBody()?['name']}",
                    "phone": "@{triggerBody()?['telephone1']}"
                "host": {
                    "api": {
                        "runtimeUrl": ""
                    "connection": {
                        "name": "@parameters('$connections')['biztalk_1']['connectionId']"
                "method": "post",
                "path": "/Send",
                "queries": {
                    "receiveLocationAddress": ""
            "runAfter": {},
            "type": "ApiConnection"


My BizTalk Schema is shown below.

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:b="" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://CRMDemo.JSONSchema1" xmlns:xs="">
  <xs:element name="Root">   
              <xs:element minOccurs="0" name="id" type="xs:string" />
              <xs:element minOccurs="0" name="name" type="xs:string" />
              <xs:element minOccurs="0" name="phone" type="xs:string" />

Was it a bug or did I do something wrong?

Finally it came to me.        😳

I needed use the body   node as the name of the Root element in my schema. That solved the problem.