Jeffrey Hasan shows how to develop web services using a message oriented approach in C# this excerpt from “Expert Service Oriented Architecture in C#”. He also shows how to implement the WS-Policy specification using WSE 2.0 to enforce web service requirements.
Chapter 3 attempts to redefine web service development by having the developer consider the messages being sent as XML instead of using a RPC/attribute approach. The chapter goes on to describe each of the steps and the tools used to aid the development.
There are six steps involved in building a message-oriented Web service, as described in the following sections.
Step 1: Design the Messages and the Data Types
Step 2: Build the XSD Schema File for the Data Types
Step 3: Create a Class File of Interface Definitions
Step 4: Implement the Interface in the Web Service
Step 5: Generate a Proxy Class File for Clients
Step 6: Implement a Web Service Client Using a Proxy Class File
Chapter 7 discusses the use of WSE 2.0 to create a web service that implements policy based requirements via the WS-Policy specification.
The WS-Policy specification provides the means to implement and enforce a standard policy framework for Web services. The WS-Policy specification itself is more of a generic model that outlines general syntax for documenting a policy framework. There are many kinds of potential policies that aWeb service may need to communicate and enforce, including security requirements and quality of service of requirements. Each of these specific policy needs is governed by a more specific WS specification that works with the more general WS-Policy specification. For example, security policy is governed by the specialized WS-Security Policy specification.
Download excerpts from Expert Service Oriented Architecture in C#