简体   繁体   中英

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/" ...>

and

<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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM