Soap Request returns unsupported media type

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

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?