title: WCF Data Services returning a complex type is not in ATOM format
body: <p>I've been struggling with this one for days and think I've got the problem isolated down to a serialization issue.</p>
  
  <p>I've got a WCF Data Service and I'm calling a stored procedure that pulls in a datasets (n number of rows).  The data service is using the Function Import and it returns a Complex Type.  The service works fine it returns the following in the browser:</p>
  
  <p>&lt;GetChanges xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices" &gt;<br>
  &lt;element xmlns:p2="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" p2:type="tasksModel.fxGetChangeList_Result"&gt;</p>
  
  <p>&lt;CHANGE&gt;DELETE&lt;/CHANGE&gt;</p>
  
  <p>&lt;ID p2:type="Edm.Int32"&gt;116&lt;/ID&gt;</p>
  
  <p>&lt;UpdateVersion p2:type="Edm.Int64"&gt;703&lt;/UpdateVersion&gt;</p>
  
  <p>&lt;/element&gt; </p>
  
  <p>&lt;/GetChanges&gt;</p>
  
  <p>But when i call this data from the client (a windows phone app) no results are returned.  I've confirmed that the url directly is pulling down the data above.</p>
  
  <p>Here is the client's call...</p>
  
  <pre><code>_changes.LoadCompleted += new EventHandler&lt;System.Data.Services.Client.LoadCompletedEventArgs&gt;(Items_LoadCompleted);
  
  _changes.LoadAsync(new Uri(theUrl, UriKind.Absolute));
  </code></pre>
  
  <p>And here is the callback</p>
  
  <pre><code>void Items_LoadCompleted(object sender, System.Data.Services.Client.LoadCompletedEventArgs e)
      {
          int count = _changes.Count;
          _changes.ToList().ForEach( x=&gt;{
          ....
     });
  </code></pre>
  
  <p>No errors are thrown simply no results are returned.</p>
  
  <p>What I've realized is the xml above from the Data Service is NOT in atom format.  The only thing I can think of is that the client can't serialize the data in the complex type because its not in Atom format.</p>
  
  <p>So I have 3 questions:
  1. Has anyone else encountered this?
  2. Is there a client workaround to serialize the complex type?
  3. Is there a server-side work around to serialize the complex into Atom?</p>