<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Merit Matters Blog - Web Services</title>
    <link>http://meritsolutions.com/meritmatters/</link>
    <description>Microsoft Dynamics News that Matters</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.1.2 - http://www.s9y.org/</generator>
    <managingEditor>jrichards@meritsolutions.com</managingEditor>
<webMaster>jrichards@meritsolutions.com</webMaster>
<pubDate>Fri, 15 Aug 2008 10:10:47 GMT</pubDate>

    <image>
        <url>http://www.meritsolutions.com/images/rss_feed.JPEG</url>
        <title>RSS: Merit Matters Blog - Web Services - Microsoft Dynamics News that Matters</title>
        <link>http://meritsolutions.com/meritmatters/</link>
        <width>16</width>
        <height>16</height>
    </image>

<item>
    <title>What is Service Oriented Architecture (SOA)?</title>
    <link>http://meritsolutions.com/meritmatters/index.php?/archives/108-What-is-Service-Oriented-Architecture-SOA.html</link>
            <category>Web Services</category>
    
    <comments>http://meritsolutions.com/meritmatters/index.php?/archives/108-What-is-Service-Oriented-Architecture-SOA.html#comments</comments>
    <wfw:comment>http://meritsolutions.com/meritmatters/wfwcomment.php?cid=108</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://meritsolutions.com/meritmatters/rss.php?version=2.0&amp;type=comments&amp;cid=108</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
    &lt;p&gt;Confused with term SOA? &lt;/p&gt;&lt;p&gt;I&#039;ll help you understand the basic principles that stand behind what we call a Service Oriented Architecture. If you just want a simple, one sentence explanation, here it comes: &lt;strong&gt;SOA is a new approach to building IT systems, where logic is decomposed into smaller, distinct units&lt;/strong&gt;. &lt;/p&gt;&lt;p&gt;Those units are called services. Seems like nothing new, but what makes SOA special is the set of design principles. Before we discuss the principles of SOA design, let just make it clear what really defines a service. &lt;/p&gt; &lt;p&gt;As you already know, &amp;quot;service&amp;quot; is a very widely used term. We use it in IT as well as in everyday life. For example, your favorite restaurant is a service. You come in, take a look at the menu, make an order and what you get is a (hopefully good) meal. Let&#039;s take a taxi as another example. When you take a cab, you expect it to take you from Point A to Point B - and you would certainly like to make it in a reasonable time. &lt;/p&gt;&lt;p&gt;Now, let&#039;s try to make some general conclusions about services: &lt;/p&gt;&lt;ol&gt;&lt;li&gt;In order to use a service, one must provide it with some parameters (in a restaurant, you must tell to a waiter what would you like to eat and drink; cab drivers must know where would you like to go). &lt;/li&gt;&lt;li&gt;Service users expect its state to be changed in some way (you enter a restaurant hungry, but you are fed up when you are done; before taking a cab, you are on one street and after it you might be in completely different part of a city). &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;So, you must know how to use a service and what result to expect. The same stands true for services in the IT world. When trying to build SOA, your services have to be designed in a certain fashion. &lt;/p&gt;&lt;p&gt;Here are the principles that have to be followed: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;em&gt;Service contracts&lt;/em&gt; - All services must adhere to some kind of communication agreement. In order to make services communicate, the messages that they exchange have to be described precisely, as well as arguments that each service requires. You won&#039;t get what you want in a restaurant in England if you speak Chinese. &lt;/li&gt;&lt;li&gt;&lt;em&gt;Loose coupling&lt;/em&gt; - Services should be as independent as possible (e.g. they should just retain an awareness of each other) without making tight connections that are hard to break if something has to be replaced or changed in the future. &lt;/li&gt;&lt;li&gt;&lt;em&gt;Abstraction and Autonomy&lt;/em&gt; - Services just give you what you need, not letting you see how is it accomplished. You just care about the interface. In our restaurant example, you don&#039;t really care how your meal gets prepared, you would just like to eat. Also remember that some recipes are secret! Furthermore, a restaurant is autonomous and has full control of what ingredients they use to prepare your meal. &lt;em&gt;&lt;/em&gt;&lt;/li&gt;&lt;li&gt;&lt;em&gt;Reusability&lt;/em&gt; - When we divide our business logic into services, we do it in such a way that enables us to use some of these parts in the future, without having to reinvent the wheel. Ideally, the purpose of reusability is to write a line of code just once - anyone else in the world won&#039;t have to write it again. &lt;/li&gt;&lt;li&gt;&lt;em&gt;Composability&lt;/em&gt; - We can form composite services, by assembling collections of them. Statelessness Services tend not to keep any kind of internal information that will affect the result of their work. Arguments that service users enter should be the only thing that matters. &lt;/li&gt;&lt;li&gt;&lt;em&gt;Discoverability&lt;/em&gt; - Once created, services should be descriptive and easily reachable. There should be a mechanism to inform all potential users (humans or other services), so that they can get the services automatically when need arises. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I hope now you have a global picture of what SOA tends to be. For further information, I suggest you start exploring various books that cover this material in detail.&lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 19 Aug 2008 06:10:00 -0400</pubDate>
    <guid isPermaLink="false">http://meritsolutions.com/meritmatters/index.php?/archives/108-guid.html</guid>
    
</item>
<item>
    <title>Some Free Web Services</title>
    <link>http://meritsolutions.com/meritmatters/index.php?/archives/106-Some-Free-Web-Services.html</link>
            <category>Web Services</category>
    
    <comments>http://meritsolutions.com/meritmatters/index.php?/archives/106-Some-Free-Web-Services.html#comments</comments>
    <wfw:comment>http://meritsolutions.com/meritmatters/wfwcomment.php?cid=106</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://meritsolutions.com/meritmatters/rss.php?version=2.0&amp;type=comments&amp;cid=106</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
    &lt;p&gt;There are many articles on how to write and deploy your own Web Service. Here, I will show you where you can find Web Services that other people have created and made public. &lt;/p&gt;&lt;p&gt;Many interesting Web Services that you can use free of charge can be found at: &lt;a onclick=&quot;javascript: pageTracker._trackPageview(&#039;/extlink/www.webservicex.net/&#039;);&quot;  href=&quot;http://www.webservicex.net/&quot;&gt;http://www.webservicex.net&lt;/a&gt; &lt;a onclick=&quot;javascript: pageTracker._trackPageview(&#039;/extlink/www.wsoogle.com/&#039;);&quot;  href=&quot;http://www.wsoogle.com/&quot;&gt;http://www.wsoogle.com&lt;/a&gt;. This may be particularly interesting when you are developing Web applications. For example, you would like to have some kind of currency conversion in your Web app. However, exchange rates are different every other day and you would certainly want to automate the process of their updating. One way to solve this problem is to use an existing Web service and don&#039;t think about the rates at all! A good example of what you might need is &lt;a onclick=&quot;javascript: pageTracker._trackPageview(&#039;/extlink/www.webservicex.net/CurrencyConvertor.asmx&#039;);&quot;  title=&quot;Currency Converter WS&quot; href=&quot;http://www.webservicex.net/CurrencyConvertor.asmx&quot;&gt;here&lt;/a&gt;. Just supply the service with two strings that represent currencies and you get back an exchange rate as a double! &lt;/p&gt;&lt;p&gt;Other services you may find interesting are different types of calculators, credit card checkers, translators, etc... These will certainly help you develop your application, no matter which tools and programming languages you use. However, be careful and note that all those Web Services are not under your control. If some change to their interface or implementation occurs, your application may change its behavior! In any case, there is no doubt that you will find some of them useful. You may also get an idea to build your own Web Service that many people would like to use. Good luck! &lt;/p&gt;  
    </content:encoded>

    <pubDate>Mon, 11 Aug 2008 10:02:00 -0400</pubDate>
    <guid isPermaLink="false">http://meritsolutions.com/meritmatters/index.php?/archives/106-guid.html</guid>
    
</item>
<item>
    <title>Windows Communication Foundation</title>
    <link>http://meritsolutions.com/meritmatters/index.php?/archives/103-Windows-Communication-Foundation.html</link>
            <category>Web Services</category>
    
    <comments>http://meritsolutions.com/meritmatters/index.php?/archives/103-Windows-Communication-Foundation.html#comments</comments>
    <wfw:comment>http://meritsolutions.com/meritmatters/wfwcomment.php?cid=103</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://meritsolutions.com/meritmatters/rss.php?version=2.0&amp;type=comments&amp;cid=103</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
    &lt;p&gt;.NET Framework 2.0 relies on several distributed programming technologies. Maybe you are already familiar with Web &amp;amp; Enterprise Services, .NET Remoting, WSE... All these technologies have some advantages and drawbacks that make them more or less suitable for performing certain tasks. &lt;/p&gt;&lt;p&gt;For example, when creating an application that is supposed to be distributed over the Internet, on different machines with different operating systems, Web Services are what we need, because they offer an elegant and unambiguous way for different kinds of machines to communicate. &lt;/p&gt;&lt;p&gt;If our distributed application is going to run in company LAN (or maybe even just on local machine), on computers that all run .NET Framework, interoperability is not really a problem, but we would like to optimize the communication and get the best possible performance. Here, .NET Remoting is the way to go. &lt;/p&gt;&lt;p&gt;However, there are situations when it is necessary to combine different technologies in order to accomplish a given task. Although this isn&#039;t impossible, it may be expensive, hard and tricky to develop and maintain such a system. As a response to such situations, .NET 3.0 offers (and .NET 3.5 improves) something called Windows Communication Foundation (or simply WCF). The basic idea behind WCF is to integrate all distributed technologies that existed in older versions of .NET framework and put them under one roof, so they can be used easily and in the same fashion together. &lt;/p&gt;&lt;p&gt;Furthermore, WCF is a natural foundation for applications that follow SOA (Service Oriented Architecure) principles. For example, the concept of service contract is depicted as an interface. You define and implement a service contract simply by creating and implementing an interface! If you would like to take a deeper look at WCF and its possibilities, &lt;a onclick=&quot;javascript: pageTracker._trackPageview(&#039;/extlink/msdn.microsoft.com/en-us/library/ms735119.aspx&#039;);&quot;  href=&quot;http://msdn.microsoft.com/en-us/library/ms735119.aspx&quot; target=&quot;_blank&quot;&gt;this MSDN page&lt;/a&gt; is a good place to start: Have fun! &lt;/p&gt;  
    </content:encoded>

    <pubDate>Fri, 01 Aug 2008 04:33:39 -0400</pubDate>
    <guid isPermaLink="false">http://meritsolutions.com/meritmatters/index.php?/archives/103-guid.html</guid>
    
</item>
<item>
    <title>Creating and using custom SOAP headers in Visual Studio 2005</title>
    <link>http://meritsolutions.com/meritmatters/index.php?/archives/101-Creating-and-using-custom-SOAP-headers-in-Visual-Studio-2005.html</link>
            <category>Web Services</category>
    
    <comments>http://meritsolutions.com/meritmatters/index.php?/archives/101-Creating-and-using-custom-SOAP-headers-in-Visual-Studio-2005.html#comments</comments>
    <wfw:comment>http://meritsolutions.com/meritmatters/wfwcomment.php?cid=101</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://meritsolutions.com/meritmatters/rss.php?version=2.0&amp;type=comments&amp;cid=101</wfw:commentRss>
    

    <author>nospam@example.com ()</author>
    <content:encoded>
    &lt;p&gt;Web Services are a cool, platform and language independent way for applications to communicate. You may already know that peers use SOAP messages, based on XML, to make the communication possible. In this article we will learn how to create and use custom headers in our Web Services. We are going to use Visual Studio 2005 and C#, but things are not much different in VS2008. &lt;/p&gt;&lt;p&gt;The SOAP envelope consists of body and header parts. While the body element is mandatory and has a predefined structure, the header is entirely optional and you are free to use it any way you like. &lt;/p&gt;&lt;p&gt;For example, let’s try to make some kind of authentication header – one that contains a username and password. &lt;/p&gt; &lt;p&gt;To be clear, we wish to add the following header to every SOAP message that a client sends to the Web Service: &lt;code&gt;&amp;lt;authenticationtoken&amp;gt; &amp;lt;username&amp;gt;myname&amp;lt;/username&amp;gt; &amp;lt;password&amp;gt;mypassword&amp;lt;/password&amp;gt; &amp;lt;/authenticationtoken&amp;gt;&lt;/code&gt; First of all, we have to create a new class that inherits &lt;code&gt;System.Web.Services.Protocols.SoapHeader&lt;/code&gt;, assuming that you have already developed your Web Service. In a project that represents your Web Service, add the file named &lt;code&gt;AuthenticationHeader.cs&lt;/code&gt;, with the following code: &lt;code&gt;public class AuthenticationHeader : SoapHeader { public string username; public string password; }&lt;/code&gt; &lt;/p&gt;&lt;p&gt;Next, we have to change the class that represents the Web Service by adding a public member of &lt;code&gt;AuthenticationHeader&lt;/code&gt; type: &lt;code&gt;public AuthenticationHeader header;&lt;/code&gt; &lt;/p&gt;&lt;p&gt;Now we need to specify the methods that will use the header (if our Web Service has more than one method, some of them may require authentication while others may not). &lt;/p&gt;&lt;p&gt;We can accomplish this by adding attributes: &lt;code&gt;[SoapHeader(&amp;quot;header&amp;quot;, Direction=SoapHeaderDirection.In)]&lt;/code&gt; Here, the string argument represents the class member where the header is stored after deserialization (in our case it is named “header”). &lt;code&gt;&amp;quot;Direction&amp;quot;&lt;/code&gt; specifies who is supposed to send SOAP headers – a client, the Web Service, or both. &amp;quot;&lt;code&gt;In&amp;quot;&lt;/code&gt; means that Web Service just receives the header, so client is the one who composes and sends them. Other possible values are &lt;code&gt;Out&lt;/code&gt; (Web Service sends the header), &lt;code&gt;InOut&lt;/code&gt; (the header is sent in both directions) and &lt;code&gt;Fault&lt;/code&gt; (the header is sent by the Web Service, but only if some exceptions, faults etc. occur). &lt;/p&gt;&lt;p&gt;In the method body we can process the header as we wish. In our example we would like to check whether the credentials are valid or not. We won’t make any sophisticated checks here, let’s just put a simple if statement at the beginning of the method: &lt;code&gt;if (header.username != &amp;quot;uncle&amp;quot; &amp;amp;&amp;amp; header.password != &amp;quot;sam12345&amp;quot;) { throw new Exception(&amp;quot;Incorrect login!&amp;quot;); }&lt;/code&gt; &lt;/p&gt;&lt;p&gt;We may now recompile our Web Service. Its WSDL description has changed, so we must update Web References in all clients that use it. After updated, a new member, named &lt;code&gt;AuthenticationHeaderValue&lt;/code&gt;, will be generated in the proxy class. By setting its value we actually form the SOAP header in runtime. &lt;/p&gt;&lt;p&gt;For example, if a proxy object is named &lt;code&gt;myService&lt;/code&gt;, here’s the piece of the client code: &lt;code&gt;AuthenticationHeader ah = new AuthenticationHeader(); ah.username = &amp;quot;uncle&amp;quot;; ah.password = &amp;quot;sam12345&amp;quot;; myService.AuthenticationHeaderValue = ah; myService.PerformOperation();&lt;/code&gt; &lt;/p&gt;&lt;p&gt;Note that we could use a method argument here to accomplish the same thing, but this is certainly a more elegant way, since we want to make the interface of our Web methods focused on real functionalities. &lt;/p&gt; 
    </content:encoded>

    <pubDate>Mon, 28 Jul 2008 05:03:55 -0400</pubDate>
    <guid isPermaLink="false">http://meritsolutions.com/meritmatters/index.php?/archives/101-guid.html</guid>
    
</item>

</channel>
</rss>