Search code examples
web-servicessoapwsdl

soap:address and http:address


I have some problems with understanding the difference between soap:address and http:address tags in wsdl. Is it interchangeble? Can I use soap:address instead of http:address?


Solution

  • Short answer

    No, You can't. They are not interchangeable. They belong to different WSDL Bindings.

    Long answer

    The WSDL format is not bound to a particular protocol. On the contrary, it can be extended to be used in conjunction with various protocols such as SOAP, HTTP and MIME. This kind of extensions is called Binding. A Binding defines the protocol and the message format used for communicating with a web service. Each Binding has a namespace and associated namespace prefix prepended to tags. The namespace prefixes and the tags are separated with a colon. So, the soap namespace prefix in the soap:address tag indicates that it belongs to the SOAP Binding and the http namespace prefix in the http:address tag indicates that it belongs to the HTTP Binding. You CAN'T mix them in a Binding, because according to the WSDL Specification a Binding MUST specify exactly one protocol. But You can have different Bindings for one portType.

    Links

    1. WSDL 1.1 Specification
    2. WSDL 1.2 Specification: Bindings