Issue with Azure Service Bus

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

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.
635 questions
0 comments No comments
{count} votes

Accepted answer
  1. MayankBargali-MSFT 70,531 Reputation points
    2020-09-23T14:27:27.073+00:00

    @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.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.