Running the Address Book sample using WS-ReliableMessaging
SOAP requests or responses might fail to be delivered to a Web Service or
client due to network outage or server failure. Web Services Reliable Messaging (WS-RM) is a
specification that allows two SOAP-based systems to send messages between each other reliably.
The WS-RM protocol defines how to send messages again that it determines have not been delivered successfully,
and prevents duplicate messages being delivered to the destination application.
We will demonstrate how WS-RM can be used to deliver SOAP/HTTP messages reliably by stopping and starting
a TCP/IP channel to simulate network outage. Even with this network outage,
all the SOAP/HTTP requests and responses are delivered successfully.
- Set up the TCP/IP Monitor as described in Setting up a TCP/IP Monitor in order to simulate network outage.
- Complete the instructions in Setting up the Address Book samples to use HTTP.
- The following instructions demonstrate that if any network outage happens, an exception will be thrown
when the consumer and provider flows are not configured to use WS-RM:
- In the Broker Development view, expand the AddressBook project.
- Expand Flow Tests. Double-click AddressBookTests.mbtest to open
the file in the Test Client.
- Select the first Enqueue. Click Send Message.
- The TCP/IP Monitor shows the SOAP message that has been transmitted between the provider and consumer flow.
Check the contents of the inbound and outbound SOAP messages. If you want to make the message
easier to read, use the menu in the TCP/IP Monitor to change the format from
Byte to XML.
- Select the first Dequeue. Click Get Message.
You can see both the HTTP response from the SOAPRequest node and the XML message.
- Stop the TCP/IP Monitor. Right-click the TCP/IP monitor view and select Properties.
Select the TCP/IP Monitor you have created and click Stop.
- Open AddressBookTests.mbtest. Select the first Enqueue.
Click Send Message.
- Restart the TCP/IP Monitor. Right-click the TCP/IP monitor view and select Properties.
Select the TCP/IP Monitor you have stopped and click Start.
- The request has failed. Select the third Dequeue and
click Get Message to see the fault message. Check the event log for more information.
- The following instructions demonstrate that if any network outage happens, SOAP/HTTP messages are still delivered
reliably when the consumer and provider flows are configured to use WS-RM:
- Extend the sample so that the flows are configured to use WS-RM. You must associate the flows with the
default policy set. Complete the steps described in Configuring and deploying the BAR files.
- After deploying the flows, messages will be sent to the consumer flow.
- In the Broker Development view, expand the AddressBook project.
- Expand Flow Tests. Double-click AddressBookTests.mbtest to open
the file in the Test Client.
- Select the first Enqueue. Click Send Message.
- Check the TCP/IP Monitor. You will see the WS-RM wire protocol messages that are sent between the consumer and provider flows.
Check the contents of the inbound and outbound SOAP messages. If you want to make the message
easier to read, use the menu in the TCP/IP Monitor to change the format from
Byte to XML.
- Select the first Dequeue. Click Get Message.
You can see both the HTTP response from the SOAPRequest node and the XML message.
- Stop the TCP/IP Monitor. Right-click the TCP/IP monitor view and select Properties.
Select the TCP/IP Monitor you have created and click Stop.
- Open AddressBookTests.mbtest. Select the first Enqueue.
Click Send Message.
- Now start the TCP/IP Monitor again. Right-click the TCP/IP monitor view and select Properties.
Select the TCP/IP Monitor you have stopped and click Start.
- The request has been processed. Check the TCP/IP Monitor. You will see the WS-RM wire protocol messages
that are sent between the consumer and provider flows.
- Select the second Dequeue and click Get Message to see the
message.
- You have extended the Address Book sample to use WS-ReliableMessaging.
Back to Extending the Address Book sample
Back to sample home