The Azure DocumentDB Blog

All about DocumentDB and Logic Apps

Installing both BizTalk 2016 and Logic Apps mapper/schema editor SDK on the same machine

I installed the Logic Apps mapper/schema editor SDK on a BizTalk 2016 VM.

After I loaded a BizTalk project to make some changes, I discovered that the BizTalk Project Template was overwritten.

btsproject

I thought this was a  bug and reported it.

I found out that having both on the same machine is currently unsupported  😮

To fix the issue, I uninstalled BizTalk on the machine I was using for Logic App development. 

On the BizTalk machine, I uninstalled both the Logic App designer and the Design Tools.

The XML Validator failed to validate

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=1.0.0.0, 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": "https://logic-apis-northcentralus.azure-apim.net/apim/biztalk"
                    },
                    "connection": {
                        "name": "@parameters('$connections')['biztalk_1']['connectionId']"
                    }
                },
                "method": "post",
                "path": "/Send",
                "queries": {
                    "receiveLocationAddress": "http://40.86.103.129/GetCRMAccount/Service1.svc"
                }
            },
            "runAfter": {},
            "type": "ApiConnection"
    }

}

My BizTalk Schema is shown below.

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://CRMDemo.JSONSchema1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Root">   
          <xs:complexType>
            <xs:sequence>
              <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" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>    
</xs:schema>

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. 

 

 

« Older posts
%d bloggers like this:
Skip to toolbar