application/soap+xml application/soap+xml means: application/soap+xml is the media type for SOAP 1.2 messages, distinguishing XML envelopes that follow the SOAP protocol from generic XML. It signals to handlers that the body contains an Envelope with Header and Body elements and optional fault structures. Application media types carry structured or binary data that a program consumes rather than a human reading raw bytes. The subtype tells the receiver exactly which parser, decoder or handler to invoke, so sending the correct Content-Type is part of the API contract: a mismatch makes servers reject the body with 415 Unsupported Media Type or clients mis-parse the payload. You will encounter application/soap+xml in contexts such as soap 1.2 web service requests and responses; enterprise integration buses and legacy ws-* stacks; wsdl-defined operations exchanged over http. It is commonly associated with the file extension(s) .xml. SOAP 1.1 historically used text/xml with a SOAPAction header, while SOAP 1.2 uses application/soap+xml and carries the action as a parameter. Mixing the versions and types causes servers to reject or misroute the message.
When you'll see application/soap+xml
- SOAP 1.2 web service requests and responses
- Enterprise integration buses and legacy WS-* stacks
- WSDL-defined operations exchanged over HTTP
How to handle it
When handling an application type, set the Content-Type header explicitly on every request and response that carries a body, and advertise what you accept with the Accept header. Parse the payload with a library that matches the subtype rather than sniffing bytes, and validate the structure before trusting it. If a server returns 415, the declared type does not match what it expects — compare your header against the API documentation character for character, including parameters such as charset or boundary. As a final checklist for application types: register the exact subtype in your API documentation, validate incoming bodies against a schema before use, set X-Content-Type-Options: nosniff to stop MIME sniffing, and version your media types when the payload contract changes so old clients keep working.
Notes & gotchas
SOAP 1.1 historically used text/xml with a SOAPAction header, while SOAP 1.2 uses application/soap+xml and carries the action as a parameter. Mixing the versions and types causes servers to reject or misroute the message.
Examples
POST /v1/resource HTTP/1.1
Host: api.example.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 33
<root><item>example</item></root> curl -i -X POST -H "Content-Type: application/soap+xml; charset=utf-8" --data-binary @payload https://api.example.com/v1/resource const res = await fetch("/v1/resource", { headers: { Accept: "application/soap+xml" } });
// verify res.headers.get("Content-Type") starts with "application/soap+xml"
const text = await res.text(); // handle according to the declared type import requests
with open("payload", "rb") as fh:
res = requests.post("https://api.example.com/v1/resource", data=fh,
headers={"Content-Type": "application/soap+xml; charset=utf-8"}, timeout=30) Frequently asked questions
What type does SOAP 1.1 use?
SOAP 1.1 typically uses text/xml plus a SOAPAction HTTP header. SOAP 1.2 uses application/soap+xml with an action parameter instead. Match the type to the SOAP version.
How do I indicate the SOAP action in 1.2?
Append it to the Content-Type: application/soap+xml; action="urn:MyOperation". This replaces the separate SOAPAction header used by 1.1.
What happens if I send the wrong application Content-Type?
Servers that validate media types answer 415 Unsupported Media Type, and clients may parse the body with the wrong decoder. Always set Content-Type to the registered type that matches your payload, and set Accept to the types you can handle.
Is application/octet-stream a safe default?
It means 'arbitrary binary bytes' and forces a download rather than inline handling. Use it only when the real type is unknown or you deliberately want a save-as dialog; otherwise declare the specific registered type.
How do I debug a 415 Unsupported Media Type response?
Compare the Content-Type you actually sent against what the endpoint documents, including parameters like charset and boundary. A 415 means the server refuses that media type; send the exact registered type it accepts and retry.
Try the JSON Formatter
Beautify, validate and minify JSON with clear error messages.