File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes confusing xml construct Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "confusing xml construct" Watch "confusing xml construct" New topic
Author

confusing xml construct

Hendra Kurniawan
Ranch Hand

Joined: Jan 31, 2011
Posts: 239


What is SOAP-ENV? AFAIK it's a namespace right? xmlns is some sort of declaring a namespace where SOAP-ENV has attribute envelope. but then again what about encodingStyle? how come that one attribute also has URI? aren't URI supposed to be owned by namespaces?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18141
    
    8



This is a namespace declaration. The namespace URI, which is the important piece of information, is "http://schemas.xmlsoap.org/soap/envelope/". Programs which process XML documents which include elements or attributes in this namespace may do some specific processing on those elements or attributes.

You can tell that it's a namespace declaration, and not an attribute, because it starts with "xmlns:".

The "SOAP-ENV" part of that declaration is the namespace prefix. It means that in this particular document any element or attribute whose name is prefixed by "SOAP-ENV:" belongs to the "http://schemas.xmlsoap.org/soap/envelope/" namespace. It's an arbitrary series of characters which only applies in the current document, and any other name could have been chosen. There is no significance in this series of characters apart from identifying the namespace which a name belongs to.



By now you should realize that this is an attribute which belongs to the "http://schemas.xmlsoap.org/soap/envelope/" namespace. Its name is "encodingStyle" and its value is "http://schemas.xmlsoap.org/soap/encoding/". As you know, attribute values are always string data. There is nothing which prohibits this string data from appearing to be a URI.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: confusing xml construct
 
Similar Threads
Not supported element: {http://schemas.xmlsoap.org/wsdl/soap/}Header
Question regarding MZ notes
wsdl with xmlSignature
Question: WS-I Profile Basic 1.0a R1005
<Soap:Body> vs <SOAP-ENV:Body> Parser Error