<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Asp.Net Team's Weblog &#187; WebServices</title>
	<atom:link href="http://aspnetteam.wordpress.com/category/webservices/feed/" rel="self" type="application/rss+xml" />
	<link>http://aspnetteam.wordpress.com</link>
	<description>Another ASP.NET Weblog</description>
	<lastBuildDate>Thu, 03 Sep 2009 11:54:33 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='aspnetteam.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/ea6345954410fcd98c45fab481df7cbf?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Asp.Net Team's Weblog &#187; WebServices</title>
		<link>http://aspnetteam.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://aspnetteam.wordpress.com/osd.xml" title="Asp.Net Team&#8217;s Weblog" />
		<item>
		<title>Get ready for the session variable user object!</title>
		<link>http://aspnetteam.wordpress.com/2008/09/25/get-ready-for-the-session-variable-user-object/</link>
		<comments>http://aspnetteam.wordpress.com/2008/09/25/get-ready-for-the-session-variable-user-object/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 22:13:49 +0000</pubDate>
		<dc:creator>wmsmith</dc:creator>
				<category><![CDATA[WebServices]]></category>

		<guid isPermaLink="false">http://aspnetteam.wordpress.com/?p=38</guid>
		<description><![CDATA[http://msdn.microsoft.com/en-us/library/aa479313.aspx 
Here is an interesting article, &#8220;How to Share Session State Between Classic ASP and ASP.NET&#8221;
May be important when we start consuming the web service.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetteam.wordpress.com&blog=4774049&post=38&subd=aspnetteam&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://msdn.microsoft.com/en-us/library/aa479313.aspx">http://msdn.microsoft.com/en-us/library/aa479313.aspx</a> </p>
<p>Here is an interesting article, &#8220;How to Share Session State Between Classic ASP and ASP.NET&#8221;</p>
<p>May be important when we start consuming the web service.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetteam.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetteam.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetteam.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetteam.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetteam.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetteam.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetteam.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetteam.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetteam.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetteam.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetteam.wordpress.com&blog=4774049&post=38&subd=aspnetteam&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://aspnetteam.wordpress.com/2008/09/25/get-ready-for-the-session-variable-user-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/125921b3e8d0bcd1058deb81570f46ba?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">wmsmith</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Web Services: How to Consume</title>
		<link>http://aspnetteam.wordpress.com/2008/09/16/using-web-services-how-to-consume/</link>
		<comments>http://aspnetteam.wordpress.com/2008/09/16/using-web-services-how-to-consume/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 17:54:21 +0000</pubDate>
		<dc:creator>Frank Adams</dc:creator>
				<category><![CDATA[WebServices]]></category>
		<category><![CDATA[Consume]]></category>
		<category><![CDATA[DataBind]]></category>
		<category><![CDATA[DataView]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://aspnetteam.wordpress.com/?p=34</guid>
		<description><![CDATA[Ever wonder how to consume a web service.  I'll tell you how. Read on. <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetteam.wordpress.com&blog=4774049&post=34&subd=aspnetteam&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">Consuming a web service is easier that creating one. All you have to do is create a reference and then add a couple of lines of code and you have the web service to use in your application. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">The way to add a web reference to your web service is to first figure out where the web service resides.<span>  </span>It can be a full web address or it can be a local folder.<span>  </span>Once you figure that out you need to create a reference to it. To do this:</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">Right click on the project and select add web reference. When you do this you are presented with a box &#8211; Add Web Reference. From here you will choose the correct link under Browse to: and select the web service you will use.<span>  </span>I chose local machine since I am working within an Intranet.<span>  </span>The service URL shows up. I just have to click it and the URL at the top auto fills with the URL of the web service. Then you choose add reference under the right window to add the reference to your application.<span>  </span>Visual Studio will ask you if you want to put it in its own folder or not. I like to keep my things separate so I choose to keep them separate.<span>  </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">Once you do that, all you have to do is add one of code to start using it in your application:</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:blue;">Protected</span><span style="font-size:12pt;"> <span style="color:blue;">Sub</span> Page_Load(<span style="color:blue;">ByVal</span> sender <span style="color:blue;">As</span> <span style="color:blue;">Object</span>, <span style="color:blue;">ByVal</span> e <span style="color:blue;">As</span> System.EventArgs) <span style="color:blue;">Handles</span> <span style="color:blue;">Me</span>.Load</span><span style="font-size:12pt;"></span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:blue;">Dim</span><span style="font-size:12pt;"> wcConvert <span style="color:blue;">As</span> <span style="color:blue;">New</span> foldername.Servicename()</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">When you create the web service it will be in a folder called App_WebReferences. Under that will be the folder name mentioned above. Under the folder is the service file. So you want to reference it by foldername.servicename().<span>  </span>That is it! You can start using it now. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">What I did was convert it to a DataView so I could extract the data out of the dataset I needed. In order to do this, it woul dbe best to convert the dataset (web service) to a dataview. You have more options with a dataview.<span>  </span>I found out through trial and error that you cannot set up a dataview as a web service.<span>  </span>It is not a recognized XML format apparently. <span> </span>So to convert you need to add this to your code: </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:blue;">Imports</span><span style="font-size:12pt;"> System.Data</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:blue;">Imports</span><span style="font-size:12pt;"> System.Data.DataView</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:blue;">Dim</span><span style="font-size:12pt;"> dv <span style="color:blue;">As</span> <span style="color:blue;">New</span> DataView</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;">dv = wcConvert.functionname().Tables(0).DefaultView</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">With the dataview you can now sort (dv.sort) and select distinct values </span><span style="font-size:12pt;"><span style="font-family:Times New Roman;">DDLcontrolname.DataSource = dv.ToTable(<span style="color:blue;">True</span>, <span style="color:#a31515;">&#8220;columnName&#8221;</span>).</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">With all the above in place you can now use the DataSource to bind to a control.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;">DDLcontrolname.DataTextField = <span style="color:#a31515;">&#8220;Name&#8221;</span></span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;">DDLcontrolname.DataValueField = <span style="color:#a31515;">&#8220;Name&#8221;</span></span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;">DDLcontrolname.DataBind()</span></span><span style="font-size:12pt;"><span style="font-family:Times New Roman;"> </span></span></p>
<p><span style="font-size:12pt;font-family:Arial;">That is all there is to it. Now I have to figure out how to implament caching so not to hit the web service every page refresh. Until next time, always remember, with great power comes great responsibility.</span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/aspnetteam.wordpress.com/34/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/aspnetteam.wordpress.com/34/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetteam.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetteam.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetteam.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetteam.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetteam.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetteam.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetteam.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetteam.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetteam.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetteam.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetteam.wordpress.com&blog=4774049&post=34&subd=aspnetteam&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://aspnetteam.wordpress.com/2008/09/16/using-web-services-how-to-consume/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e7de40145b3f1678a34b54c67d2c8e44?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Frank</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Web Services: How to Create</title>
		<link>http://aspnetteam.wordpress.com/2008/09/11/using-web-services-how-to-create/</link>
		<comments>http://aspnetteam.wordpress.com/2008/09/11/using-web-services-how-to-create/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 18:25:41 +0000</pubDate>
		<dc:creator>Frank Adams</dc:creator>
				<category><![CDATA[WebServices]]></category>
		<category><![CDATA[Connectionstring]]></category>
		<category><![CDATA[Dataset]]></category>
		<category><![CDATA[Dim]]></category>
		<category><![CDATA[Imports]]></category>

		<guid isPermaLink="false">http://aspnetteam.wordpress.com/?p=25</guid>
		<description><![CDATA[This post will go into how to create a web service using VS. 
 
The first thing that needs to be done is create a web site and choose ASP.NET Web Service from the Template window.  If you are thinking about using the web service as it is intended for, reusability, then you will want to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetteam.wordpress.com&blog=4774049&post=25&subd=aspnetteam&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">This post will go into how to create a web service using VS. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"><span> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">The first thing that needs to be done is create a web site and choose ASP.NET Web Service from the Template window.<span>  </span>If you are thinking about using the web service as it is intended for, reusability, then you will want to place it in a directory folder that will be accessible to all application that can use it on the intranet (although you can reference a web service by using a web address, we will not go into that). An example of a folder would be ‘WebServices’. This folder would hold all web service created. We will name this web service ‘getAllStationInfo’.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">Once you have your web site started you will see that the default page opens up and is ready for coding.<span>  </span>It has already imported the namespaces needed at the top and has a public class named Service.<span>  </span>We will be adding more namespaces to ours because of the nature of the service – database query.<span>  </span>It will look like the below: </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:#0000ff;">Imports</span><span style="font-size:12pt;"> System.Web</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:#0000ff;">Imports</span><span style="font-size:12pt;"> System.Web.Services</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:#0000ff;">Imports</span><span style="font-size:12pt;"> System.Web.Services.Protocols</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:#0000ff;">Imports</span><span style="font-size:12pt;"> System.Data.SqlClient</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:#0000ff;">Imports</span><span style="font-size:12pt;"> System.Data</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">It also has its first function called HelloWorld() for editing. All we are going to do this time is create a web method that can be consumed. Here is what it looks like at first:</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;">&lt;WebMethod()&gt; _</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;"><span>    </span><span style="color:#0000ff;">Public</span> <span style="color:#0000ff;">Function</span> HelloWorld() <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">String</span></span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;"><span>        </span><span style="color:#0000ff;">Return</span> <span style="color:#a31515;">&#8220;Hello World&#8221;</span></span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;"><span>    </span><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Function</span></span><span style="font-size:12pt;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">This is what a finished one looks like:</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><a name="OLE_LINK2"></a><a name="OLE_LINK1"><span><span style="font-size:12pt;"><span style="font-family:Times New Roman;">&lt;WebMethod()&gt; _</span></span></span></a> </p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;"><span>    </span><span style="color:#0000ff;">Public</span> <span style="color:#0000ff;">Function</span> getAllStationInfo() <span style="color:#0000ff;">As</span> DataSet</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;"><span>        </span><span style="color:#0000ff;">Dim</span> conn <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">New</span> SqlConnection(ConfigurationManager.ConnectionStrings(<span style="color:#a31515;">&#8220;DatabaseNameHere&#8221;</span>).ConnectionString)</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;"><span>        </span>conn.Open()</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;"><span>        </span><span style="color:#0000ff;">Dim</span> adapter <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">New</span> SqlDataAdapter(<span style="color:#a31515;">&#8220;Select statement&#8221;</span>, conn)</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;"><span>        </span><span style="color:#0000ff;">Dim</span> ds <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">New</span> DataSet()</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;"><span>        </span>adapter.Fill(ds, <span style="color:#a31515;">&#8220;name of function here&#8221;</span>)</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;"><span>        </span>conn.Close()</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;"><span>        </span><span style="color:#0000ff;">Return</span> ds</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;"><span>    </span><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Function</span></span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;color:#0000ff;"><span style="font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">You will notice that the SqlConnection is referencing a named connection string:</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:#0000ff;">Dim</span><span style="font-size:12pt;"> conn <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">New</span> SqlConnection(ConfigurationManager.ConnectionStrings(<span style="color:#a31515;">&#8220;DatabaseNameHere&#8221;</span>).ConnectionString)</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">This is referencing code from the web.config file.<span>  </span>The connection string there looks like so:</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:#0000ff;">……&lt;</span><span style="font-size:12pt;color:#a31515;">configuration</span><span style="font-size:12pt;color:#0000ff;">&gt;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:#0000ff;"><span>            </span>&lt;</span><span style="font-size:12pt;color:#a31515;">appSettings</span><span style="font-size:12pt;color:#0000ff;">/&gt;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:#0000ff;"><span>            </span>&lt;</span><span style="font-size:12pt;color:#a31515;">connectionStrings</span><span style="font-size:12pt;color:#0000ff;">&gt;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:#0000ff;"><span>                        </span>&lt;</span><span style="font-size:12pt;color:#a31515;">add</span><span style="font-size:12pt;color:#0000ff;"> </span><span style="font-size:12pt;color:#ff0000;">name</span><span style="font-size:12pt;color:#0000ff;">=</span><span style="font-size:12pt;">&#8220;<span style="color:#0000ff;">databaseName</span>&#8220;<span style="color:#0000ff;"> </span><span style="color:#ff0000;">connectionString</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">server=Servername&#8217;; Database=databaseName; uid=; pwd=;</span>&#8220;<span style="color:#0000ff;"> </span><span style="color:#ff0000;">providerName</span><span style="color:#0000ff;">=</span>&#8220;<span style="color:#0000ff;">System.Data.SqlClient</span>&#8220;<span style="color:#0000ff;">/&gt;</span></span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:#0000ff;"><span>            </span>&lt;/</span><span style="font-size:12pt;color:#a31515;">connectionStrings</span><span style="font-size:12pt;color:#0000ff;">&gt;</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:12pt;color:#0000ff;"><span>            </span>&lt;</span><span style="font-size:12pt;color:#a31515;">system.web</span><span style="font-size:12pt;color:#0000ff;">&gt;……</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;color:#0000ff;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">Now to get back to the web service. You will notice that right before the function there is a line: </span><span style="font-family:Times New Roman;"><span style="font-size:12pt;">&lt;WebMethod()&gt; _</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">This attribute enables the web service method to communicate with we appications located at local or remote locations. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">Something I failed to mention previously is that there is a web service attribute that can be set. The syntax is like so: </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;"><span style="font-family:Times New Roman;">&lt;WebService(Namespace:=<span style="color:#a31515;">&#8220;http://servername&#8221;</span>)&gt; _</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">This will provide additional information about the webservices, such as information about the functionality of the web service itself. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">All we are doing in this web service is creating a dataset to be consumed by anyone who wants to use it. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;">To test the web service, all you have to do is right click on the service.asmx file and view in browser. If it works you will see the function name that you can click and then the next page allows you to invoke the function. The reuslt of clicking on invoke is a new page filled with XML data. If you see this, you have accomplished creatign a web service. <span> </span>You can create a web service to do anything you want it to do.<span>  </span>Just keep in mind that the key is reusablity. </span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:12pt;font-family:Arial;"> </span></p>
<p><span style="font-size:12pt;font-family:Arial;">In the next post, we will look at how to actually consume a web service in an appication and how to display the results of a web service.</span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/aspnetteam.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/aspnetteam.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetteam.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetteam.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetteam.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetteam.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetteam.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetteam.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetteam.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetteam.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetteam.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetteam.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetteam.wordpress.com&blog=4774049&post=25&subd=aspnetteam&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://aspnetteam.wordpress.com/2008/09/11/using-web-services-how-to-create/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e7de40145b3f1678a34b54c67d2c8e44?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Frank</media:title>
		</media:content>
	</item>
		<item>
		<title>Web Service Request:::::::::::::::::</title>
		<link>http://aspnetteam.wordpress.com/2008/09/09/web-service-request/</link>
		<comments>http://aspnetteam.wordpress.com/2008/09/09/web-service-request/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 18:27:30 +0000</pubDate>
		<dc:creator>wmsmith</dc:creator>
				<category><![CDATA[WebServices]]></category>

		<guid isPermaLink="false">http://aspnetteam.wordpress.com/?p=22</guid>
		<description><![CDATA[The webservice could also include mission information.
Aton,Defense Readiness, etc.,etc.
Methods would include:
getAllMissions(), getMissionFullName(&#8216;Aton&#8217;), getAcronym()
That would be a nice addition to the service.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetteam.wordpress.com&blog=4774049&post=22&subd=aspnetteam&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The webservice could also include mission information.</p>
<p>Aton,Defense Readiness, etc.,etc.</p>
<p>Methods would include:</p>
<p>getAllMissions(), getMissionFullName(&#8216;Aton&#8217;), getAcronym()</p>
<p>That would be a nice addition to the service.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/aspnetteam.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/aspnetteam.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetteam.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetteam.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetteam.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetteam.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetteam.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetteam.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetteam.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetteam.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetteam.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetteam.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetteam.wordpress.com&blog=4774049&post=22&subd=aspnetteam&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://aspnetteam.wordpress.com/2008/09/09/web-service-request/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/125921b3e8d0bcd1058deb81570f46ba?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">wmsmith</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Web Services: Best Practices</title>
		<link>http://aspnetteam.wordpress.com/2008/09/09/using-web-services-best-practices/</link>
		<comments>http://aspnetteam.wordpress.com/2008/09/09/using-web-services-best-practices/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 14:54:49 +0000</pubDate>
		<dc:creator>Frank Adams</dc:creator>
				<category><![CDATA[WebServices]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://aspnetteam.wordpress.com/?p=17</guid>
		<description><![CDATA[

Ensure that the connection between web service and web server is asynchronous. This means that the web application does not need to stop its processes until the web server responds to its request.


Minimize the number of requests that an application needs to send to a web server to consume a web service. Send as much [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetteam.wordpress.com&blog=4774049&post=17&subd=aspnetteam&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><ul>
<li>
<p style="margin:0;"><strong>Ensure</strong> that the connection between web service and web server is asynchronous. This means that the web application does not need to stop its processes until the web server responds to its request.</p>
</li>
<li>
<p style="margin:0;"><strong>Minimize</strong> the number of requests that an application needs to send to a web server to consume a web service. Send as much information as can be sent. This will ensure network traffic is cut to a minimum by decreasing the number of requests.</p>
</li>
<li>
<p style="margin:0;"><strong>Ensure</strong> the web service is created using the concepts of object oriented programming. Create once use many times. This also should create a standard of information used.</p>
</li>
<li>
<p style="margin:0;"><strong>Minimize</strong> time of response by using cache. This will ensure that every time the web service is called upon, the web service is not run, the cache will be used. You can set the time in which the cache can be refreshed so to catch any updates that may happen.</p>
</li>
</ul>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/aspnetteam.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/aspnetteam.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aspnetteam.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/aspnetteam.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/aspnetteam.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/aspnetteam.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/aspnetteam.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/aspnetteam.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/aspnetteam.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/aspnetteam.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/aspnetteam.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/aspnetteam.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=aspnetteam.wordpress.com&blog=4774049&post=17&subd=aspnetteam&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://aspnetteam.wordpress.com/2008/09/09/using-web-services-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e7de40145b3f1678a34b54c67d2c8e44?s=96&#38;d=wavatar&#38;r=G" medium="image">
			<media:title type="html">Frank</media:title>
		</media:content>
	</item>
	</channel>
</rss>