Configuring WSIT Features in the Web Service

Now that you have coded a web service, you can configure the web service to use WSIT technologies. This section only describes how to configure the WSIT Reliable Messaging technology. For a discussion of reliable messaging, see Chapter 5. To see how to secure the web service, see Chapter 6.

To configure a web service to use the WSIT Reliable Messaging technology, perform the following steps:

  1. In the Projects window, expand the Web Services node under the CalculatorApplication node, right-click the CalculatorWS node, and choose Edit Web Service Attributes, as shown in Figure 2-1:


Figure 2-1 Accessing the Edit Web Service Attributes

The Web Service Attributes Editor appears.

  1. Select the Reliable Message Delivery check box, as shown in Figure 2-2, and click OK.


Figure 2-2 Reliable Messaging Configuration Window

This setting ensures that the service sends an acknowledgement to the clients for each message that is delivered, thus enabling clients to recognize message delivery failures and to retransmit the message. This capability makes the web service a "reliable" web service.

  1. In the left pane, expand the Web Pages node and the WEB-INF node, and open the wsit-<endpoint classname>.xml file in the Source Editor.
  2. Notice that the IDE has added the following tags to the file to enable reliable messaging:

      <wsp:Policy wsu:Id="CalculatorWSPortBindingPolicy">
        <wsp:ExactlyOne>
          <wsp:All>
            
    <wsaw:UsingAddressing xmlns:wsaws=
              "http://www.w3.org/2006/05/addressing/wsdl"/>
            <wsrm:RMAssertion/>
          </wsp:All>
        </wsp:ExactlyOne>
      </wsp:Policy>