다음을 통해 공유


WSE QuickStarts

The QuickStart samples are separated into folders that reflect the feature or type of feature that is demonstrated by the sample. The following sections describe the WSE QuickStarts.

Basic

The samples in the Basic folder demonstrate the primary features of WSE 3.0.

Sample Description

AsyncStockService

Demonstrates a basic WSE-enabled Web service that receives asynchronous SOAP requests with WS-Addressing and WS-Security SOAP headers.

BaseStockService

Demonstrates a basic WSE-enabled Web service that uses the WS-Addressing and WS-Security SOAP headers in SOAP messages.

BinaryDataMTOM

Demonstrates how to send binary data using the Message Transmission Optimization Mechanism (MTOM) specification. For more information, see How to: Enable a Web Service to Send and Receive Large Amounts of Data.

CustomPolicyTraceAssertion

Demonstrates creating a custom tracing policy assertion that can be plugged into the WSE policy pipeline. For more information about creating custom policy assertions, see Custom Policy Assertions.

Security

The samples in the Security folder demonstrate how to use the turnkey security assertions.

Sample Description

SecureConversation

Demonstrates how to secure a SOAP message exchange using SecurityContextToken security tokens (a secure conversation). This sample uses the <usernameForCertificateSecurity> Element turnkey security assertion. For more information about using a secure conversation, see Establishing a Secure Conversation.

WSSecurityAnonymous

Demonstrates how to secure an application that uses Web services and does not require the client to be authenticated, but does require the Web service to be authenticated. SOAP messages are protected using the Web service's X.509 certificate. This sample uses the <anonymousForCertificateSecurity> Element turnkey security assertion. For more information about securing a Web service using a policy assertion, see Specifying the Security Requirements For a Web Service.

WSSecurityCertificate

Demonstrates how to secure an application that uses Web services by authenticating both the client and Web service using an X.509 certificate. SOAP messages are protected using the Web service's X.509 certificate. This sample uses the <mutualCertificate11Security> Element turnkey security assertion. This sample could also use <mutualCertificate11Security> Element turnkey security assertion in an identical manner. For more information about securing a Web service using a policy assertion, see Specifying the Security Requirements For a Web Service.

WSSecurityKerberos

Demonstrates how to secure an application that uses Web services by authenticating the client and protecting SOAP messages with a Kerberos service ticket. This sample uses the <kerberosSecurity> Element turnkey security assertion. For more information about securing a Web service using a policy assertion, see Specifying the Security Requirements For a Web Service.

WSSecurityUsername

Demonstrates how to secure an application that uses Web services by authenticating the client using a user name and password. SOAP messages are protected using the Web service's X.509 certificate. This sample uses the <usernameForCertificateSecurity> Element assertion. For more information about securing a Web service using a policy assertion, see Specifying the Security Requirements For a Web Service.

Routing

The samples in the Routing folder demonstrate how to use the WSE SOAP router to forward messages based on settings in a referral cache. The WSE SOAP router can be used to forward SOAP messages based on content and security can be applied to incoming and outgoing messages.

Sample Description

BasicRouting

Demonstrates how to use the WSE SOAP router to forward messages based on settings in a referral cache. For more information about using an intermediary to route SOAP messages, see Routing SOAP Messages with WSE.

SecureRouting

Demonstrates how to use the WSE SOAP router to forward messages based on settings in a referral cache. SOAP messages are secured between the client and the SOAP router. There is no security between the router and the Web Service. For more information about securing SOAP messages that are routed through the WSE router, see How to: Secure SOAP Messages Routed Through the WSE SOAP Router.

SecureRoutingToUltimateReceiver

Demonstrates how to use the WSE SOAP router to forward messages based on settings in a referral cache. SOAP messages are secured between the client and the Web service and between the SOAP router and the Web service. The Web service receives a SOAP message with two <Security> SOAP headers; one from the client and one from the router.

Hosting

The samples in the Hosting folder demonstrate how to host Web services outside of Internet Information Services (IIS). Two of the places that WSE allows a Web service to be hosted outside of IIS are in a Windows service and by a console application.

Sample Description

ConsoleService

Demonstrates how to communicate with an ASP.NET Web Service that is hosted both by IIS and by a console application using the same client proxy.

WindowsService

Demonstrates how to host an ASP.NET Web Service in a Windows service.

Messaging

The samples in the Messaging folder demonstrate how to send and receive SOAP message using the WSE messaging API that were introduced in the WSE 2.0. The WSE messaging API allows a Web service to be hosted outside of IIS, communicated with using transports other than HTTP (e.g. TCP), and for SOAP messages to be sent using messaging patterns other than request/response. WSE 3.0 allows these features to be applied to Web services that use the ASP.NET programming model (ASMX) without the need for the WSE messaging API. Using the ASP.NET programming model is the preferred approach.

Sample Description

HttpSyncStockService

Demonstrates how to asynchronously send and receive SOAP messages by using the HTTP protocol with the WSE SoapClient and SoapSender classes. For more information about using the WSE messaging classes, see Sending and Receiving SOAP Messages Using WSE Messaging API.

TcpStockSoapReceiver

Demonstrates how to asynchronously send and receive SOAP messages by using the TCP protocol with the WSE SoapSender and SoapReceiver classes. For more information about using the WSE messaging classes, see Sending and Receiving SOAP Messages Using WSE Messaging API.

TcpSyncStockService

Demonstrates how to synchronously send and receive SOAP messages by using the TCP protocol with the WSE SoapService and SoapClient classes. For more information about using the new WSE messaging classes, see Sending and Receiving SOAP Messages Using WSE Messaging API.

Advanced

The samples in the Advanced folder demonstrate advanced policy use.

Sample Description

CustomSecurityPolicyAssertion

Demonstrates how to apply a custom security policy assertion to a Web service that allows incoming SOAP requests to be secured by one of multiple ways. Instead of requiring all SOAP requests to be securing using one specific mechanism, clients can choose from a set of options provided by the Web service. The Web service selects the security that should be applied to the SOAP response based on how the client secured the SOAP request.

PolicyOnRequestBody

Demonstrates how to apply different security requirements (e.g. what headers are signed, whether the body is encrypted or not) to each Web service method hosted at an endpoint based on the SOAP message contents. The sample applies the security requirements for the SOAP messaged based on the first child element of the <Body> element instead of the default behavior of WSE, which uses the WS-Addressing <Action> SOAP header.

See Also

Other Resources

Securing a Web Service
Programming with WSE