Soap Request returns unsupported media type

SOAP Request returns unsupported media type. I already set the Body to raw, (text/xml).

1 Like

Hey @rensonpd,

By selecting XML from the drop down, in the request body - You’re actually setting the header as application/xml rather than text/xml.

Did you change this manually after you created the request body to flip it to the correct header?

After selecting XML to the dropdown from Raw. header was automatically set to application/xml

You mentioned that you thought it was set to text/xml.

1 Like

Nope, I mean the XML in the dropdown is text/xml right? so after selecting the XML(text/xml), content-type is automatically set to application/xml. After trying a post request, unsupported media file type error is returned. This was working a while ago. this happened after updating the Postman to new version.

That drop down used to contain other options and would auto populate the header.

The XML setting will auto set the header to application/xml, the way to check what is being set is by checking the Headers tab.

To ensure the correct Headers are being sent with your request, I would check that tab before sending.

I believe that there is an open issue around setting the header automatically but I would need to check up on that.

Showing you the value of content-type after selecting XML from Raw dropdown

Yes, that’s what currently happens/gets automatically set, when you use the XML option from the request body. :slight_smile:

You mentioned at the beginning that you thought that you were setting the text/xml header…this is not the case, as you can clearly see. :slight_smile:

You would need to manually change the value of the header in front of you to text/xml by clicking on the text area that contains the application/xml value. Once this has been changed, send the request again.

Does the same 415 code get returned?

I get it now. It now returns success 200. Thanks a lot Danny :slight_smile:

1 Like

This was a change in 7.6
Previously I had choice of XML:

  • application/xml (Only 7.6 option)
  • text/xml
    Is there a way to override headers at a global or collection level?

I chose “XML” from the raw body type. That made the content-type header “application/xml”
on the header tab.
Once there, application/xml cannot be edited to text/xml.
What happens is that you can delete “application” and try to type “text” in its place, but it doesn’t respond and changes it back to “application”

I am running it on a mac. postman version is 7.27.1

I presume that this isn’t fixed as it’s also an issue for me (v7.28.0 Windows)
I can see the XML selection for the raw type in the body tab is setting the Content-Type header to application/xml but I can’t find a way to change it to text/xml
If anyone can help I’d be very grateful

Add your own ‘Content-Type’ header to the bottom of the list of Headers. The one you add will override the one that was automatically generated.


This was the solution thanks friend