Sunday, June 22, 2008

Web Services Enhancements (WSE) 2.0

What is (WSE) ?
Web Services Enhancements 2.0 for Microsoft .NET (WSE) is a .NET class library for building Web services using the latest Web services protocols, including WS-Security, WS-SecureConversation, WS-Trust, WS-Policy, WS-SecurityPolicy, WS-Addressing, and WS-Attachments. WSE allows you to add these capabilities at design time using code or at deployment time through the use of a policy file.

Programming with WSE ?
The Web Services Enhancements for Microsoft .NET (WSE) provides access to features specified in the XML Web services architecture, also known as the Web services specifications, by building on the programming model for Web services created using ASP.NET. That is, WSE extends the programming model by introducing a SoapContext class and the WSE router. Through the SoapContext class, the developer primarily accesses the WSE implementation of the WS-Security and DIME Web services specifications. Likewise, the WSE router provides primary access to the WSE implementation of routing capability.

Run a WSE ?
WSE provides Visual Basic and C# versions of each sample. For most of the samples, there is a version that uses policy and one that uses code to illustrate the features of the sample. Choose the language and sample type to determine which sample to build.

using C#.net :
  1. <WSE2 Installation Directory>\v2.0\Samples\CS\Quickstart<SampleName>
  2. Default: C:\Program Files\Microsoft WSE\v2.0\Samples\CS\QuickStart


using VB.net

  1. <WSE2 Installation Directory>\v2.0\Samples\VB\Quickstart\<SampleName>
  2. Default: C:\Program Files\Microsoft WSE\v2.0\Samples\VB\QuickStart

Runing WSE ?

  1. Create a virtual directory for the Web service associated with the sample.
  2. For the QuickStart samples that use a Web service that is hosted in IIS, you must create a new virtual directory. To determine if a virtual directory is needed, navigate to the sample directory and check whether a file named CreateSampleVdir.vbs is present; if not, a virtual directory is not needed.
  3. Navigate to the sample directory.
  4. Double-click CreateSampleVdir.bat.
    This invokes a batch file that creates the virtual directory for the sample.
    If you want to manually create the virtual directory, you must add the virtual directory to the root of your Web site or change the sample code to point to the alternative location. The name of the virtual directory is the name of the directory containing the code for the Web service.
  5. Note: To remove the virtual directory at a later time, double-click DeleteSampleVDir.bat in the sample directory.

  6. Open the Visual Studio .NET 2003 solution file and build the Web service and client.

    1. On the Start menu, click My Computer.
    2. Navigate to <WSE installation folder>\v2.0\Samples\<Language>\QuickStart\<SampleName>\<SampleType>
      where <Language> is either CS or VB for the C# or Visual Basic version of the sample, respectively; <SampleName> is the name of the sample; and <SampleType> is either Code or Policy for the version that uses just the WSE classes or the one that uses policy.
    3. Double-click the Visual Studio .NET 2003 solution file (.sln).
    4. In Visual Studio .NET 2003, on the Build menu, click Build Solution.
  7. Run the client application for the QuickStart sample.
  8. You can run the sample from within Visual Studio .NET 2003 or from a command prompt, once the client and Web service executables have been created.

Regards,
Muhammad Kalim
muhammad.kalim@avaricesoft.com
www.avariecsoft.com

No comments: