<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Custom XML Serialization for the .NET Compact Framework</title>
	<atom:link href="http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/</link>
	<description>Musings of a software developer in Milwaukee, WI.</description>
	<pubDate>Thu, 20 Nov 2008 16:29:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Dere</title>
		<link>http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-13237</link>
		<dc:creator>Dere</dc:creator>
		<pubDate>Fri, 20 Jun 2008 17:32:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-13237</guid>
		<description>Felipe,

I was trying to do the same thing and discovered that after you call the Serialize function, you must call Close on the stream. For example, your code would be:

XmlSerializer stringSerial = new XmlSerializer(typeof(string));
string metName = “SomeString”;
stringSerial.Serialize(netStream, metName);
netStream.Close();

That will allow the server to finish the read. It appears to be waiting for the stream to finish before finalizing the deserialization on the server's end.</description>
		<content:encoded><![CDATA[<p>Felipe,</p>
<p>I was trying to do the same thing and discovered that after you call the Serialize function, you must call Close on the stream. For example, your code would be:</p>
<p>XmlSerializer stringSerial = new XmlSerializer(typeof(string));<br />
string metName = “SomeString”;<br />
stringSerial.Serialize(netStream, metName);<br />
netStream.Close();</p>
<p>That will allow the server to finish the read. It appears to be waiting for the stream to finish before finalizing the deserialization on the server&#8217;s end.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Felipe Roos</title>
		<link>http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-12347</link>
		<dc:creator>Felipe Roos</dc:creator>
		<pubDate>Fri, 06 Jun 2008 15:18:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-12347</guid>
		<description>Hi Geoff, 

I've trying this serialization code with TcpListener and TcpClient to interprocess communication in a same pocket pc.
Both client and server sockets seems to be ok, but when debugging they seems to be in deadlock. A small code excerpt from client and server is below:
//server:
                TcpListener listener = new TcpListener(IPAddress.Loopback, port);
                listener.Start();
                TcpClient myClient = listener.AcceptTcpClient();
                XmlSerializer stringSerial = new XmlSerializer(typeof(string));
                string methodName = (string)stringSerial.Deserialize(netStream);
                XmlSerializer boolSerial = new XmlSerializer(typeof(bool));
                result  = true;
                boolSerial.Serialize(netStream, result);
                listener.Stop();
//client
                TcpClient client = new TcpClient(IPAddress.Loopback.ToString(), port);
                NetworkStream netStream = client.GetStream();
                XmlSerializer stringSerial = new XmlSerializer(typeof(string));
                string metName = "SomeString";
                stringSerial.Serialize(netStream, metName);
                bool resultOk = (bool)boolSerial.Deserialize(netStream);

What happens is, Serialize from client happens and then it ways for Deserialize. However, server nevers identify that the Serialize was made, and waits forever on the Deserialize.
Is this the kind of problem you refer when working with serialization on .Net Framework?

Regards,</description>
		<content:encoded><![CDATA[<p>Hi Geoff, </p>
<p>I&#8217;ve trying this serialization code with TcpListener and TcpClient to interprocess communication in a same pocket pc.<br />
Both client and server sockets seems to be ok, but when debugging they seems to be in deadlock. A small code excerpt from client and server is below:<br />
//server:<br />
                TcpListener listener = new TcpListener(IPAddress.Loopback, port);<br />
                listener.Start();<br />
                TcpClient myClient = listener.AcceptTcpClient();<br />
                XmlSerializer stringSerial = new XmlSerializer(typeof(string));<br />
                string methodName = (string)stringSerial.Deserialize(netStream);<br />
                XmlSerializer boolSerial = new XmlSerializer(typeof(bool));<br />
                result  = true;<br />
                boolSerial.Serialize(netStream, result);<br />
                listener.Stop();<br />
//client<br />
                TcpClient client = new TcpClient(IPAddress.Loopback.ToString(), port);<br />
                NetworkStream netStream = client.GetStream();<br />
                XmlSerializer stringSerial = new XmlSerializer(typeof(string));<br />
                string metName = &#8220;SomeString&#8221;;<br />
                stringSerial.Serialize(netStream, metName);<br />
                bool resultOk = (bool)boolSerial.Deserialize(netStream);</p>
<p>What happens is, Serialize from client happens and then it ways for Deserialize. However, server nevers identify that the Serialize was made, and waits forever on the Deserialize.<br />
Is this the kind of problem you refer when working with serialization on .Net Framework?</p>
<p>Regards,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Lane</title>
		<link>http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-11189</link>
		<dc:creator>Geoff Lane</dc:creator>
		<pubDate>Wed, 12 Mar 2008 01:54:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-11189</guid>
		<description>Coder12,
I was serializing to XML that was being consumed by a Java service. This is a real application where the Java service existed prior to the .NETCF client. And it works. To claim that it useless for interoperation seems to fly in the face of the fact that this is a real application. XML is a standard supported by many languages. Making your objects serialize to a specific schema allows it to be consumed by any language that could understand that schema. The XML serialization gives you control over the format that comes out, not because it's ASCII based, but because it's a configurable through declarative Attributes. So I can make my objects output XML that matches that existing schema.

I think you are considering serializing only as a means of freezing and reconstituting objects. In that case, sure that can't work across languages. But serializing or marshaling is just representing object data and structure in a different format. In this case an XML format is one that can be used by other tools much more easily than a binary one.</description>
		<content:encoded><![CDATA[<p>Coder12,<br />
I was serializing to XML that was being consumed by a Java service. This is a real application where the Java service existed prior to the .NETCF client. And it works. To claim that it useless for interoperation seems to fly in the face of the fact that this is a real application. XML is a standard supported by many languages. Making your objects serialize to a specific schema allows it to be consumed by any language that could understand that schema. The XML serialization gives you control over the format that comes out, not because it&#8217;s ASCII based, but because it&#8217;s a configurable through declarative Attributes. So I can make my objects output XML that matches that existing schema.</p>
<p>I think you are considering serializing only as a means of freezing and reconstituting objects. In that case, sure that can&#8217;t work across languages. But serializing or marshaling is just representing object data and structure in a different format. In this case an XML format is one that can be used by other tools much more easily than a binary one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Coder12</title>
		<link>http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-11188</link>
		<dc:creator>Coder12</dc:creator>
		<pubDate>Wed, 12 Mar 2008 01:10:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-11188</guid>
		<description>Geoff wrote:
Coder12,
The point is that the entire world does not run .NET and if you are going to be sending data to a remote service, you’ll need to interoperate with said service and its existing contract.

You are wrong Geoff,
The XML serializer is as useless as Binary one on different platform because there is NO STANDARDS on the serialization/deserialization.  Only SOAP – which is very inefficient and limited. Using XML serializer on another platform only allows for adjusting your MANUALLY built serializer because the stream (text) can be read. But you can do the same with a binary one. The only difference is that the stream can not be viewed by a primitive text editor. That is a common misconception.</description>
		<content:encoded><![CDATA[<p>Geoff wrote:<br />
Coder12,<br />
The point is that the entire world does not run .NET and if you are going to be sending data to a remote service, you’ll need to interoperate with said service and its existing contract.</p>
<p>You are wrong Geoff,<br />
The XML serializer is as useless as Binary one on different platform because there is NO STANDARDS on the serialization/deserialization.  Only SOAP – which is very inefficient and limited. Using XML serializer on another platform only allows for adjusting your MANUALLY built serializer because the stream (text) can be read. But you can do the same with a binary one. The only difference is that the stream can not be viewed by a primitive text editor. That is a common misconception.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Lane</title>
		<link>http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-11187</link>
		<dc:creator>Geoff Lane</dc:creator>
		<pubDate>Tue, 11 Mar 2008 12:44:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-11187</guid>
		<description>Coder12,
The point is that the entire world does not run .NET and if you are going to be sending data to a remote service, you'll need to interoperate with said service and its existing contract.</description>
		<content:encoded><![CDATA[<p>Coder12,<br />
The point is that the entire world does not run .NET and if you are going to be sending data to a remote service, you&#8217;ll need to interoperate with said service and its existing contract.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Coder12</title>
		<link>http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-11186</link>
		<dc:creator>Coder12</dc:creator>
		<pubDate>Tue, 11 Mar 2008 05:34:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-11186</guid>
		<description>What is the point of using XML limited serializer if you can get the real fast binary one
http://www.freewebs.com/compactFormatter/links.html
http://www.codeproject.com/KB/cs/CF_serializer.aspx</description>
		<content:encoded><![CDATA[<p>What is the point of using XML limited serializer if you can get the real fast binary one<br />
<a href="http://www.freewebs.com/compactFormatter/links.html" rel="nofollow">http://www.freewebs.com/compactFormatter/links.html</a><br />
<a href="http://www.codeproject.com/KB/cs/CF_serializer.aspx" rel="nofollow">http://www.codeproject.com/KB/cs/CF_serializer.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Lane</title>
		<link>http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-10676</link>
		<dc:creator>Geoff Lane</dc:creator>
		<pubDate>Mon, 09 Apr 2007 15:26:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-10676</guid>
		<description>Andrew,
See the linked post inline to &lt;a href="http://www.zorched.net/2007/02/27/net-compact-framework-serialization-bugs/" rel="nofollow"&gt;here&lt;/a&gt; to read about the problems I ran into with XmlEnum and PropertySpecified. Luckily both of these bugs have been fixed in the .NET CF 2.0 SP2 release.</description>
		<content:encoded><![CDATA[<p>Andrew,<br />
See the linked post inline to <a href="http://www.zorched.net/2007/02/27/net-compact-framework-serialization-bugs/" rel="nofollow">here</a> to read about the problems I ran into with XmlEnum and PropertySpecified. Luckily both of these bugs have been fixed in the .NET CF 2.0 SP2 release.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Arnott</title>
		<link>http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-10665</link>
		<dc:creator>Andrew Arnott</dc:creator>
		<pubDate>Thu, 05 Apr 2007 18:45:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-10665</guid>
		<description>So what are the bugs in NetCF's serializer that you ran into?  And have you tried CF 2.0 SP2 to see if the problems were fixed?</description>
		<content:encoded><![CDATA[<p>So what are the bugs in NetCF&#8217;s serializer that you ran into?  And have you tried CF 2.0 SP2 to see if the problems were fixed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: .NET Compact Framework Serialization Bugs</title>
		<link>http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-9435</link>
		<dc:creator>.NET Compact Framework Serialization Bugs</dc:creator>
		<pubDate>Wed, 28 Feb 2007 17:28:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.zorched.net/2007/02/28/custom-xml-serialization-for-the-net-compact-framework/#comment-9435</guid>
		<description>[...] follow-up post on Writing a Custom XML Serializer has been [...]</description>
		<content:encoded><![CDATA[<p>[...] follow-up post on Writing a Custom XML Serializer has been [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
