<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Whaly&#039;s World</title>
	<atom:link href="http://baleinoid.com/whaly/feed/" rel="self" type="application/rss+xml" />
	<link>http://baleinoid.com/whaly</link>
	<description>tail -f /var/log/whaly</description>
	<lastBuildDate>Thu, 08 Sep 2011 10:23:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Xml deserialization error with invalid character</title>
		<link>http://baleinoid.com/whaly/2011/08/xml-deserialization-invalid-character/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=xml-deserialization-invalid-character</link>
		<comments>http://baleinoid.com/whaly/2011/08/xml-deserialization-invalid-character/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 19:49:39 +0000</pubDate>
		<dc:creator>whaly</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Microsoft .NET]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://baleinoid.com/whaly/?p=193</guid>
		<description><![CDATA[Recently I had a strange error, I serialized a complex object and during the deserialization process I got : "Error : System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line X, position Y." It appears that we had a "\0" inside a string, something like "Hello\0World" ! and during a classic serialization, the character [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had a strange error, I serialized a complex object and during the deserialization process I got :<br />
"Error : System.Xml.XmlException: '.', hexadecimal value 0x00, is an invalid character. Line X, position Y."<br />
It appears that we had a "\0" inside a string, something like "Hello\0World" ! and during a classic serialization, the character was encoded in "&amp;#x0;"</p>
<p>With the help of Google I have found <a href="http://tjoe.wordpress.com/2007/08/23/xml-serialization-sorrows/" title="XML Serialization Sorrows">this post</a> (2007) with a way to have an happy deserialization <img src='http://baleinoid.com/whaly/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>You can use XmlTextReader instead of XmlReader, but with more research I have found that you can still use XmlReader with XmlReaderSettings and CheckCharacters set to false.</p>
<p>Here is an example :</p>
<pre class="brush: csharp; title: ; notranslate">
    public class MyObject
    {
        public string MyString { get; set; }
    }

    class Program
    {
        static void Main(string[] args)
        {

            XmlSerializerFactory fact = new XmlSerializerFactory();
            XmlSerializer ser = fact.CreateSerializer(typeof(MyObject));

            MyObject obj0 = new MyObject();
            obj0.MyString = &quot;Hello&#92;&#48;World&quot;;

            // Serialize the object
            StringWriter sw = new StringWriter();
            ser.Serialize(sw, obj0);
            string xml = sw.ToString();
            // We can check that in the xml a &#92;&#48; is transformed in &amp;#x0;
            Console.WriteLine(xml);

            // Classic use of XmlReader.Create
            StringReader sr1 = new StringReader(xml);
            XmlReader xr1 = XmlTextReader.Create(sr1); // xr1's type is XmlTextReaderImpl
            try
            {
                MyObject obj1 = (MyObject)ser.Deserialize(xr1);
                Console.WriteLine(&quot;XmlReader [CheckCharacters({0})] : Success : {1}&quot;, xr1.Settings.CheckCharacters, obj1.MyString);
                Console.WriteLine(obj1.MyString);
            }
            catch (Exception e)
            {
                Console.WriteLine(&quot;XmlReader [CheckCharacters({0})] : Error : {1}&quot;, xr1.Settings.CheckCharacters, e.InnerException);
            }

            // Using an XmlTextReader
            StringReader sr2 = new StringReader(xml);
            XmlTextReader xr2 = new XmlTextReader(sr2);
            // xr2.Settings is null
            MyObject obj2 = (MyObject)ser.Deserialize(xr2);
            Console.WriteLine(&quot;XmlTextReader : Success : {0}&quot;, obj2.MyString);

            // Using XmlReader with the good XmlReaderSettings
            StringReader sr3 = new StringReader(xml);
            XmlReaderSettings settings = new XmlReaderSettings();
            settings.CheckCharacters = false; // default value is true;
            XmlReader xr3 = XmlTextReader.Create(sr3, settings); // xr3.Settings.CheckCharacters is a read only and xr3's type is XmlTextReaderImpl
            MyObject obj3 = (MyObject)ser.Deserialize(xr3);
            Console.WriteLine(&quot;XmlReader [CheckCharacters({0})] : Success : {1}&quot;, xr3.Settings.CheckCharacters, obj3.MyString);
        }
    }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://baleinoid.com/whaly/2011/08/xml-deserialization-invalid-character/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Viewbox and Windows Phone 7</title>
		<link>http://baleinoid.com/whaly/2011/01/viewbox-and-windows-phone-7/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=viewbox-and-windows-phone-7</link>
		<comments>http://baleinoid.com/whaly/2011/01/viewbox-and-windows-phone-7/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 22:20:37 +0000</pubDate>
		<dc:creator>whaly</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://baleinoid.com/whaly/?p=187</guid>
		<description><![CDATA[Viewbox is not in the original WP7 because it's not in Silverlight 3. Viewbox is in Silverlight 4. Neil Rees extract the source for the ViewBox control from the November 2009 version of the Silverlight Toolkit. Now you can use the Viewbox control with the Windows Phone 7.]]></description>
			<content:encoded><![CDATA[<p>Viewbox is not in the original WP7 because it's not in Silverlight 3.<br />
Viewbox is in Silverlight 4.</p>
<p><a href="http://blogs.imeta.co.uk/nrees/archive/2010/06/29/viewbox-wrappanel-and-a-scalable-ui-for-windows-phone-7.aspx">Neil Rees extract the source for the ViewBox control from the November 2009 version of the Silverlight Toolkit.</a></p>
<p>Now you can use the Viewbox control with the Windows Phone 7.</p>
]]></content:encoded>
			<wfw:commentRss>http://baleinoid.com/whaly/2011/01/viewbox-and-windows-phone-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Screen Resolution</title>
		<link>http://baleinoid.com/whaly/2011/01/screen-resolution/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=screen-resolution</link>
		<comments>http://baleinoid.com/whaly/2011/01/screen-resolution/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 13:10:13 +0000</pubDate>
		<dc:creator>whaly</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://baleinoid.com/whaly/?p=185</guid>
		<description><![CDATA[Quad HDTV : 3840 x 2160 WUXGA : 1920 x 1200 : Monitor at home Full HD : 1920 × 1080 WSXGA+ : 1680 x 1050 : Monitor at work HD Ready : 1280 × 720 SVGA : 1024 x 768 : iPad WVGA : 800 x 480 : Windows Phone 7 ????????? : 960 [...]]]></description>
			<content:encoded><![CDATA[<p><code></p>
<ul>
<li>Quad HDTV : 3840 x 2160</li>
<li>WUXGA     : 1920 x 1200 : Monitor at home</li>
<li>Full HD   : 1920 × 1080</li>
<li>WSXGA+    : 1680 x 1050 : Monitor at work</li>
<li>HD Ready  : 1280 × 720</li>
<li>SVGA      : 1024 x 768  : iPad</li>
<li>WVGA      :  800 x 480  : Windows Phone 7
<li>????????? :  960 x 640  : iPhone 4</li>
<li>HVGA      :  480 x 320  : iPhone 1, 3G, 3GS</li>
</ul>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://baleinoid.com/whaly/2011/01/screen-resolution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TortoiseGit + Dropbox, my personnal SCM combo under Windows</title>
		<link>http://baleinoid.com/whaly/2010/09/tortoisegit-dropbox-my-personnal-scm-combo-under-windows/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tortoisegit-dropbox-my-personnal-scm-combo-under-windows</link>
		<comments>http://baleinoid.com/whaly/2010/09/tortoisegit-dropbox-my-personnal-scm-combo-under-windows/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 19:01:42 +0000</pubDate>
		<dc:creator>whaly</dc:creator>
				<category><![CDATA[SCM]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[Dropbox]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Scm]]></category>
		<category><![CDATA[Sync]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://baleinoid.com/whaly/?p=176</guid>
		<description><![CDATA[Why Git ? Because I followed the early history in 2005 and I liked the design Why now ? Because I am under Windows and I feel that the windows port is ready for my personnal use with TortoiseGit. Where is my repository ? Just on my local drive, but if you want to opensource [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Why <a href="http://git-scm.com/">Git</a> ?</strong><br />
Because I followed the <a href="http://en.wikipedia.org/wiki/Git_(software)">early history</a> in 2005 and I liked the design <img src='http://baleinoid.com/whaly/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Why now ?</strong><br />
Because I am under Windows and I feel that the windows port is ready for my personnal use with <a href="http://code.google.com/p/tortoisegit/">TortoiseGit</a>.</p>
<p><strong>Where is my repository ?</strong><br />
Just on my local drive, but if you want to opensource your project I suggest you to go on <a href="http://github.com">GitHub</a>.</p>
<p><strong>How to backup and get my source from an another computer ?</strong><br />
<a href="http://www.dropbox.com/referrals/NTgwOTYyOQ">Dropbox</a> ! because I already use Dropbox to sync my files online and across my computers automatically and it works very well.<br />
If you use my <a href="http://www.dropbox.com/referrals/NTgwOTYyOQ">referral link for Dropbox</a>, you will have +250 Mo with your 2 Go free account. (and me too)</p>
<p>Finally, if the project is not a <a href="http://en.wikipedia.org/wiki/Vaporware">Vaporware</a>, you can always move your repository on <a href="http://github.com">GitHub</a> or somewhere else.</p>
<p>Go and try <a href="http://code.google.com/p/tortoisegit/">TortoiseGit</a> with <a href="http://www.dropbox.com/referrals/NTgwOTYyOQ">Dropbox</a></p>
]]></content:encoded>
			<wfw:commentRss>http://baleinoid.com/whaly/2010/09/tortoisegit-dropbox-my-personnal-scm-combo-under-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error 415 and WCF Compatibility between .Net 2.0 and 3.5</title>
		<link>http://baleinoid.com/whaly/2010/03/error-415-and-wcf-compatibility-between-net-2-0-and-3-5/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=error-415-and-wcf-compatibility-between-net-2-0-and-3-5</link>
		<comments>http://baleinoid.com/whaly/2010/03/error-415-and-wcf-compatibility-between-net-2-0-and-3-5/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 20:19:26 +0000</pubDate>
		<dc:creator>whaly</dc:creator>
				<category><![CDATA[Microsoft .NET]]></category>
		<category><![CDATA[binding]]></category>
		<category><![CDATA[Config]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[wcf]]></category>

		<guid isPermaLink="false">http://baleinoid.com/whaly/?p=157</guid>
		<description><![CDATA[If you try to call a 3.5 WCF Service with the framework 2.0 and WCF 3.0, you will have an error 415 : Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8' 'text/xml' is the content type for SOAP 1.1 while 'application/soap+xml' is the content type for [...]]]></description>
			<content:encoded><![CDATA[<p>If you try to call a 3.5 WCF Service with the framework 2.0 and WCF 3.0, you will have an error 415 :</p>
<blockquote><p>Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8'</p></blockquote>
<p>'text/xml' is the content type for SOAP 1.1 while 'application/soap+xml' is the content type for SOAP 1.2 and your client WCF 3.0 use SOAP 1.1 while the service with WCF 3.5 use SOAP 1.2.</p>
<p>Here is the solution that worked for me. If you have access to the service config, you just have to change the binding to use SOAP 1.1 :</p>
<p>Add a new custom binding in the 'bindings' section </p>
<pre class="brush: xml; light: true; title: ; notranslate">
      &lt;customBinding&gt;
        &lt;binding name=&quot;Soap11HttpBinding&quot;&gt;
          &lt;textMessageEncoding messageVersion=&quot;Soap11&quot; /&gt;
          &lt;httpTransport /&gt;
        &lt;/binding&gt;
      &lt;/customBinding&gt;
</pre>
<p>and don't forget to update your endpoint with the new binding :</p>
<pre class="brush: xml; light: true; title: ; notranslate">
    &lt;endpoint ...
        binding=&quot;customBinding&quot;
        bindingConfiguration=&quot;Soap11HttpBinding&quot;&gt;
        ...
    &lt;/endpoint&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://baleinoid.com/whaly/2010/03/error-415-and-wcf-compatibility-between-net-2-0-and-3-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to remove Diacritics in .net C#</title>
		<link>http://baleinoid.com/whaly/2010/01/how-to-remove-diacritics-in-net-c/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-remove-diacritics-in-net-c</link>
		<comments>http://baleinoid.com/whaly/2010/01/how-to-remove-diacritics-in-net-c/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 18:36:13 +0000</pubDate>
		<dc:creator>whaly</dc:creator>
				<category><![CDATA[Microsoft .NET]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[diacritics]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://baleinoid.com/whaly/?p=145</guid>
		<description><![CDATA[If you need to remove diacritics from a string you can : [Bad] do a lot's of replace like repeat for ÀÁÂÃÄâãäàáÈÉÊËêëèéÌÍÎÏîïìíÒÓÔÖôõöòóÙÚÛÜûüùúÝýÑñç and maybe miss some exotic chars or the Õ in this list ! [Good] or you can use this function]]></description>
			<content:encoded><![CDATA[<p>If you need to remove diacritics from a string you can :</p>
<ul>
<li>[Bad] do a lot's of replace like <img src='http://baleinoid.com/whaly/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </li>
</ul>
<pre class="brush: csharp; light: true; title: ; notranslate">inputString = inputString.Replace('À', 'A');</pre>
<p>repeat for ÀÁÂÃÄâãäàáÈÉÊËêëèéÌÍÎÏîïìíÒÓÔÖôõöòóÙÚÛÜûüùúÝýÑñç and maybe miss some exotic chars or the Õ in this list !</p>
<ul>
<li>[Good] or you can use this function <img src='http://baleinoid.com/whaly/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
</ul>
<pre class="brush: csharp; light: true; title: ; notranslate">
	public static string RemoveDiacritics(string inputString)
	{
		//!\\ Warning 'œ' will be replaced with a 'o' not an 'oe'
		String normalizedString = inputString.Normalize(NormalizationForm.FormD);
		StringBuilder stringBuilder = new StringBuilder();
		for (int i = 0; i &lt; normalizedString.Length; i++)
		{
			Char c = normalizedString[i];
			if (System.Globalization.CharUnicodeInfo.GetUnicodeCategory(c) != System.Globalization.UnicodeCategory.NonSpacingMark)
				stringBuilder.Append(c);
		}
		return stringBuilder.ToString();
	}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://baleinoid.com/whaly/2010/01/how-to-remove-diacritics-in-net-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SEO: Subfolders or Subdomains</title>
		<link>http://baleinoid.com/whaly/2009/11/seo-subfolders-or-subdomains/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=seo-subfolders-or-subdomains</link>
		<comments>http://baleinoid.com/whaly/2009/11/seo-subfolders-or-subdomains/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 17:23:33 +0000</pubDate>
		<dc:creator>whaly</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[rank]]></category>
		<category><![CDATA[subdomain]]></category>
		<category><![CDATA[subfolder]]></category>

		<guid isPermaLink="false">http://baleinoid.com/whaly/?p=112</guid>
		<description><![CDATA[I recently moved my blogs from subdomains and multiple domain to one domain with subfolders, here are articles on the subject from Chewy's Blog and Search Engine Journal ... search engine view subdomain site as a different site so the work you have done on the sub domain does not directly affect the parent domain [...]]]></description>
			<content:encoded><![CDATA[<p>I recently moved my blogs from subdomains and multiple domain to one domain with subfolders, here are articles on the subject from <a href="http://verychewy.com/archive/2009/04/06/subfolders-vs-sub-domain-for-seo.aspx">Chewy's Blog</a> and <a href="http://www.searchenginejournal.com/subdomains-or-subfolders-which-are-better-for-seo/6849/">Search Engine Journal</a></p>
<blockquote><p>... search engine view subdomain site as a different site so the work you have done on the sub domain does not directly affect the parent domain as they are viewed as a separate entity.</p></blockquote>
<p>History, first I had my blog.baleinoid.fr and whaly.baleinoid.fr websites, I moved recently whaly.baleinoid.fr to wha.ly for the fun of the new domain <img src='http://baleinoid.com/whaly/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  now I moved again and I have <a href="http://baleinoid.com/journal/baleine">http://baleinoid.com/journal/baleine</a> and <a href="http://baleinoid.com/whaly">http://baleinoid.com/whaly</a></p>
<p>I checked the pro and cons and I choosed the subfolders path, because I don't have a lots of backlinks and it's easier to get a better search engine rank with one domain.</p>
<p>Subfolders Pro:</p>
<ul>
<li>to spread/share the rank of the domain</li>
</ul>
<p>Subdomains Pro:</p>
<ul>
<li>if you have different hosting server for your blog / forum / website</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://baleinoid.com/whaly/2009/11/seo-subfolders-or-subdomains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WCF WSDL SOAP binding: Rpc or Document, Encoded or Literal</title>
		<link>http://baleinoid.com/whaly/2009/10/wcf-wsdl-soap-binding-rpc-or-document-encoded-or-literal/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wcf-wsdl-soap-binding-rpc-or-document-encoded-or-literal</link>
		<comments>http://baleinoid.com/whaly/2009/10/wcf-wsdl-soap-binding-rpc-or-document-encoded-or-literal/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 19:38:02 +0000</pubDate>
		<dc:creator>whaly</dc:creator>
				<category><![CDATA[Microsoft .NET]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[document]]></category>
		<category><![CDATA[encoded]]></category>
		<category><![CDATA[literal]]></category>
		<category><![CDATA[rpc]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[wcf]]></category>
		<category><![CDATA[wsdl]]></category>

		<guid isPermaLink="false">http://baleinoid.com/whaly/?p=92</guid>
		<description><![CDATA[Yeah, my new WebService must be Rpc/Encoded. What ???? Hopefully this page from Ibm explain the different style/use in SOAP message. A WSDL document describes a Web service. A WSDL binding describes how the service is bound to a messaging protocol, particularly the SOAP messaging protocol. A WSDL SOAP binding can be either a Remote [...]]]></description>
			<content:encoded><![CDATA[<p>Yeah, my new WebService must be <strong>Rpc/Encoded</strong>. What ????</p>
<p>Hopefully this <a href="http://www.ibm.com/developerworks/webservices/library/ws-whichwsdl/">page</a> from Ibm explain the different style/use in SOAP message.</p>
<blockquote><p>A WSDL document describes a Web service. A WSDL binding describes how the service is bound to a messaging protocol, particularly the SOAP messaging protocol. A WSDL SOAP binding can be either a Remote Procedure Call (RPC) style binding or a document style binding. A SOAP binding can also have an encoded use or a literal use.</p></blockquote>
<p>Ok now I know that four style/use models:<br />
RPC/Encoded, RPC/literal, <del>Document/encoded</del> or Document/literal</p>
<p>But how do I do that in WCF C# ?? It's very easy, just use the [<a href="http://msdn.microsoft.com/en-us/library/system.servicemodel.xmlserializerformatattribute.aspx">XmlSerializerFormat</a>] attribute.</p>
<p>Here is a very very simple test to check the different result in the soap message:</p>
<p><strong>Interface of the Wcf service used :</strong></p>
<pre class="brush: csharp; light: true; title: ; notranslate">
using System.ServiceModel;

namespace WcfService1
{
    [ServiceContract]
    public interface IService1
    {
        [OperationContract]
        [XmlSerializerFormat(Style = OperationFormatStyle.Rpc, Use = OperationFormatUse.Encoded)]
        string TestRpcEncoded(int value);

        [OperationContract]
        [XmlSerializerFormat(Style = OperationFormatStyle.Rpc, Use = OperationFormatUse.Literal)]
        string TestRpcLiteral(int value);

        //[OperationContract]
        //[XmlSerializerFormat(Style = OperationFormatStyle.Document, Use = OperationFormatUse.Encoded)]
        //string TestDocumentEncoded(int value);

        [OperationContract]
        [XmlSerializerFormat(Style = OperationFormatStyle.Document, Use = OperationFormatUse.Literal)]
        string TestDocumentLiteral(int value);
    }
}
</pre>
<p><strong>Result captured on the network with fiddler:</strong></p>
<p><em>For clarity, I have removed:</p>
<ul>
<li>s:Envelope tag</li>
<li>xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"</li>
<li>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</li>
<li>xmlns:xsd="http://www.w3.org/2001/XMLSchema"</li>
<li>xmlns="http://tempuri.org/"</li>
</ul>
<p></em></p>
<p><strong>RPC / Encoded call</strong></p>
<pre class="brush: xml; light: true; title: ; notranslate">
&lt;!-- Request --&gt;
&lt;s:Body s:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;
  &lt;q1:TestRpcEncoded&gt;
    &lt;value xsi:type=&quot;xsd:int&quot;&gt;42&lt;/value&gt;
  &lt;/q1:TestRpcEncoded&gt;
&lt;/s:Body&gt;

&lt;!-- Response --&gt;
&lt;s:Body s:encodingStyle=&quot;http://schemas.xmlsoap.org/soap/encoding/&quot;&gt;
  &lt;q1:TestRpcEncodedResponse&gt;
    &lt;TestRpcEncodedResult xsi:type=&quot;xsd:string&quot;&gt;You entered: 42&lt;/TestRpcEncodedResult&gt;
  &lt;/q1:TestRpcEncodedResponse&gt;
&lt;/s:Body&gt;
</pre>
<p><strong>RPC / Literal call</strong></p>
<pre class="brush: xml; light: true; title: ; notranslate">
&lt;!-- Request --&gt;
&lt;s:Body&gt;
  &lt;TestRpcLiteral&gt;
    &lt;value xmlns=&quot;&quot;&gt;42&lt;/value&gt;
  &lt;/TestRpcLiteral&gt;
&lt;/s:Body&gt;

&lt;!-- Response --&gt;
&lt;s:Body&gt;
  &lt;TestRpcLiteralResponse&gt;
    &lt;TestRpcLiteralResult xmlns=&quot;&quot;&gt;You entered: 42&lt;/TestRpcLiteralResult&gt;
  &lt;/TestRpcLiteralResponse&gt;
&lt;/s:Body&gt;
</pre>
<p><strong>Document / Encoded call</strong><br />
If you add the TestDocumentEncoded you will get an InvalidOperationException.<br />
This combination is not supported.</p>
<p><strong>Document / Literal call</strong></p>
<pre class="brush: xml; light: true; title: ; notranslate">
&lt;!-- Request --&gt;
&lt;s:Body&gt;&lt;/code&gt;
  &lt;TestDocumentLiteral&gt;&lt;value&gt;42&lt;/value&gt;&lt;/TestDocumentLiteral&gt;
&lt;/s:Body&gt;

&lt;!-- Response --&gt;
&lt;s:Body&gt;
  &lt;TestDocumentLiteralResponse&gt;
    &lt;TestDocumentLiteralResult&gt;You entered: 42&lt;/TestDocumentLiteralResult&gt;
  &lt;/TestDocumentLiteralResponse&gt;
&lt;/s:Body&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://baleinoid.com/whaly/2009/10/wcf-wsdl-soap-binding-rpc-or-document-encoded-or-literal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WWW or NO-WWW ?</title>
		<link>http://baleinoid.com/whaly/2009/09/www-or-no-www/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=www-or-no-www</link>
		<comments>http://baleinoid.com/whaly/2009/09/www-or-no-www/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 19:18:53 +0000</pubDate>
		<dc:creator>whaly</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[Config]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[Redirect]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://baleinoid.com/whaly/?p=81</guid>
		<description><![CDATA[For my new domain "frederichusson.com" I used links without "www." like "http://frederichusson.com" mainly because I like when things are simple. Then I realized that maybe it was a mistake and maybe a "www." site can get a better ranking in search engine. Then I searched on this subject and came accross "www. is deprecated" and [...]]]></description>
			<content:encoded><![CDATA[<p>For my new domain "<a href="http://frederichusson.com">frederichusson.com</a>" I used links without "www." like "http://frederichusson.com" mainly because I like when things are simple.</p>
<p>Then I realized that maybe it was a mistake and maybe a "www." site can get a better ranking in search engine.<br />
Then I searched on this subject and came accross "<a href="http://no-www.org">www. is deprecated</a>" and a little after on an article at <a href="http://www.sitepoint.com/blogs/2008/02/19/www-or-no-www/">sitepoint.com</a></p>
<p>And so I decided to stay without "www." and to take some actions :</p>
<ol>
<li>Keep my current link without the www.</li>
<li>Add a .htaccess file to redirect (301) visitors from http://www.frederichusson.com to http://frederichusson.com (for help look at "<a href="http://no-www.org/faq.php">How can I become Class B?</a>")</li>
<li>Use the Google <a href="https://www.google.com/webmasters/tools/">Webmasters Tools</a> to configure my <a href="http://www.google.com/support/webmasters/bin/answer.py?answer=44231">favorite domain</a>.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://baleinoid.com/whaly/2009/09/www-or-no-www/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto test if and index exist in SQL Server</title>
		<link>http://baleinoid.com/whaly/2009/09/howto-test-if-and-index-exist-in-sql-server/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=howto-test-if-and-index-exist-in-sql-server</link>
		<comments>http://baleinoid.com/whaly/2009/09/howto-test-if-and-index-exist-in-sql-server/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 19:09:46 +0000</pubDate>
		<dc:creator>whaly</dc:creator>
				<category><![CDATA[SQL]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://baleinoid.com/whaly/?p=71</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<pre class="brush: sql; light: true; title: ; notranslate">
IF INDEXPROPERTY(OBJECT_ID('TableName'), 'IndexName', 'IndexID') IS NOT NULL
	PRINT 'Index is here'
ELSE
	PRINT 'Index not found'
</pre>
]]></content:encoded>
			<wfw:commentRss>http://baleinoid.com/whaly/2009/09/howto-test-if-and-index-exist-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: baleinoid.com @ 2012-02-06 02:15:41 -->
