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 7931119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:37:50+00:00 2026-06-03T20:37:50+00:00

I was created this return from WCF and may i know how could i

  • 0

I was created this return from WCF and may i know how could i read the data specifically ??

[DataContract]
public class UserData
{
    [DataMember]
    public int userID { get; set; }

    [DataMember]
    public string name { get; set; }

    [DataMember]
    public string email { get; set; }

    [DataMember]
    public string contact { get; set; }

    [DataMember]
    public string status { get; set; }
}

This is WCF side and returning from WCF, i want to read this from Window phone. may i know is there some example ? Thank you for reply

Update

The code in phone part where i want to use the data

        private Service1Client _serviceClient;
    public Login()
    {
        InitializeComponent();
        _serviceClient = new Service1Client();
        _serviceClient.LoginUserCompleted += new EventHandler<LoginUserCompletedEventArgs>(_serviceClient_LoginUserCompleted);

    }

    private void loginBtn_Click(object sender, RoutedEventArgs e)
    {
        _serviceClient.LoginUserAsync(txtEmail.Text, txtPassword.Password);
    }

    private void _serviceClient_LoginUserCompleted(object sender, LoginUserCompletedEventArgs e)
    {

        if (e.Error == null && e.Result != null)
        {
            (App.Current as App).MyUserID = 16;
            MessageBox.Show("Welcome " + e.Result + "!");
            //ContentPanel.Visibility = Visibility.Collapsed;
            //Data.Visibility = Visibility.Visible;
            //Testing.ItemsSource = e.Result;

Wondering how could i make this few line of code to read the data accordingly, make it into list or can be extract specific data and currently this few lines of codes giving me this answer ::

            WCFReference.UserData
        }
        else
        {
            MessageBox.Show(e.Error.InnerException.Message + " Couldn't Login, Please try again =D");
        }
    }
  • 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-03T20:37:51+00:00Added an answer on June 3, 2026 at 8:37 pm

    If you are using the SOAP protocol you could either build an WSDL to describe the webservice or you could create the custom class right on the client based on your knowledge of the webservice.

    If you are using the REST protocol (Which would be the best alternative for an WP7 Application) you have to create the class on the client based on your knowledge because there are no such thing as WSDL that can describe an REST webservice.

    Here is an start for you.

    public class UserData
    {
        public int userID { get; set; }
        public string name { get; set; }
        public string email { get; set; }
        public string contact { get; set; }
        public string status { get; set; }
    }
    

    Now you just have to parse the response from the webservice request as an UserData class and whoala you are all set.

    And as some people pointed out, you can use the webservice as an service reference if you prefer that but sometimes it just messes things up.

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

Sidebar

Related Questions

I have this code for validation of the Customer class which is created from
I created a simple wcf service that retrieves data from crm 4.0 using the
I've created the default WCF Service in VS2008. It's called Service1 public class Service1
I created this layout of successive text input fields, 1- Enter data into empty
I've created this simple GUI: from tkinter import * root = Tk() def grabText(event):
I've created an ADO.Net WCF Data Service hosted in a Azure worker role. I
I created WCF service that returns a custom object called XmlElementTreeNode. This is what
I have my WCF service, I've created reference to it from MSTest project. Here
I've created a WCF DataService and for this service I require some custom authentication
I have created a WCF service, now this WCF service has to call a

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.