Logo Questions Linux Laravel Mysql Ubuntu Git Menu

php soap envelope namespace <soap:Envelope and <SOAP-ENV:Envelope

What is the difference between

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" ...>


<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" ...>

and how can I switch between them?

How can I change the response from < SOAP-ENV:Envelope to use < soap:Envelope ?

like image 296
user1005064 Avatar asked Mar 22 '23 09:03


1 Answers

There is no difference.

The XML namespace is referenced by the xmlns attribute as it's value ("http://schemas.xmlsoap.org/soap/envelope/"), and the shortcut to that reference is following right behind the xmlns, which is soap in your one case, and SOAP-ENV in the other.

That shortcut is now being used consistently as the prefix to the elements that are defined in the XML namespace. Because of the connection of the element <Envelope> with the defined namespace "http://schemas.xmlsoap.org/soap/envelope/", it's special meaning is known to the underlying XML parser.

The shortcut can be any allowed string - it does not matter to the XML parser as long as the correct namespace URL has been given.

I guess you have an underlying problem that makes you think that the namespace matters - you should rather explain THAT problem in your question, or probably ask a new one instead.

like image 134
Sven Avatar answered Mar 24 '23 22:03