Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting "ArrayOf" prepended to arrays of ActiveRecord objects in XML representation returned by asp.net webservice with Mono
    primarykey
    data
    text
    <p>ASP.net web method:</p> <pre><code>[WebMethod()] public Data.Subtitle[] GetAll() { return Data.Subtitle.FindAll(); } </code></pre> <p>Here's the Subtitle class:</p> <pre><code>[ActiveRecord("Subtitle")] public class Subtitle : ActiveRecordBase&lt;Subtitle&gt; { [PrimaryKey(PrimaryKeyType.Assigned)] public int SubId {get;set;} [Property()] public int SubStreamId {get;set;} [Property()] public string SubTimeStart {get;set;} [Property()] public string SubTimeEnd {get;set;} [Property()] public string SubText {get;set;} public Subtitle () { } } </code></pre> <p>And here's the XML coming back:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;ArrayOfSubtitle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/"&gt; &lt;Subtitle&gt; &lt;SubId&gt;862&lt;/SubId&gt; &lt;SubStreamId&gt;1&lt;/SubStreamId&gt; &lt;SubTimeStart&gt;00:01:04.4450000&lt;/SubTimeStart&gt; &lt;SubTimeEnd&gt;00:01:08.2450000&lt;/SubTimeEnd&gt; &lt;SubText&gt;Wikus van de Merwe MNU Alien Affairs &lt;/SubText&gt; &lt;/Subtitle&gt; &lt;Subtitle&gt; &lt;SubId&gt;863&lt;/SubId&gt; &lt;SubStreamId&gt;1&lt;/SubStreamId&gt; &lt;SubTimeStart&gt;00:02:11.3430000&lt;/SubTimeStart&gt; &lt;SubTimeEnd&gt;00:02:14.8430000&lt;/SubTimeEnd&gt; &lt;SubText&gt;Sarah Livingstone Sociologist, Kempton Park University &lt;/SubText&gt; &lt;/Subtitle&gt; </code></pre> <p>I love the simplicity of presenting the data objects as a webservice with one line of code, but I can't seem to get the array of <code>Subtitle</code> objects serialized without the "ArrayOf" prefix. My trips through Google have pointed me to WCF facilities that aren't available on Mono, or manual serialization, which I am trying to avoid.</p> <p>Is there an easy way to present the array of Subtitle objects as <code>&lt;Subtitles&gt;</code> in Mono?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload