Serialize the Data to XML

public static String SerializeInterface(object SerializedObject)       {           using (MemoryStream stream = new MemoryStream())           {               XmlSerializer serializer = null;               if (SerializedObject.GetType() == typeof(INTERFACE_ERRORS))               {                   serializer = new XmlSerializer(typeof(INTERFACE_ERRORS));                   INTERFACE_ERRORS o = (INTERFACE_ERRORS)SerializedObject;                   serializer.Serialize((Stream)stream, o);               }               else if (SerializedObject.GetType() == typeof(DETAILS_TO_SUB_SYSTEM))               {                   serializer = new XmlSerializer(typeof(DETAILS_TO_SUB_SYSTEM));                   DETAILS_TO_SUB_SYSTEM details_to_sub_system = (DETAILS_TO_SUB_SYSTEM)SerializedObject;                   serializer.Serialize((Stream)stream, details_to_sub_system);               }                stream.Seek(0L, SeekOrigin.Begin);               byte[] buffer... Continue Reading →

XSD Based Programming for WCF Service

Recently i presented a session on SGDOTNET, Singapore about the XSD programming. The event happened on 8th July 2010. The topic is about the WCF service using the XSD approach.   Slide 1 : XSD Based WCF Service Slide 2: XSD Based WCF Service Part 2 Source: Sample.zip

WCF Service – A name was started with an invalid character. Error processing resource

Error Details: The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. A name was started with an invalid character. Error processing resource 'http://SENWIN2008/WCF/Service/’ <%@ ServiceHost Language="C#" Debug="true" Service="Service Name" CodeBehind="Service.svc.cs" %> Resolution Check whether the IIS... Continue Reading →

Create a website or blog at WordPress.com

Up ↑