Hi folks,
I'm trying to automate setting up notification hubs for developers' local development machines. Since our notification tag structure uses User ID, and the users on each developer's local machine will conflict, each developer needs to develop against a different notification hub.
Therefore, I'm trying to use the Create Notification Hub API (http://msdn.microsoft.com/en-us/library/dn223269.aspx). The API specification itself is a little weird, in that the create API uses a PUT request to a resource that may not exist yet (https://[namespace].servicesbus.windows.net/[hub-name], even though [hub-name] may not exist yet). When I make a request, I get an HTTP 415 error:
<Error><Code>415</Code><Detail>The incoming request is not recoginzed as a namespace policy put request: Unsupported or missing Content-Type.TrackingId:388419ad-bd23-43ef-b08b-8e6aa5f648f5_G8,TimeStamp:7/11/2014 2:57:08 PM</Detail></Error>
However, I am explicitly setting the Content-Type to application/xml;type=entry;charset=utf-8, as documented in the API documentation above. Confusingly, the server is apparently interpreting the request as a "namespace policy put request," which is incorrect.
Any pointers in the right direction are highly appreciated!
Jason