4

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 ?

pnuts
  • 58,317
  • 11
  • 87
  • 139
user1005064
  • 115
  • 1
  • 7

1 Answers1

7

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.

Sven
  • 69,403
  • 10
  • 107
  • 109
  • 1
    To put it another way: if your code relies on the prefix staying the same, fix it to rely on the URI instead, then you can ignore the difference. – IMSoP Sep 16 '13 at 21:03