Export (0) Print
Expand All

REST and Service Bus Relay Programming Lifecycle

Updated: June 18, 2014

This walkthrough illustrates how to use REST-style Web service applications that use Microsoft Azure Service Bus. The example uses the Windows Communication Foundation (WCF) Web programming model to create and register a REST-style Web service for use with Service Bus, and then creates a REST client that invokes the REST service through Service Bus.

Creating a REST-based Application that uses the Service Bus

The basic tasks required to create an application that accesses the Service Bus using the REST architecture model are as follows:

  1. Create the Service Bus and Service Bus Access Control projects and the service namespace. The project and service namespace contain the resources to support your application. For more information, see Creating a .NET Services Account. REST applications must have a Microsoft Azure Service Bus project and namespace created by using the Azure management portal. The project also helps provide security and authentication, through the Access Control service. For more information, see Building Applications that Use Access Control Services.

  2. Define the Service Bus contract. For more information, see Designing a WCF Contract for the Service Bus.

  3. If you are registering a REST-based service endpoint, you must implement the contract in the previous step. The important point here is that the information passed through the interface must be in a format that is transmittable by a REST-style service, for example, a stream.

  4. Configure the service by specifying endpoint information and other behavior information. For more information, see Configuring a WCF Service to Register with the Service Bus. For a full Service Bus application that supports the REST protocol, the main difference is that the application must use a binding that supports the REST protocol, such as WebHttpRelayBinding. However, other than that restriction, the actual configuration is identical to any other WCF application that uses Service Bus.

  5. Build and run the service. For more information, see Building a Service for Service Bus. For more information about creating a Service Bus service that supports the REST protocol, see How to: Create a REST-based Service that Accesses Service Bus.

  6. Build a client application. For more information, see Building a Service Bus Client Application.

Community Additions

ADD
Show:
© 2014 Microsoft