Filburt
Filburt

Reputation: 18082

Cannot receive RemoteExecutionContext messages sent from CRM to Service Bus Queue in Azure Biztalk Service

I wasn't able to find a valid schema for the RemoteExecutionContext sent from MS CRM to Azure Service Bus Queue, so I tried a Passthrough Bridge as well as a One-Way Xml Bridge using a dummy schema

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://schemas.microsoft.com/xrm/2011/Contracts"
    xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
    targetNamespace="http://schemas.microsoft.com/xrm/2011/Contracts"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="RemoteExecutionContext">
    <xs:complexType>
      <xs:sequence>
        <xs:any minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

Processing messages from the queue consistently fails with

Error = Object reference not set to an instance of an object.
happened while submitting message to gateway.
ItemId = 8e9284315e104a759353769633b7c4c2,
RequestId = b442f176-2007-44a6-b818-801bc74f3e2b,
GatewayAddress = default./passthroughbridge1,
PullEndpointName = OutChannelQueue,
PartitionId = 1,
PullRuntimeUrl = 029ba68d-9696-46bf-bd1e-88b8bddff4a8OutChannelQueue;
TraceSource 'Microsoft-Integration-TransportService' event

I registered the Steps sending to Azure directly to the ServiceEndpoint instead of writing a Plugin for posting the Plugin Execution Context.

Peek/Receiving messages from the queue using a simple console application works without problems so I would rule out authentication or connection string issues.

I could not find any example receiving RemoteExecutionContext messages from a queue using Azure Biztalk Services.

Upvotes: 1

Views: 565

Answers (1)

Filburt
Filburt

Reputation: 18082

As it turns out I totally missed to limitation that Azure Biztalk Services cannot receive binary messages - even if you try to PassThrough them and try to serialize them in a custom step.

My solution will be to compose a Xml message to send to Azure Service Bus Queue in a custom Plugin without using Service Endpoint registration provided by MS CRM.


Update 2016 Update 1 will allow to configure the message format and support binary, xml and json formatted messages form the Service Endpoint Registration. See Walkthrough: Configure Microsoft Azure (SAS) for integration with Dynamics CRM for details. Note the differences in the configuration dialog to previous versions.

Upvotes: 1

Related Questions