<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: WCF POX, JSON and SOAP Coexist</title>
	<atom:link href="http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html</link>
	<description>programming, software &#38; problem solving</description>
	<lastBuildDate>Mon, 03 Oct 2011 12:19:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Thanh</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-17351</link>
		<dc:creator>Thanh</dc:creator>
		<pubDate>Tue, 07 Dec 2010 13:07:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-17351</guid>
		<description>I&#039;ve spent two days on WCF, JSON, and SOAP and never got it working until I found this article. Thanks for sharing this!</description>
		<content:encoded><![CDATA[<p>I&#8217;ve spent two days on WCF, JSON, and SOAP and never got it working until I found this article. Thanks for sharing this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-11955</link>
		<dc:creator>Ray</dc:creator>
		<pubDate>Sat, 02 Oct 2010 07:09:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-11955</guid>
		<description>Hi Chris, you will need to configure the endpoint with the binding that support https security, and the service behavior should specify the certificate. more details check out this msdn link. http://msdn.microsoft.com/en-us/library/ms729700.aspx</description>
		<content:encoded><![CDATA[<p>Hi Chris, you will need to configure the endpoint with the binding that support https security, and the service behavior should specify the certificate. more details check out this msdn link. <a href="http://msdn.microsoft.com/en-us/library/ms729700.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms729700.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris.A</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-11878</link>
		<dc:creator>Chris.A</dc:creator>
		<pubDate>Fri, 01 Oct 2010 14:10:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-11878</guid>
		<description>Hi, 
I have a question about this example. I tested it and it works great, but now, if I want to add a certificate to one of the end point, how Can I manage to do it ?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I have a question about this example. I tested it and it works great, but now, if I want to add a certificate to one of the end point, how Can I manage to do it ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Admin</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-7041</link>
		<dc:creator>Admin</dc:creator>
		<pubDate>Wed, 14 Jul 2010 21:27:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-7041</guid>
		<description>It should be the same way to handle the exceptions.
There is no difference at the code level( c# ), the difference is at the configuration level. e.g. which endpoint, binding do you use for talking to the webservice.</description>
		<content:encoded><![CDATA[<p>It should be the same way to handle the exceptions.<br />
There is no difference at the code level( c# ), the difference is at the configuration level. e.g. which endpoint, binding do you use for talking to the webservice.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bunty</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-7039</link>
		<dc:creator>Bunty</dc:creator>
		<pubDate>Wed, 14 Jul 2010 18:42:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-7039</guid>
		<description>What is the best way to handle exceptions for both SOAP and REST together?

How do you differentiate between SOAP call and REST call to a specific operation? so that we can handle them appropriately and send proper response back such as custom fault for SOAP and some standard Http response back for REST type of request.

This is something very urgent and quick help would be really appreciated.

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>What is the best way to handle exceptions for both SOAP and REST together?</p>
<p>How do you differentiate between SOAP call and REST call to a specific operation? so that we can handle them appropriately and send proper response back such as custom fault for SOAP and some standard Http response back for REST type of request.</p>
<p>This is something very urgent and quick help would be really appreciated.</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-6780</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 09 Jul 2010 22:33:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-6780</guid>
		<description>you will need TestService.svc file for your service implementation and the baseAddress=&quot;http://localhost:81/TestService.svc&quot;
So the endpoints are
http://localhost:81/TestService.svc/soap
http://localhost:81/TestService.svc/pox
http://localhost:81/TestService.svc/json</description>
		<content:encoded><![CDATA[<p>you will need TestService.svc file for your service implementation and the baseAddress=&#8221;http://localhost:81/TestService.svc&#8221;<br />
So the endpoints are<br />
<a href="http://localhost:81/TestService.svc/soap" rel="nofollow">http://localhost:81/TestService.svc/soap</a><br />
<a href="http://localhost:81/TestService.svc/pox" rel="nofollow">http://localhost:81/TestService.svc/pox</a><br />
<a href="http://localhost:81/TestService.svc/json" rel="nofollow">http://localhost:81/TestService.svc/json</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bunty</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-6770</link>
		<dc:creator>Bunty</dc:creator>
		<pubDate>Fri, 09 Jul 2010 20:02:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-6770</guid>
		<description>What would be difference if I am looking to host this service with multiple endpoints in IIS? A quick answer to this would be really helpful.

Thanks in advance.</description>
		<content:encoded><![CDATA[<p>What would be difference if I am looking to host this service with multiple endpoints in IIS? A quick answer to this would be really helpful.</p>
<p>Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zaro</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-4819</link>
		<dc:creator>Zaro</dc:creator>
		<pubDate>Fri, 12 Mar 2010 08:48:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-4819</guid>
		<description>Great article, helps me with error: 
HTTP Error 405 Method not allowed - I&#039;ve changed the client proxy interface decorated methods with [System.ServiceModel.Web.WebGet].
To make example work for me, I&#039;ve changed the config paths:
/I&#039;ve received error like: has zero application (non-infrastructure) endpoints./
from: /service config/

to

and: /client config/
&lt;endpoint address=&quot;http://localhost:81/TestService/soap&quot; 
to
&lt;endpoint address=&quot;http://localhost:81/TestService.svc/soap&quot; 

Thanks for the post!</description>
		<content:encoded><![CDATA[<p>Great article, helps me with error:<br />
HTTP Error 405 Method not allowed &#8211; I&#8217;ve changed the client proxy interface decorated methods with [System.ServiceModel.Web.WebGet].<br />
To make example work for me, I&#8217;ve changed the config paths:<br />
/I&#8217;ve received error like: has zero application (non-infrastructure) endpoints./<br />
from: /service config/</p>
<p>to</p>
<p>and: /client config/<br />
&lt;endpoint address=&quot;<a href="http://localhost:81/TestService/soap&#038;quot" rel="nofollow">http://localhost:81/TestService/soap&#038;quot</a>;<br />
to<br />
&lt;endpoint address=&quot;<a href="http://localhost:81/TestService.svc/soap&#038;quot" rel="nofollow">http://localhost:81/TestService.svc/soap&#038;quot</a>; </p>
<p>Thanks for the post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Web Design, Manchester</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-4661</link>
		<dc:creator>Web Design, Manchester</dc:creator>
		<pubDate>Sun, 28 Feb 2010 09:14:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-4661</guid>
		<description>Great article - keep them coming please</description>
		<content:encoded><![CDATA[<p>Great article &#8211; keep them coming please</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Database Consultant</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-4152</link>
		<dc:creator>Database Consultant</dc:creator>
		<pubDate>Thu, 31 Dec 2009 11:15:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-4152</guid>
		<description>Very nice post.  WCF is pretty versatile.  I&#039;ve been able to get SOAP and REST working together nicely now.</description>
		<content:encoded><![CDATA[<p>Very nice post.  WCF is pretty versatile.  I&#8217;ve been able to get SOAP and REST working together nicely now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joan</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-3449</link>
		<dc:creator>Joan</dc:creator>
		<pubDate>Mon, 09 Nov 2009 10:53:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-3449</guid>
		<description>Thanks that helped to understand a bit more.

Finally I got the array doing this eventhough I don&#039;t really get why should work this way . . .

 var jsonstring = xmlHttp.responseText;
 var comboitem = eval(&#039; (&#039; + jsonstring + &#039; ) &#039;);

$(&#039;#resp_DGO&#039;).empty();

$.each(comboitem.d, function(i) {                          $(&#039;#resp_DGO&#039;).append(&#039; &#039; + comboitem.d[i].Name + &#039;&#039;);
})

Thanks for the great post!</description>
		<content:encoded><![CDATA[<p>Thanks that helped to understand a bit more.</p>
<p>Finally I got the array doing this eventhough I don&#8217;t really get why should work this way . . .</p>
<p> var jsonstring = xmlHttp.responseText;<br />
 var comboitem = eval(&#8216; (&#8216; + jsonstring + &#8216; ) &#8216;);</p>
<p>$(&#8216;#resp_DGO&#8217;).empty();</p>
<p>$.each(comboitem.d, function(i) {                          $(&#8216;#resp_DGO&#8217;).append(&#8216; &#8216; + comboitem.d[i].Name + &#8221;);<br />
})</p>
<p>Thanks for the great post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-3425</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 06 Nov 2009 20:00:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-3425</guid>
		<description>@Joan, 
The &quot;d&quot; is an array with one element
try this 
&lt;code&gt;
var result = {”d”:[{&quot;__type&quot;:&quot;ComboItem&quot;,&quot;Id&quot;:&quot;ECL&quot;,&quot;Name&quot;:&quot;Es-----ro&quot;}]};
alert(result.d[0].Id);
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>@Joan,<br />
The &#8220;d&#8221; is an array with one element<br />
try this </p>
<div class="codesnip-container" >var result = {”d”:[{"__type":"ComboItem","Id":"ECL","Name":"Es-----ro"}]};<br />
alert(result.d[0].Id);</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joan</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-3414</link>
		<dc:creator>Joan</dc:creator>
		<pubDate>Fri, 06 Nov 2009 12:58:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-3414</guid>
		<description>Sorry but I am stucked in trying to get the info out of this data:

{&quot;d&quot;:[{&quot;__type&quot;:&quot;ComboItem:http:\/\/schemas.---------------\/2009\/07\/30\/ComboItem&quot;,&quot;Id&quot;:&quot;ECL&quot;,&quot;Name&quot;:&quot;Es-----ro&quot;}]}

what should I use in the javascript to get my ComboItem.id and .Name fullfiled with values.

Thanks a lot!</description>
		<content:encoded><![CDATA[<p>Sorry but I am stucked in trying to get the info out of this data:</p>
<p>{&#8220;d&#8221;:[{"__type":"ComboItem:http:\/\/schemas.---------------\/2009\/07\/30\/ComboItem","Id":"ECL","Name":"Es-----ro"}]}</p>
<p>what should I use in the javascript to get my ComboItem.id and .Name fullfiled with values.</p>
<p>Thanks a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-2093</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 21 Jul 2009 23:44:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-2093</guid>
		<description>Hi Dave, I think what AllanC wants to do is to make the url a lot more nicer. In your case, if UriTemplated, it could look like
&lt;code&gt;../RecordMetric/1/123/40&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hi Dave, I think what AllanC wants to do is to make the url a lot more nicer. In your case, if UriTemplated, it could look like</p>
<div class="codesnip-container" >../RecordMetric/1/123/40</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-2091</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Tue, 21 Jul 2009 15:32:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-2091</guid>
		<description>Wow it really killed my URL... let me try that again:

&lt;code&gt;
mysever:someportnumber/service/RecordMetric?learnerId=1&amp;metricId=123&amp;value=40

&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Wow it really killed my URL&#8230; let me try that again:</p>
<div class="codesnip-container" >mysever:someportnumber/service/RecordMetric?learnerId=1&amp;metricId=123&amp;value=40</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-2090</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Tue, 21 Jul 2009 15:28:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-2090</guid>
		<description>You shouldn&#039;t need UriTemplate. I was trying to use it to format a query string but all i need to do was this:

&lt;code&gt;
[OperationContract]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest,
           Method = &quot;GET&quot;,
           RequestFormat = WebMessageFormat.Json,
           ResponseFormat = WebMessageFormat.Json)]
        Result RecordMetric(int learnerId, string metricId, decimal value);

&lt;/code&gt;

I can then call my service like this:

http://myserver:someport/service/RecordMetric?learnerId=1&amp;metricId=123&amp;value=40</description>
		<content:encoded><![CDATA[<p>You shouldn&#8217;t need UriTemplate. I was trying to use it to format a query string but all i need to do was this:</p>
<div class="codesnip-container" >[OperationContract]<br />
        [WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest,<br />
           Method = "GET",<br />
           RequestFormat = WebMessageFormat.Json,<br />
           ResponseFormat = WebMessageFormat.Json)]<br />
        Result RecordMetric(int learnerId, string metricId, decimal value);</div>
<p>I can then call my service like this:</p>
<p><a href="http://myserver:someport/service/RecordMetric?learnerId=1&#038;metricId=123&#038;value=40" rel="nofollow">http://myserver:someport/service/RecordMetric?learnerId=1&#038;metricId=123&#038;value=40</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AllanC</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-2070</link>
		<dc:creator>AllanC</dc:creator>
		<pubDate>Wed, 08 Jul 2009 23:17:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-2070</guid>
		<description>Thanks! This gave me enough pieces to get my SOAP and REST working together. Too bad that you cannot use UriTemplate and JSON (web scripting) together (it violates some WCF constraint).</description>
		<content:encoded><![CDATA[<p>Thanks! This gave me enough pieces to get my SOAP and REST working together. Too bad that you cannot use UriTemplate and JSON (web scripting) together (it violates some WCF constraint).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-1499</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Wed, 01 Apr 2009 02:23:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-1499</guid>
		<description>Thanks Cheeso and your reply, I copied the server&#039;s program.cs code onto the blog. My bad.

Content type negotiation is a very good idea, I&#039;ve seen an example of it from Codeplex.  However, one important issue with it is users are not able to modify http header field easily in the web browsers. In contrast, by expressing it at the endpoint level, you can easily control what kind of message you expect in the response by jsut altering the URL.</description>
		<content:encoded><![CDATA[<p>Thanks Cheeso and your reply, I copied the server&#8217;s program.cs code onto the blog. My bad.</p>
<p>Content type negotiation is a very good idea, I&#8217;ve seen an example of it from Codeplex.  However, one important issue with it is users are not able to modify http header field easily in the web browsers. In contrast, by expressing it at the endpoint level, you can easily control what kind of message you expect in the response by jsut altering the URL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cheeso</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-1495</link>
		<dc:creator>Cheeso</dc:creator>
		<pubDate>Tue, 31 Mar 2009 21:43:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-1495</guid>
		<description>Very interesting and useful. 

one problem? The client program.cs seems to be wrong - you actually show the server program.cs. 

Also, one question: what about content negotiation?  Rather than exposing different content types for the same resource at different URIs, why not have a single URI, and then allow the content type (json, pox, more?) to be negotiated at request time.  HTTP allows this. 

Of course if you are using WsTcpBinding then you don&#039;t have the content type negotiation of HTTP, but I suppose you could default to SOAP in that case.</description>
		<content:encoded><![CDATA[<p>Very interesting and useful. </p>
<p>one problem? The client program.cs seems to be wrong &#8211; you actually show the server program.cs. </p>
<p>Also, one question: what about content negotiation?  Rather than exposing different content types for the same resource at different URIs, why not have a single URI, and then allow the content type (json, pox, more?) to be negotiated at request time.  HTTP allows this. </p>
<p>Of course if you are using WsTcpBinding then you don&#8217;t have the content type negotiation of HTTP, but I suppose you could default to SOAP in that case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nestor</title>
		<link>http://www.codemeit.com/wcf/wcf-restful-pox-json-and-soap-coexist.html/comment-page-1#comment-304</link>
		<dc:creator>Nestor</dc:creator>
		<pubDate>Tue, 20 Jan 2009 16:15:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.codemeit.com/?p=145#comment-304</guid>
		<description>Very nice post, self explanatory and easy to follow and understand.
Exactly what I was looking for about this possibility within WCF.

Thanks heaps, much appreciated.

Keep up your good posting.

Nestor.</description>
		<content:encoded><![CDATA[<p>Very nice post, self explanatory and easy to follow and understand.<br />
Exactly what I was looking for about this possibility within WCF.</p>
<p>Thanks heaps, much appreciated.</p>
<p>Keep up your good posting.</p>
<p>Nestor.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

