Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I am confused about SOAP namespaces

Tags:

soap

I am learning about SOAP implementation and have become somewhat confused regarding the appropriate namespace URI for a SOAP 1.2 Envelope.

The w3c specification for SOAP refers to the "http://www.w3.org/2003/05/soap-envelope" namespace. However, I have seen other examples that refer to the "http://schemas.xmlsoap.org/soap/envelope/" namespace.

It seems to me that one or the other namespace should be used. Which of these two is the correct namespace URI to use?

like image 939
Jon Trauntvein Avatar asked Dec 31 '08 20:12

Jon Trauntvein


People also ask

What is a SOAP namespace?

SOAP defines two namespaces: The SOAP envelope, the root element of a SOAP message, has the following namespace identifier: "http://schemas.xmlsoap.org/soap/envelope" The SOAP serialization, the URI defining SOAP's serialization rules, has the following namespace identifier: "http://schemas.xmlsoap.org/soap/encoding"

How do you identify SOAP requests?

A simple rule you can use is to check the presence of a SOAPAction header. If it is present, then it can be a SOAP 1.1 message, and if not, it is a SOAP 1.2 message. The tricky thing here is that, even if the SOAPAction header is not defined in SOAP 1.2 HTTP binding, no one is restricted from sending that header.

What are the SOAP versions?

The most common combination is to use SOAP with HTTP and TCP. There are different versions, 1.0, 1.1, and 1.2. Before version 1.2 SOAP stood for Simple Object Access Protocol. Since version 1.2 the protocol is simply called SOAP.

How many number of parts are there in a SOAP document?

SOAP consists of three parts: The SOAP envelope (see section 4) construct defines an overall framework for expressing what is in a message; who should deal with it, and whether it is optional or mandatory.


1 Answers

It is related to the SOAP version. SOAP 1.2 uses http://www.w3.org/2003/05/soap-envelope for the namespace and SOAP 1.1 uses http://schemas.xmlsoap.org/soap/envelope/.

For reference, see http://www.w3.org/TR/soap/ and look at the envelope section in the different version specs.

Also, you can browse to each of those envelope URLs and check the version number to see exactly which version of the spec you are using.

like image 86
nshaw Avatar answered Sep 16 '22 16:09

nshaw