Root element is missing in Biztalk Server when sending message to port
<p>My scenario seems quite simple:</p>

<p>We have a file with some format, <strong>myfileddmmyyhhss.txt</strong>, and inside the file we have something like this:</p>

<pre><code>H|3      |20110607235508
V|M006      |HAB8753   |NY|PAS|20151123|232155|M||
V|M006      |HAB8752   |NY|PAS|20151123|232155|M||
V|M006      |HAB8751   |NY|PAS|20151123|232155|M||
T|3      |20110607235508
</code></pre>

<p>Also using the sql adapter we generated a schema for executing a stored procedure.</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-16" ?&gt; 
- &lt;xs:schema xmlns="http://SqlAdapterFile" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://SqlAdapterFile" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
- &lt;xs:annotation&gt;
- &lt;xs:appinfo&gt;
  &lt;msbtssql:sqlScript value="exec [sp_insertFile] @fileName=" "" xmlns:msbtssql="http://schemas.microsoft.com/BizTalk/2003" /&gt; 
  &lt;/xs:appinfo&gt;
  &lt;/xs:annotation&gt;
- &lt;xs:element name="fileRequest"&gt;
+ &lt;xs:annotation&gt;
- &lt;xs:appinfo&gt;
- &lt;properties xmlns="http://schemas.microsoft.com/BizTalk/2003"&gt;
  &lt;property distinguished="true" xpath="/*[local-name()='fileRequest' and namespace-uri()='http://SqlAdapterFile']/*[local-name()='sp_insertFile' and namespace-uri()='http://SqlAdapterFile']/@*[local-name()='fileName' and namespace-uri()='']" /&gt; 
  &lt;/properties&gt;
  &lt;/xs:appinfo&gt;
  &lt;/xs:annotation&gt;
+ &lt;xs:complexType&gt;
- &lt;xs:sequence&gt;
- &lt;xs:element name="sp_insertFile"&gt;
- &lt;xs:complexType&gt;
  &lt;xs:attribute name="fileName" type="xs:string" /&gt; 
  &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
- &lt;xs:element name="fileResponse"&gt;
- &lt;xs:complexType&gt;
- &lt;xs:sequence&gt;
  &lt;xs:element name="Success" type="xs:anyType" /&gt; 
  &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  &lt;/xs:schema&gt;
</code></pre>

<p>Using the flat file schema wizard we created the schema which is not relevant for this question.  Now we need to create a message that should be redirected to a send port, the message only has a child element with the filename, we created a map, but there is no real mapping because we are using a constant. As you can see there is no mapping between fields, we used the value property to set a fixed value, to see if we could make this works.  The right side schema is the one pasted above.</p>

<p><a href="https://i.stack.imgur.com/4MxFc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4MxFc.png" alt="enter image description here"></a></p>

<p>However we have this error, all we need is an XML in the send location with the hard coded filename on it.</p>

<blockquote>
  <p>xlang/s engine event log entry: Uncaught exception (see the 'inner
  exception' below) has suspended an instance of service
  'BizTalkNyCase.BizTalk_Orchestration1(ac1a86a0-9cc1-4850-d5f1-236b0663b4da)'.
  The service instance will remain suspended until administratively
  resumed or terminated.  If resumed the instance will continue from its
  last persisted state and may re-throw the same unexpected exception.
  InstanceId: db35db6f-f14d-44ca-bea7-a3f747b550d5 Shape name: Send_2
  ShapeId: 81933178-7b3c-49c2-a0b1-0cce3d4aa6ec Exception thrown from:
  segment 1, progress 16 Inner exception: Root element is missing.
           Exception type: XmlException Source: System.Xml Target Site: Void Throw(System.Exception) The following is a stack trace that
  identifies the location where the exception occured</p>
</blockquote>