Issue with Azure Service Bus

asked 2020-09-23T14:11:28.543+00:00
Dinesh Gudi 21 Reputation points

I am getting a 400 error when trying to send an XML to Queue from Postman. I also tried sending it from the Service Bus Explorer and it works fine.

Below is the response I am getting from Service bus endpoint

My request looks like this -

27272-sb.png

27282-sb1.png

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
336 questions
No comments
{count} votes

Accepted answer
  1. answered 2020-09-23T14:27:27.073+00:00
    MayankBargali-MSFT 49,466 Reputation points Microsoft Employee

    @Dinesh Gudi As per the screenshot I can see that you are using the wrong request URI i.e. messages is missing in the URL
    Please use the below request URI to send the message:
    Syntax : http{s}://{serviceNamespace}.servicebus.windows.net/{queuePath|topicPath}/messages
    ex : https://servicemax.servicebus.window.net/smx/messages

    Further, I can see that you are passing the Content-Type as Application/Xml but it should be application/atom+xml;type=entry;charset=utf-8 as per the document.
    Content-Type: application/atom+xml;type=entry;charset=utf-8

    I have tested at my end and it is working as expected. Please update the URL and Content-Type and I hope it will resolve your issue.
    Feel free to reach out to me if you are still facing the issue.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    No comments

0 additional answers

Sort by: Most helpful