SOAP - Transport Independence in SOAP

Transport Independence in SOAP

  • Unlike REST (which is tightly bound to HTTP), SOAP is transport-independent.

  • This means the SOAP specification does not mandate a transport protocol. Instead, it defines a standard XML-based message format that can be carried over different protocols.


Common Transport Protocols for SOAP

  1. HTTP/HTTPS → Most common, since it works well with firewalls and browsers.

  2. SMTP (Email) → SOAP messages can be sent/received as email messages.

  3. TCP → Used in scenarios requiring faster point-to-point communication.

  4. JMS (Java Message Service) → Often used in enterprise systems for message-oriented middleware.

  5. Others → SOAP can, in theory, work over any protocol capable of carrying XML messages.


Why This Matters

  • Flexibility → Enterprises can choose the best transport for their environment.

  • Reliability → If HTTP isn’t available, SOAP can still work over SMTP or other transports.

  • Enterprise Integration → Useful for legacy systems that may not use HTTP but can still exchange SOAP messages.


Example:

  • A banking system might use SOAP over HTTP/HTTPS for web applications.

  • The same SOAP service could also be configured to work over MQ (Message Queue / JMS) for secure, asynchronous communication between internal systems.