I am using the Window Server Service Bus 1.1. I am able to generate the OAuth token from the Window Server Service Bus using the following base address
string baseAddressHttp = "https://" + ServerName + ":9355/" + Namespace + "/$STS/OAuth/";
For Window Azure Service Bus for sending a message to queue i can POST a request on the following queue address
string serviceNamespace = "ServiceBusDefaultNamespace";
string queueName = "SampleQueuName";
string message ="This is my first message";
string queueAddress = "https://" + serviceNamespace + ".servicebus.windows.net/"+ queueName + "/messages";
WebClient webClient = new WebClient();
webClient.Headers[HttpRequestHeader.Authorization] = token;
webClient.UploadData(baseAddress, "POST", Encoding.UTF8.GetBytes(message));
But for window Server Service Bus what same technique doesn't work.
Does Window Server Service Bus 1.1 support the REST API? Any help will be really appreciated.
Thanks in advance!!
yes it does support it. We are using it.
This code should do it: