SOAP
SOAP (Simple Object Access Protocol) is a formal, XML-based messaging protocol. It was designed to be platform-independent, letting systems exchange structured information over HTTP (or even SMTP).
- Default format:
- SOAP uses XML by design. It’s an XML-based protocol.
- The request and response envelopes are always in XML.
- Can SOAP use JSON?
- Not really. The protocol itself defines an XML envelope structure.
- Some systems might convert or wrap JSON inside XML or expose a JSON-like endpoint separately, but that’s non-standard and rare.
So: SOAP is generally XML-only.
OData
OData (Open Data Protocol) is a REST-based standard that goes beyond basic REST by adding rich query options ($filter, $expand, etc.). It supports both JSON and XML, depending on what the client asks for.
- Default formats:
- OData (especially OData v4) is designed to be format-flexible.
- It commonly supports:
- JSON (most common nowadays, especially for web APIs/OData v4).
- XML / AtomPub (more common in older OData or specific scenarios).
- The format is typically determined by the
AcceptHTTP header. For example:Accept: application/json→ get JSONAccept: application/atom+xml→ get Atom/XML
So: OData supports both JSON and XML.
Summary
SOAP: Strictly XML. No JSON without heavy workarounds.
OData: Fully supports both JSON and XML, modern clients default to JSON.
| Protocol | Supports JSON? | Supports XML? | Typical output |
|---|---|---|---|
| SOAP | ❌ (not directly) | ✅ | XML |
| OData | ✅ | ✅ | JSON (modern) or XML |
What does this mean for Business Central developers?
- If you’re building integrations with new web or mobile apps, OData (JSON) is typically your best choice. It’s lightweight, modern, and easy for frontend frameworks or microservices to consume.
- If you’re integrating with older systems or existing SOAP-based infrastructure, you’ll continue to use SOAP (XML). Business Central makes this easy by exposing Codeunits and Pages as SOAP services.
