EDN Admin
Well-known member
I have a problem serializing this object, I isolated the property that is causing the problem.
Im trying to serialize this RetrieveDataResp class. it looks like the following
<pre class="prettyprint [Serializable]
[XmlRoot("retrieveDataResp")]
public class RetrieveDataResp
{
//Other stuff
[XmlElement("response")]
public Response.Response XmlResponse { get; set; }
}[/code]
Response class looks like the following
<pre class="prettyprint public class Response
{
/// <summary>
/// This is a bool that will be set if something when wrong
/// with the request
/// </summary>
[XmlElement("withError")]
public bool WithError { get; set; }
/// <summary>
/// This is a string that will save the exception message
/// so the UI will be able to display the ex. message.
/// </summary>
[XmlElement("exceptionString")]
public string ExceptionString { get; set; }
/// <summary>
/// This is the response type
/// </summary>
[XmlElement("responseType")]
public string ResponseType { get; set; }
}[/code]
<br/>
I would like the xml to look like this
<retrieveDataResp>
<response>
<withError>false</withError>
<exceptionString />
<responseType>Retrieve Data</responseType>
</response>
</retrieveDataResp>
Thanks a lot guys
View the full article
Im trying to serialize this RetrieveDataResp class. it looks like the following
<pre class="prettyprint [Serializable]
[XmlRoot("retrieveDataResp")]
public class RetrieveDataResp
{
//Other stuff
[XmlElement("response")]
public Response.Response XmlResponse { get; set; }
}[/code]
Response class looks like the following
<pre class="prettyprint public class Response
{
/// <summary>
/// This is a bool that will be set if something when wrong
/// with the request
/// </summary>
[XmlElement("withError")]
public bool WithError { get; set; }
/// <summary>
/// This is a string that will save the exception message
/// so the UI will be able to display the ex. message.
/// </summary>
[XmlElement("exceptionString")]
public string ExceptionString { get; set; }
/// <summary>
/// This is the response type
/// </summary>
[XmlElement("responseType")]
public string ResponseType { get; set; }
}[/code]
<br/>
I would like the xml to look like this
<retrieveDataResp>
<response>
<withError>false</withError>
<exceptionString />
<responseType>Retrieve Data</responseType>
</response>
</retrieveDataResp>
Thanks a lot guys
View the full article