Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8395393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:17:23+00:00 2026-06-09T20:17:23+00:00

I need to convert my web application to phone application. I was succeed to

  • 0

I need to convert my web application to phone application. I was succeed to deserializer the request respond into the generic list on my web app, but I haven’t figure out how to do it on the phone app. On the web I can use DataContractSerializer and XmlDictionaryRead.CreateTextReader and System.Xml.XmlDictionaryReaderQuotas(), but there is no such method on Windows phone. I modified the code and get the error like that

Error in line 1 position 2. Expecting element ‘ArrayOfQueueItem’ from namespace ‘http://schemas.datacontract.org/2004/07/CMSPhoneApp.DataObjects’..
//Encountered ‘Element’ with name ‘QueueItem’, namespace ”.

There is the code to deserialzier

try{
            using (XmlReader r = XmlReader.Create(new StringReader(content)))
            {
                var ser = new DataContractSerializer(typeof(T));
                var reader = XmlDictionaryReader.CreateDictionaryReader(r);
                ser = new DataContractSerializer(typeof(T));
                var deserializedItem = (T)ser.ReadObject(reader, true);
                reader.Close();
                return deserializedItem;
            }
        }

I read the respond stream into the string as below:

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfQueueItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DataObjects">
<QueueItem>
  <callNumber>349551</callNumber>
  <errorMsg
   i:nil="true" />
  <link>/Call/349551</link>
  <page>Call</page>
  <siteCity>Burnaby</siteCity>
  <status>Open</status>
  <summary>Mobile Application Research</summary>
 </QueueItem>
 <QueueItem>
   <callNumber>376209</callNumber>
    <errorMsg
    i:nil="true" />
   <link>/Call/376209</link>
   <page>Call</page>
   <siteCity>Burnaby</siteCity>
   <status>Open</status>
   <summary>July 2012 ASD Calls of the Month.</summary>
   </QueueItem>
</ArrayOfQueueItem>

The following is the “QueueItem” class:

namespace CMSPhoneApp.DataObjects
{
   //This is Model
  public class QueueItem
  {
    public string callNumber { get; set; }
    public string summary { get; set; }
    public string status { get; set; } //queInvoiceAdmin no status
    public string link { get; set; }
    public string errorMsg { get; set; }
    public string page { get; set; }
    public string siteCity { get; set; }
   }
}

Even I trid to cut the respond stream into as follows, I stil got the same error:

<QueueItem>
 <callNumber>349551</callNumber>
 <errorMsg
  i:nil="true" />
 <link>/Call/349551</link>
 <page>Call</page>
 <siteCity>Burnaby</siteCity>
 <status>Open</status>
 <summary>Mobile Application Research</summary>
</QueueItem>
<QueueItem>
  <callNumber>376209</callNumber>
  <errorMsg
   i:nil="true" />
  <link>/Call/376209</link>
  <page>Call</page>
  <siteCity>Burnaby</siteCity>
  <status>Open</status>
 <summary>July 2012 ASD Calls of the Month.</summary>
</QueueItem>

Would someone guide me or show me the example or link to solve this problem. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:17:25+00:00Added an answer on June 9, 2026 at 8:17 pm

    It may not be a good solution, but it fix my issue. I changed the ‘schemas.datacontract.org/2004/07/DataObjects’ to ‘schemas.datacontract.org/2004/07/CMSPhoneApp.DataObjects’. Therefore it can find the class location. Also I need to create ArrayOfQueueItem Class for deserialization.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to convert a web app into ipad app. Stressing on style and
I'm trying to convert a asp.net website to asp.net web application. I need to
I need to convert a project started as a Web Application to a Class
I have a web-application. As part of this, I need users of the app
I need to convert a time difference (diff) between two actions into a human
I need to convert a Joda-Time DateTime into a String, in the following format:
I need to convert a column data into single row with multiple columns Example
I need to convert hierarchical data (AVRO data, which boils down to JSON) into
I'm having a foreach loop in my web application. I need to use this
I'm using C# in VS2010 and I need some help with a web application.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.