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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:38:33+00:00 2026-05-31T18:38:33+00:00

VS2008, .NET Framework 3.5 We’re utilizing the WebEx Xml API. Here’s a sample Xml

  • 0

VS2008, .NET Framework 3.5

We’re utilizing the WebEx Xml API. Here’s a sample Xml response from their web service that I’m trying to deserialize into .NET classes.

<?xml version="1.0" encoding="UTF-8"?>
<serv:message xmlns:serv="http://www.webex.com/schemas/2002/06/service" xmlns:com="http://www.webex.com/schemas/2002/06/common" 

xmlns:event="http://www.webex.com/schemas/2002/06/service/event"><serv:header><serv:response><serv:result>SUCCESS</serv:result><serv:gsbStatus>PRIMARY</s

erv:gsbStatus></serv:response></serv:header>
<serv:body>
<serv:bodyContent xsi:type="event:lstsummaryEventResponse" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<event:matchingRecords>
    <serv:total>2</serv:total>
    <serv:returned>2</serv:returned>
    <serv:startFrom>1</serv:startFrom>
</event:matchingRecords>
<event:event>
    <event:sessionKey>999999</event:sessionKey>
    <event:sessionName>Test Event 1</event:sessionName>
    <event:sessionType>129</event:sessionType>
    <event:hostWebExID>SomeName</event:hostWebExID>
    <event:startDate>03/28/2012 14:30:00</event:startDate>
    <event:endDate>03/28/2012 14:45:00</event:endDate>
    <event:timeZoneID>11</event:timeZoneID>
    <event:duration>15</event:duration>
    <event:description></event:description>
    <event:status>NOT_INPROGRESS</event:status>
    <event:panelists></event:panelists>
    <event:listStatus>PUBLIC</event:listStatus>
</event:event>
</serv:bodyContent>
</serv:body>
</serv:message>

Here’s the class that we’re deserializing into:

using System;
using System.Xml;
using System.Xml.Serialization;
using System.Xml.Schema;
using System.Collections.Generic;

namespace Masonite.MTier.WebEx
{
    [Serializable()]
    [XmlRoot("message", Namespace = "http://www.webex.com/schemas/2002/06/service")]
    public class lstsummaryEventResponsexx
    {
        [XmlNamespaceDeclarations]
        public XmlSerializerNamespaces xmlns = new XmlSerializerNamespaces();

        public lstsummaryEventResponsexx()
        {
            xmlns.Add("serv", "http://www.webex.com/schemas/2002/06/service");
            xmlns.Add("com", "http://www.webex.com/schemas/2002/06/common");
            xmlns.Add("event", "http://www.webex.com/schemas/2002/06/service/event");
        }


        [XmlElement(ElementName = "header")]
        public Header header { get; set; }

        [XmlElement(ElementName = "body")]
        public Body body { get; set; }


        [Serializable()]
        [XmlRoot("header")]
        public class Header
        {
            [XmlElement(ElementName = "response")]
            public Response response { get; set; }
        }


        [Serializable()]
        [XmlRoot("body")]
        [XmlInclude(typeof(lstsummaryEventResponse))]
        public class Body
        {
            [XmlElement(ElementName = "bodyContent", Form = XmlSchemaForm.Qualified)]
            public BodyContent bodyContent { get; set; }
        }

        [Serializable()]
        public class lstsummaryEventResponse
        {

        }

        [Serializable()]
        [XmlRoot("response")]
        public class Response
        {
            [XmlElement(ElementName = "result")]
            public string result { get; set; }

            [XmlElement(ElementName = "reason")]
            public string reason { get; set; }

            [XmlElement(ElementName = "gsbStatus")]
            public string gsbStatus { get; set; }

            [XmlElement(ElementName = "exceptionID")]
            public string exceptionID { get; set; }
        }


        [Serializable()]
        [XmlRoot("bodyContent")]
        public class BodyContent
        {            
            [XmlElement(ElementName = "matchingRecords", Namespace = "http://www.webex.com/schemas/2002/06/service/event")]
            public MatchingRecords matchingRecords { get; set; }

            [XmlElement(ElementName = "event", Namespace = "http://www.webex.com/schemas/2002/06/service/event")]
            public List<EventSummary> events { get; set; }
        }


        [Serializable()]
        [XmlRoot("matchingRecords")]
        public class MatchingRecords
        {
            [XmlElement(ElementName = "total", Namespace = "http://www.webex.com/schemas/2002/06/service")]
            public int total { get; set; }

            [XmlElement(ElementName = "returned", Namespace = "http://www.webex.com/schemas/2002/06/service")]
            public int returned { get; set; }

            [XmlElement(ElementName = "startFrom", Namespace = "http://www.webex.com/schemas/2002/06/service")]
            public int startFrom { get; set; }
        }


        [Serializable()]
        [XmlRoot("event")]
        public class EventSummary
        {
            [XmlElement(ElementName = "sessionKey")]
            public long sessionKey { get; set; }

            [XmlElement(ElementName = "sessionName")]
            public string sessionName { get; set; }

            [XmlElement(ElementName = "sessionType")]
            public int sessionType { get; set; }

            [XmlElement(ElementName = "hostWebExID")]
            public string hostWebExID { get; set; }

            [XmlElement(ElementName = "startDate")]
            public string startDate { get; set; }

            [XmlElement(ElementName = "endDate")]
            public string endDate { get; set; }

            [XmlElement(ElementName = "timeZoneID")]
            public int timeZoneID { get; set; }

            [XmlElement(ElementName = "duration")]
            public int duration { get; set; }

            [XmlElement(ElementName = "description")]
            public string description { get; set; }

            [XmlElement(ElementName = "status")]
            public string status { get; set; }

            [XmlElement(ElementName = "panelists")]
            public string panelists { get; set; }

            [XmlElement(ElementName = "listStatus")]
            public listingType listStatus { get; set; }
        }
    }
}

The error I’m receiving:

The specified type was not recognized: name='lstsummaryEventResponse', namespace='http://www.webex.com/schemas/2002/06/service/event', at <bodyContent xmlns='http://www.webex.com/schemas/2002/06/service'>  

I’m not sure how to provide the type lstsummaryEventResponse for the Deserialize method. I added another serializable class to my class above using that name, but get the same error. Any thoughts?

  • 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-05-31T18:38:35+00:00Added an answer on May 31, 2026 at 6:38 pm

    BodyContent can have the type event:lstsummaryEventResponse – so you have to declare the corresponding class, and then decorate the declaration of BodyContent as follows:

        [Serializable()] 
        [XmlRoot("bodyContent")] 
        [XmlInclude("lstsummaryEventResponse")]
        public class BodyContent {
    
        }
    

    Having said that, creating C# class with a serialization corresponding to some arbitrary XML is pretty tricky, I am not sure it is right approach

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

Sidebar

Related Questions

I have created a new VS2008 ASP.Net Web service project, with the default name
I'm developing a small web application in ASP.Net (framework version 3.5) using VS2008 and
Im currently using vs2008 with asp.net mvc framework for web development. Im missing a
I use VS2008 targetting .NET 2.0 Framework, and, just in case, no I can't
can I use .net framework 4.0 in VS2008 ? If yes how can I
Can I use EF4.0 relased with .NET framework 4.0 with VS2008?
I have an app using the ADO.NET entity framework (the VS2008 version, not the
I'm currently learning to develop for the .net compact framework using c# in VS2008
I’m trying to upgrade our solution from VS2005 .NET 2.0 to VS2008 .NET 3.5.
I migrated my ASP.NET project from 3.5 to 4.0 (VS2008 to VS2010) and when

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.