{"id":19,"date":"2008-05-13T23:33:09","date_gmt":"2008-05-14T04:33:09","guid":{"rendered":"http:\/\/www.peteonsoftware.com\/?p=19"},"modified":"2008-12-22T16:03:44","modified_gmt":"2008-12-22T20:03:44","slug":"web-services-software-factory-1-of-5","status":"publish","type":"post","link":"https:\/\/www.peteonsoftware.com\/index.php\/2008\/05\/13\/web-services-software-factory-1-of-5\/","title":{"rendered":"Web Services Software Factory (1 of 5)"},"content":{"rendered":"<p><em>Note: All links current as of the time of this blog post<\/em><\/p>\n<p>This is the first in a series of five tutorial posts on the Web Services Software Factory.  The Web Services Software Factory (WSSF) is a product that has come out of the Microsoft Patterns and Practices Group and its goal is to aid you in the mundane tasks that accompany setting up a robust WCF or ASMX service.  The outline of the tutorials will be as follows:<\/p>\n<p>Post 1: Download, Install, and Setup our Demo Project<br \/>\nPost 2: Create Data Contracts and Implement Business Entities and Translators<br \/>\nPost 3: Create Service Contracts and Implement the Methods<br \/>\nPost 4: Create Host Contract, Deploy and Test WSDL<br \/>\nPost 5: Generate Proxy, Create Simple Client, Call Service to Test<\/p>\n<p>The original WSSF version had a lot of XML configuration to create contracts.  With the version that came out in February (called the Modeling Edition), Microsoft Patterns and Practices added a lot of visual designers and even more code generation to the product.  However, that is enough of the prelude, lets get into the example.<\/p>\n<p>First you have to do some downloading and installing.  You must first download and install GAX (Guidance Automation Extensions) 1.4.  It can be found <a href=\"http:\/\/www.microsoft.com\/downloads\/details.aspx?familyid=df79c099-4753-4a59-91e3-5020d9714e4e&#038;displaylang=en\">here<\/a>.  Installation is very simple and you just have to run the installer and accept the defaults to go on.<\/p>\n<p>Next, you have to download the WSSF itself.  Go <a href=\"http:\/\/www.microsoft.com\/downloads\/details.aspx?FamilyId=F7AA544D-AD73-4B65-88D5-63F751844540&#038;displaylang=en\">here<\/a> and download the product.  If you are on Vista, you have to run the installer from an elevated command prompt.  To do that you merely have to get the command prompt to show up in your start menu (either by searching or because you&#8217;ve saved it there as I have) and right click on it.  Run As Administrator will be one of your options as shown below.  After you have the prompt, execute the installer.<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.peteonsoftware.com\/images\/WSSF\/ElevatedCommandPrompt.jpg\" alt=\"Get Elevated Command Prompt\" title=\"Get Elevated Command Prompt\" style=\"margin-top:.5em;\" \/><\/p>\n<p>You will then get the installation wizard and again you can accept the defaults and move on.<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.peteonsoftware.com\/images\/WSSF\/WSSFInstall.png\" alt=\"Install WSSF\" title=\"Install WSSF\" style=\"margin-top:.5em;\" \/><\/p>\n<p>Once you have installed the WSSF, start Visual Studio 2008 and click File&#8211;> New &#8211;> Project.  Then select Guidance Packages, Service Factory: Modeling Edition, and then Model Project.  Chose a directory and call the project MyCryptographyService and click OK.  Note: we are going to do WCF, so make sure that you target Framework 3.0 at a minimum.  I&#8217;m going to choose 3.5 just to run the &#8220;latest and greatest&#8221; \ud83d\ude42<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.peteonsoftware.com\/images\/WSSF\/CreateProject.jpg\" alt=\"Create Modeling Edition Project\" title=\"Create Modeling Edition Project\" style=\"margin-top:.5em;\" \/><\/p>\n<p>Rename the MyCryptographyService model project file to MyCryptographyService.model (so we can add a project of that same name later).<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.peteonsoftware.com\/images\/WSSF\/ModelRename.jpg\" alt=\"Rename Default Model\" title=\"Rename Default Model\" style=\"margin-top:.5em;\" \/><\/p>\n<p>Right click on the solution and choose Add&#8211;> WCF Implementation Projects.<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.peteonsoftware.com\/images\/WSSF\/AddWCFImplementationProject.jpg\" alt=\"Add WCF Implementation Project Menu\" title=\"Add WCF Implementation Project Menu\" style=\"margin-top:.5em;\" \/><\/p>\n<p>This brings up the Add New Project dialog yet again.  Name it MyCryptographyService (this is why we renamed earlier) and click OK.<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.peteonsoftware.com\/images\/WSSF\/AddNewWCFProject.jpg\" alt=\"Adding the new WCF Project\" title=\"Adding the new WCF Project\" style=\"margin-top:.5em;\" \/><\/p>\n<p>Visual Studio will grind away for a second and when it is done, it will have produced a boatload of projects for you in your solution.  You will also notice that the projects that should reference each other already do, helping you along in making sure that you separate your code properly.  Build your project and everything should build nicely.  It doesn&#8217;t do much now, but more will come next time.  If you have errors, please make sure that you followed the steps correctly.<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.peteonsoftware.com\/images\/WSSF\/NewProjectsWithReferences.jpg\" alt=\"Solution Explorer Populated with Projects\" title=\"Solution Explorer Populated with Projects\" style=\"margin-top:.5em;\" \/><\/p>\n<p>Next time we will dig into the designers and begin to implement the entities in our project.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note: All links current as of the time of this blog post This is the first in a series of five tutorial posts on the Web Services Software Factory. The Web Services Software Factory (WSSF) &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,29],"tags":[97,96],"class_list":["post-19","post","type-post","status-publish","format-standard","hentry","category-wcf","category-web-services-software-factory","tag-wcf","tag-web-services-software-factory"],"_links":{"self":[{"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/posts\/19","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/comments?post=19"}],"version-history":[{"count":0,"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/posts\/19\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/media?parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/categories?post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.peteonsoftware.com\/index.php\/wp-json\/wp\/v2\/tags?post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}