11.07.2015 Views

y - Net Developer

y - Net Developer

y - Net Developer

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 4 ■ INSTALLING AND CREATING WCF SERVICES 103ramrameshreddy.blog.comIIS, WCF, AND THE HTTP APIWindows 2003, Windows XP Service Pack 2, and Windows Vista all provide the HTTP API to allow applicationsthat create HTTP listeners to gain a series of advantages over the traditional Winsock mechanism that hasbeen available in current and prior releases of Windows.WCF is positioned to take full advantage of this capability, which for the most part sat dormant on theclient platform. Check out the article “Http.sys in WinXP SP2: What It Means with Windows CommunicationFoundation” located at http://www.dotnetjunkies.com/Tutorial/99DD7042-532D-4DB4-8625-1CD8BF422D64.dcik.■Note All ASP.NET “resources” are mapped to types that implement the IHttpHandler interface asrequired by the ASP.NET hosting engine.Within the httpHandler section of the machine’s Web.config, the mapping appears asshown in Listing 4-1.Listing 4-1. *.svc Mapping for WCF HandlerThe System.ServiceModel.Activation.HttpHandler class is responsible for providing theServiceHost environment inside the ASP.NET worker process for applications that are hosted onIIS. This handler, just as handlers provide for other extensions (*.aspx, *.asmx), is responsible forproviding any runtime compilation of source code embedded inside the *.svc files, in additionto providing update detection of the same source code as is done for the other handler types.Understanding Service ContractsService contracts, one of the Cs in the ABCs of WCF, are what are advertised to the consumersof your services. This advertisement generally takes place through a schema and a contractdefinition that supports a standardized method for publishing the service contract (along withdata contracts). Today, that schema is either a Web Services Description Language (WSDL)contract or a WS-MetadataExchange (MEX) contract. These formats are industry-supported,open specifications. These specifications are located at the following locations:ramrameshreddyramrameshreddyWSDL: http://www.w3.org/TR/wsdlMEX: http://schemas.xmlsoap.org/ws/2004/09/mex/

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!