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 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.
...
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...
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);
}...
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...
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 ...
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 ...
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"/>
<...
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 ...
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.
...
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..
...
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...
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?
...
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 ...
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...
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 ...
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</link>
<link title="eBay">http://ebay.co.uk</link>
<link title="Best Damn Site on the Web">http://stackoverflow.com</link>
</links>
Using the code:
[XmlRoot("links")]
pu...
if i made my exception Serializable like this article from msdn , so can my exception serialized over WCF ?
...
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 ...
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...