serialization

WCF Disable Deserialization Order Sensitivity

I have a recurring problem when passing Serialized objects between non-.NET Clients, and .NET WCF Services. When WCF Deserializes objects, it is strictly dependant upon the order of properties. That is, if I define my class as: public class Foo { public int ID { get; set; } public int Bar { get; set; } } Then WCF Will ser...

How to prevent auto implemented properties from being serialized?

How can I prevent a auto implemented property from being serialized by the binary formatter? The [NonSerialized] attribute can only be used with fields. And the field is hidden when using auto implemented properties. ...

WCF DataMember Serializing questions

Ok, so I was part way through the long winded process of creating DTOs for sending my model over the wire and I don't feel like I'm going down the right route. My issue is that most of the entities in my model are not much more that DTOs anyway. I basically have an anaemic domain model, which is fine but it also make me wonder if I nee...

WCF Problem Sending Object To Client

Background Converting from using .Net Remoting to WCF. Most of the methods on the WCF server are working fine, but ran into one that isn't working today. This is the service contract: [ServiceContract] public interface IMyService { [OperationContract] generated.Response.ACS_Response Check(generated.Request.ACS_Request request); }...

Error using WCF and DataContractSerializer

I have a fairly complex object model that I'm trying to serialize using WCF. I'm running into a problem where I can create a new instance on the server and return it to the client, then trying to pass that same object back or even serialize it using the DataContractSerializer throws an exception. Test method Server.Service.Test.Seriali...

Choosing the right subclass to instantiate programatically

Ok, the context is some serialization / deserialization code that will parse a byte stream into an 'object' representation that's easier to work with (and vice-versa). Here's a simplified example with a base message class and then depending on a 'type' header, some more data/function are present and we must choose the right subclass to ...

java serializable interface

In Java some of the objects are serializeable and some or not.An object of a class which implements Serializable interface can be act as serializable object.Also Serializable interface is used for namesake only and there is no methods there.Here my question is ,Java specification can simply say all objects are serializable .user needn't ...

Should references in RMI exposed services be transient?

I'm exposing some services using RMI on Spring. Every service has a dependency to other service bean which does the real processing job. For example: <bean id="accountService" class="example.AccountServiceImpl"> <!-- any additional properties, maybe a DAO? --> </bean> <bean id="rmiAccount" class="example.AccountRmiServiceImpl"/> <...

XML Deserialization with C# .NET 3.5

I Have this XML File <?xml version="1.0" standalone="yes"?> <Root> <Object> <referenceName>People</referenceName> <query>select * from people</query> </Object> <Object> <referenceName>Countries</referenceName> <query>select * from countries</query> </Object> </Root> I need to convert into an object ...

How to figure out the type when deserializing?

If I have 10 different objects serialized/deserialized using a Generic T class that uses the XmlSerializer internally, how can I know which type to use when deserializing it? MyXmlSerializer.Deserialize<MyObject> ( ... ) How can I know MyObject? All I have is a stringstream. ...

Purpose of Serialization in webapplication

1.Where is the usage of serialization in a webapplication. 2.Is it necessary that a form bean is serializable. 3.In tomcat what is the usage of sessions.ser file.. ...

Xml Serialization in .NET

Hi I have a class that I want to serialize to xml. The class looks like the following [XmlRoot("clubMember")] public class Person { [XmlElement("memberName")] public string Name {get; set;} [XmlArray("memberPoints")] [XmlArrayItem("point")] public List<Int32> ClubPoints {get; set;} } When I serialize the above cla...

will serialized object contains metadata?

When we are deserializing an object, its very difficult to understand that, how it is retriving the object in some certain state? Does it contain any Meta data of the object? ...

C# Object Binary Serialization

I want to make a binary serialize of an object and the result to save it in a database. Person person = new Person(); person.Name = "something"; MemoryStream memorystream = new MemoryStream(); BinaryFormatter bf = new BinaryFormatter(); bf.Serialize(memorystream, person); How can I transform memorystream in a string type to be saved ...

Send javascript variables to server-side ASP .NET

I need to pass a javascript data to the server-side on post-back. Ex var jsVariableToPass = new Object(); jsVariableToPass ['key1'] = value1; jsVariableToPass ['key2'] = value2; jsVariableToPass ['key3'] = value3; I'd like this to be accessible as a Hashtable on the server side. What would be the best way of doing th...

How can I serialize (and later deserialize) a generic type in Scala?

Say I'd like to implement something like this: def serialize( list: List[_] ) : Node = { <list> { for ( item <- list ) yield serializeItem(item) } </list> } def deserialize( node : Node ) : List[_] = { // ? } How do I get the type of the List, e.g. T in List[T] so I can write that out? Or do I need it? How can I instantiate ...

How can I deserialise an XML element into an array of elements with both attributes and text in C#?

I am having a problem trying to deserialise this XML: <?xml version="1.0" encoding="UTF-8"?> <links> <link title="ABC">http://abc.co.uk&lt;/link&gt; <link title="eBay">http://ebay.co.uk&lt;/link&gt; <link title="Best Damn Site on the Web">http://stackoverflow.com&lt;/link&gt; </links> Using the code: [XmlRoot("links")] pu...

Serializable exception and WCF

if i made my exception Serializable like this article from msdn , so can my exception serialized over WCF ? ...

How can I merge data into an XDP file and return a PDF (via .NET)?

My team has a template (XDP) that we've created with the Adobe LiveCycle designer. The situation: We are replacing an old Acrobat form (XFDF format) with this LiveCycle form as part of a much larger upgrade The current Acrobat form is dynamically populated with basic data and delivered to the user as a PDF (the user clicks a link and ...

Getting "ArrayOf" prepended to arrays of ActiveRecord objects in XML representation returned by asp.net webservice with Mono

ASP.net web method: [WebMethod()] public Data.Subtitle[] GetAll() { return Data.Subtitle.FindAll(); } Here's the Subtitle class: [ActiveRecord("Subtitle")] public class Subtitle : ActiveRecordBase<Subtitle> { [PrimaryKey(PrimaryKeyType.Assigned)] public int SubId {get;set;} [Property()] public int SubStreamId {ge...