0
голосов
4ответов
1843 просмотров

how to send data over network fast?

i have lots of data like this 1:0x00a4c7d9fb3849... 2:0x79821309bd789c7689c97... 3:0x0178dce67fe898... they are more than 100 per second and speed is the most important thing(network is always busy). what should i use to transfer my data(tcp/ip, pipes, via, etc)? how should i serialize it(Binar...

0
голосов
2ответов
969 просмотров

Change the order of property serialization at design time in .Net

I have a class where it's problematic to relay on the properties being serialized in alphabetical order at design time. In other words, property Z must be serialized before property A. The problem arises because property property Z clears property A whenever it changes - which happens in Initial...

2
голосов
1ответов
1546 просмотров

.NET 2.0 Client fails to deserialize valid Apache-SOAP web service XML, shows null for all properties

A coworker has made a Java web service running on the Apache-SOAP runtime on a Tomcat 6 server, but only tested it using Eclipse's built-in tool and SoapUI. The output of this service is an array of objects which are each composes of five string fields. I need to write a .NET client to consume th...

2
голосов
2ответов
2354 просмотров

Why does Binary Serialization require the object to be marked as serializable?

I was using the xml serializer but when I switched to binary serialization, it throws an exception: Runtime error: dotNet runtime exception: Type 'MyTypes.MyObject' in Assembly 'MyTypes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable. Why is it differen...

0
голосов
3ответов
583 просмотров

How to use Binary Serializing to store as a string?

Basically I want MyObject to be serialized into a string using Binary Serialization. Is this possible? If so, how to do this? Same for deserialization, from string to MyObject.

1
голосов
1ответов
463 просмотров

Putting Eclipse plugin on System classpath

I am trying to desrialize an object of type A located in plugin C. Although my plugin has the proper dependency on plugin C which has type A and can also create and instantiate an object of type A, when I try to desiralize an object of type A, it fails. The reason I believe is that the java.i...

0
голосов
1ответов
1813 просмотров

How to serialize parameters in Web Service method

I have this problem. I have WCF .Net C# web service with this method: public interface IMyService { // TODO: Add your service operations here [OperationContract] ListOfRequests GetListOfRequests(string par1, string par2, ...

5
голосов
4ответов
4877 просмотров

How can I deserialize an interface type?

I serialize a class which includes a property called Model as IModel but when I try to Deserialize it I'm getting the following exception: System.Runtime.Serialization.SerializationException: Type 'MYN.IModel' in Assembly 'MYN.Defs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not m...

3
голосов
5ответов
3431 просмотров

Better ways of improving code serialization speed

I have the following code that serializes a List to a byte array for transport via Web Services. The code works relatively fast on smaller entities, but this is a list of 60,000 or so items. It takes several seconds to execute the formatter.Serialize method. Anyway to speed this up? public st...

0
голосов
3ответов
261 просмотров

What is the easiest way to transfer a class with many dependecies in WCF (using shared DLLs)?

I've got a class which has properties referenced to couple of interfaces and classes. Now I'm trying to transfer this one class via WCF (named pipes), what's the best way to deal with it? Shall go into all referenced interfaces, class and mark stuff as <DataContract()>, <Serializable(...

1
голосов
1ответов
716 просмотров

C# XML deserialization problem

I have the following XML snippet: <?xml version="1.0" encoding="utf-8"?> <dmFiles> <dmFile dmUpFileGuid="" dmFileDescr="testcase01.pdf" dmFileMetaType="main" dmFileGuid="" dmMimeType="pdf" dmFormat=""> ...

0
голосов
3ответов
578 просмотров

C#, XML to Class DeSerialization Question

I have the following XML snippet: <dmFiles> − <dmFile dmUpFileGuid="" dmFileDescr="testcase01.pdf" dmFileMetaType="main" dmFileGuid="" dmMimeType="pdf" dmFormat=""> If I create a strongly typed C# class with string properties for the dmFile attributes (eg: dmFileDescr), how can I e...

2
голосов
3ответов
6712 просмотров

Which Json deserializer renders IList<t> collections?</t>

I'm trying to deserialize json to an object model where the collections are represented as IList&lt;T&gt; types. The actual deserializing is here: JavaScriptSerializer serializer = new JavaScriptSerializer(); return serializer.Deserialize&lt;IList&lt;Contact&gt;&gt;( (new StreamReader(Gene...

1
голосов
2ответов
1861 просмотров

(.Net) suggestions on making a config file for a program?

I'm not necessarily referring to app.configs, but a custom configuration file that would store my program's state whenever a user hits a "save" button. In my example, it's a UI builder that allows the user to choose which "fields" are to be displayed on the left and right columns in a two-column...

0
голосов
2ответов
3445 просмотров

Deserializing using XElement

I had to write my own deserializer, because XmlSerializer and DataContractSerializer aren't good for my needs. So, here's the base of my deserializer: static BaseElement ParseXml(XElement element) { var e = (Element)Activator.CreateInstance(Type.GetType("Elements." + element.Name...

0
голосов
1ответов
87 просмотров

Jquery .serialize isn't including the FIRST SET at INDEX 0

My jquery looks like this: var as = $("input[name=as[]]").serialize(); var bs = $("input[name=bs[]]").serialize(); var cs = $("input[name=cs[]]").serialize(); but it's not serializing the first set at index 0.

-1
голосов
2ответов
2521 просмотров

Type 'System.Web.HttpRequest' cannot be serialized

I am trying to design an Picture Upload feature into a web site. I am using ASP.NET 3.5, C#, and WCF. I have been asked to accomplish the following: 1) Make the Uploader a Web Service 2) Return progress updates to the user as files are uploaded. 3) Log other relevant user-selected options i...

1
голосов
1ответов
440 просмотров

WCF Serialization &amp; Interfaces

Does link text mean I have to return a concrete implementation? Even though I am using svcutil with the /r that includes my entites(where IMyInterface is defined). I get no errors but it changes all List(of IMyInterface) to list(of Object) and I cannot deserialize it on the client Error: list(of...

1
голосов
1ответов
2221 просмотров

XStream, CircularReferenceException

Please consider this code. Is it using Circular Reference? If not why am I getting CircularReferenceException, while enabling NO_REFERENCE mode in XStream. Anyone, please clarify the thing. @XStreamAlias("BalanceEnquiry") public class BalanceEnquiry extends EAIRequest { @XStreamImplicit ...

1
голосов
2ответов
239 просмотров

Analysing an XML serialized object graph to find out what takes up most space

We have a some objects that are exposed by WCF services (using wsHttpBinding) and serialized into XML. Here is an extract of one of them: [DataContract] public class Person { [DataMember] private string _forename; [DataMember] private string _middleInitial; [DataMember] private stri...

3
голосов
6ответов
2908 просмотров

Why can't a dictionary object be XmlSerialized in C#?

It seems that serialization is very straightforward. Assuming that both the key and value are serializable, what could be simpler than representing key-value pairs in XML?! To all the commenters: First of all, I appreciate your answers, But- I am less interested in workoraunds (There is indeed p...

6
голосов
2ответов
2067 просмотров

C# Partial deserialization

So I have an xml that has a similar structure to this: &lt;MyObject&gt; &lt;PropertyA&gt;Value&lt;/PropertyA&gt; &lt;PropertyB&gt;Value&lt;/PropertyB&gt; &lt;PropertyC&gt;Value&lt;/PropertyC&gt; &lt;ArrayOfOtherObject&gt; &lt;OtherObject&gt; &lt;PropertyX&gt;V...

1
голосов
1ответов
1565 просмотров

Serialization of a derived class that hides a base property

I have a class like this MyClass : BaseClass string new FirstName When I try to serialize this class I get the following error message Member SQLClientAdapter.Columns of type hides base class member Adapter.Columns of type ...Use XmlElementAttribute or XmlAttributeAttribute to specify a n...

3
голосов
2ответов
5733 просмотров

Xmlserializer not serializing base class members

I'm having this very odd issue while trying to serialize a class for logging using XmlSerializer. The code was generated by the wsdl.exe tool. The class that gets serialized as is declared as follows: [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Serializabl...

1
голосов
1ответов
220 просмотров

I have some performance related questions about Silverlight Enterprise app development

I have some performance related questions about SL Enterprise app development. -We have 10.000 rows binding to an ItemsSource control. (A total of 100.000+ UIElements when databound) Q1.How to do this binding in another thread? Because Silverlight gets stuck while the binding happens. Q2.Any ...

12
голосов
3ответов
34331 просмотров

xmlNode to objects

I have been working with a 3rd party java based REST webservice, that returns an array of xmlNodes. The xmlNode[] respresent an object and I am trying to work out the best way to Deserialize the xmlNode[] in the object? is it to build up a xmlDocument first and the Deserialize ? Thanks

1
голосов
1ответов
1807 просмотров

Axis2: extract explicit XML from strongly-typed response classes?

I have a legacy Java webservice based on Axis2. This webservice classes consist of: a service interface (generated from WSDL); an implementation of the service (written in-house); a bunch of autogenerated entity-like classes representing requests and responses. I also have a requirement to ex...

0
голосов
3ответов
3664 просмотров

Best way to unserialize within an array

I have an array which contains serialized data similar to the example below. Array ( [0] =&gt; Array ( [id] =&gt; 4 [data] =&gt; a:2:{s:6:"Series";a:1:{s:11:"description";s:11:"hello world";}s:4:"Type";a:1:{i:0;s:1:"1";}} [created] =&gt; 2009-10-12...

4
голосов
6ответов
2721 просмотров

InvalidOperationException When XML Serializing Inherited Class

I am having an issue serializing a c# class to an XML file that has a base class... here is a simple example: namespace Domain { [Serializable] public class ClassA { public virtual int MyProperty { get; set; } } } namespace Derived { public class ClassA...

2
голосов
2ответов
1202 просмотров

Efficiency of deserialization vs. XmlReader

I'm working with a complicated xml schema, for which I have created a class structure using xsd.exe (with some effort). I can now reliably deserialize the xml into the generated class structure. For example, consider the following xml from the web service: &lt;ODM FileType="Snapshot" CreationD...