How XML namespaces prevent element name collisions in SOAP messages.
XML namespaces use URIs to uniquely identify element groups. In SOAP:
- The SOAP envelope has its own namespace
- The carrier service has its own namespace
- Each can have elements with the same local name without conflict
Namespaces are declared with xmlns:prefix="URI" on the root element. Use the prefix throughout the document. Getting the namespace wrong causes 'element not found' faults that are hard to debug.