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 6, Using Reliable Messaging. To see how to secure the web service, see Chapter 7, Using WSIT Security.
To configure a web service to use the WSIT Reliable Messaging technology, perform the following steps:
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 3–1.
Select the Reliable Message Delivery check box, as shown in Figure 3–2, and click OK.
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.
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.
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>