Background
I created a web service on Azure that will take a transaction, convert it to an XML Message (using a Schema) and pass it onto a Azure Service Bus Queue.
I de-serialized the XML object to a string before I move it to the queue due to BizTalk Services inability to de-serialized any XML objects.
All configuration on the queue seem fine and the message looks like this:
<?xml version="1.0" encoding="utf-8"?> <QueueTransaction xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" TransactionID="1040" TransactionType="MyAirtimeTest1" Amount="123456" Status="NEW" TransactionDate="1/28/2015 12:00:00 AM" xmlns="http://MMBTService.TransactionSchema" />
I create a BizTalk Service Message Flow with Service Bus Queue Source, Xml One-Way Brodge and One-Way External Service EndPoint(The endpoint are a WCF Web Service)
I have two schemas, using a MAP the source XML data to the Web Service Schema.
I selected the Request Message Type (Source Schema), only Validate is set as True, I disabled all the Enrich and my MAP in the XMLTransform.
ERROR I RECEIVE
After I deployed everything, gong into Tracking on BizTalk Services, I get the following error: Data at the root level is invalid. Line 1, position 1.
I have gone through this for a few days now and checked every little detail in de-serializing the message to the bridge config, but cannot find the problem.
Any advise or help will really be appreciated.
From the problem description it seems to be an UTF encoding issue. The Message that you receive in the Azure Service Bus Queue is in UTF-8 encoding. However the Bridge that you created is expecting the message to be UTF-16 encoding.
To make sure this is issue, you can check the messages received in Azure Queue using the Service Bus Explorer developed by Microsoft Guy S Paolo. You can trying changing the message UTF-8 to UTF-16 to same Queue and check if that works.
Hope it helps.
Thanks