SOAP
SOAP (Simple Object Access Protocol) ist ein protokoll für den Austausch strukturierter Nachrichten in Web-Services.
Es basiert auf XML und ermöglicht plattformübergreifende Kommunikation zwischen Anwendungen.
Important
SOAP-Komponenten:
- Envelope: SOAP-Nachricht-Container
- Header: Meta-Informationen (optional)
- Body: Eigentliche Nachricht/Daten
- Fault: Fehler-Informationen
Example
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
</soap:Header>
<soap:Body>
<getUser xmlns="http://example.com/">
<userId>123</userId>
</getUser>
</soap:Body>
</soap:Envelope>
Note
SOAP vs REST API:
- SOAP: Formal, XML-basiert, Standards (WS-Security)
- REST: Leichtgewichtig, HTTP-basiert, flexibler