<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:dtvmedia="http://participatoryculture.org/RSSModules/dtv/1.0"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>J Mathews &#187; REST</title>
	<atom:link href="http://www.justinemathews.com/category/rest/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.justinemathews.com</link>
	<description>expertise in .Net technologies</description>
	<lastBuildDate>Tue, 17 Feb 2015 19:31:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1</generator>
	<!-- podcast_generator="podPress/8.5" -->
		<copyright>&#xA9; </copyright>
		<managingEditor>justinemathews@gmail.com ()</managingEditor>
		<webMaster>justinemathews@gmail.com</webMaster>
		<category></category>
		<itunes:keywords></itunes:keywords>
		<itunes:subtitle></itunes:subtitle>
		<itunes:summary>expertise in .Net technologies</itunes:summary>
		<itunes:author></itunes:author>
		<itunes:category text="Society &amp; Culture"/>
		<itunes:owner>
			<itunes:name></itunes:name>
			<itunes:email>justinemathews@gmail.com</itunes:email>
		</itunes:owner>
		<itunes:block>No</itunes:block>
		<itunes:explicit>no</itunes:explicit>
		<itunes:image href="http://www.justinemathews.com/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<image>
			<url>http://www.justinemathews.com/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
			<title>J Mathews</title>
			<link>http://www.justinemathews.com</link>
			<width>144</width>
			<height>144</height>
		</image>
	<item>
		<title>REST Service with WCF &#8211; Testing with Fiddler</title>
		<link>http://www.justinemathews.com/2008/06/rest-service-with-wcf-testing-with-fiddler/</link>
		<comments>http://www.justinemathews.com/2008/06/rest-service-with-wcf-testing-with-fiddler/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 13:03:20 +0000</pubDate>
		<dc:creator><![CDATA[J Mathews,MCSD.Net]]></dc:creator>
				<category><![CDATA[REST]]></category>
		<category><![CDATA[REST;WCF]]></category>

		<guid isPermaLink="false">http://www.justinemathews.com/?p=25</guid>
		<description><![CDATA[<p>In this article I am explaining simple REST service which can accept HTTP GET Request.In response to this request service return data in XML format.You could use return type as Json format as well.This can easily set with WCF interface attribute as&#160; ResponseFormat = WebMessageFormat.Xml.And if you associate your return type&#160; with DataContract attribute System.Runtime.Serialization...
<p><a class="read-more" href="http://www.justinemathews.com/2008/06/rest-service-with-wcf-testing-with-fiddler/">Read More &#8594;</a></p>
<p>The post <a rel="nofollow" href="http://www.justinemathews.com/2008/06/rest-service-with-wcf-testing-with-fiddler/">REST Service with WCF &#8211; Testing with Fiddler</a> appeared first on <a rel="nofollow" href="http://www.justinemathews.com">J Mathews</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>In this article I am explaining simple REST service which can accept HTTP GET Request.In response to this request service return data in XML format.You could use return type as Json format as well.This can easily set with WCF interface attribute as&#160; ResponseFormat = WebMessageFormat.Xml.And if you associate your return type&#160; with DataContract attribute System.Runtime.Serialization does the serialization for you.</p>
<h3>1) Create Service Library Project</h3>
<blockquote><p>Choose service library Template project as shown below,</p>
</blockquote>
<p><a href="http://www.justinemathews.com/wp-content/uploads/2008/06/wcflib.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="WCFLib" src="http://www.justinemathews.com/wp-content/uploads/2008/06/wcflib-thumb.png" width="632" border="0" /></a></p>
<h3>2) Define your Contract and your data model</h3>
<blockquote><p>Reference System.ServiceModel.Web will enbable the HTTP requests, by attaching Webget Abbribute to your Contract and also define the Response format and&#160; UriTemplate which will be used for call the you method in the contract, which can be your method name as well.</p>
<p>Also define you data model class, attaching with Datacontract attribute will enable the runtime to serialize your object.</p>
</blockquote>
<p><a href="http://www.justinemathews.com/wp-content/uploads/2008/06/contractandservice.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="467" alt="ContractAndService" src="http://www.justinemathews.com/wp-content/uploads/2008/06/contractandservice-thumb.png" width="644" border="0" /></a></p>
<h3>3) Implement the contract method</h3>
<blockquote><p>It is just implement contract method in your service.Also attach the InstanceContextMode in the service behaviour attribute will you while hosting for example with console application.</p>
</blockquote>
<p><a href="http://www.justinemathews.com/wp-content/uploads/2008/06/service.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="383" alt="Service" src="http://www.justinemathews.com/wp-content/uploads/2008/06/service-thumb.png" width="613" border="0" /></a></p>
<blockquote><p>I have not done much change&#160; in the app config for the service yet, you can use default service&#160; configuration with webHttpBinding.</p>
</blockquote>
<h3>4) Hosting Your service with a Console application.</h3>
<blockquote><p>It time to Host your service, I am using simple hosting method which is useful debugging, Console application.</p>
<p>Reference the service library project and host the service as below.If you are running on Vista you might to run with administrator permission.</p>
</blockquote>
<p><a href="http://www.justinemathews.com/wp-content/uploads/2008/06/host.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="host" src="http://www.justinemathews.com/wp-content/uploads/2008/06/host-thumb.png" width="579" border="0" /></a></p>
<h5>5) Make HTTP Request Using Fiddler Tool</h5>
<p>Your service is running in this case at http://localhost:8732/RestService and you want to call HelloWorld method.You have used the UriTemplate as /Hello.</p>
<p>The URL for Get request is http://localhost:8732/RestService/Hello, use it the Fiddler tool as shown below.</p>
<p><a href="http://www.justinemathews.com/wp-content/uploads/2008/06/fiddler.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="482" alt="fiddler" src="http://www.justinemathews.com/wp-content/uploads/2008/06/fiddler-thumb.png" width="601" border="0" /></a></p>
<p>You can the out in the selected text.Similarly you can extend this and you can other HTTP methods POST,PUT.In that case you can use WebInvoke attribute for contract method.</p>
<p>The post <a rel="nofollow" href="http://www.justinemathews.com/2008/06/rest-service-with-wcf-testing-with-fiddler/">REST Service with WCF &#8211; Testing with Fiddler</a> appeared first on <a rel="nofollow" href="http://www.justinemathews.com">J Mathews</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.justinemathews.com/2008/06/rest-service-with-wcf-testing-with-fiddler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
