Chapter 1. XML Web Service Standards

Given XML documents, schemas, and fragments determine whether their syntax and form are correct (according to W3C schema) and whether they conform to the WS-I Basic Profile 1.1.

Question 010101

Consider the following SOAP message fragment:


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
        soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">       
    <soap:Body xmlns:ns1="http://example">
		...            
    </soap:Body>    
</soap:Envelope>
					
					
Is the message WS-I BP 1.1 conformant?

Options (select 1):

  1. Yes, it is comformant for all styles of SOAP messages.

  2. Yes, it is comformant for "rpc-encoded" binding only.

  3. Yes, it is comformant for "document-encoded" binding only.

  4. Yes, it is comformant for "rpc-encoded" and "document-encoded" bindings only.

  5. No, it is not comformant.

Answer:

Correct option is 5.

The soap:encodingStyle attribute is used to indicate the use of a particular scheme in the encoding of data into XML. However, this introduces complexity, as this function can also be served by the use of XML Namespaces. As a result, the Basic Profile prefers the use of literal, non-encoded XML.

R1005 A MESSAGE MUST NOT contain soap:encodingStyle attributes on any of the elements whose namespace name is "http://schemas.xmlsoap.org/soap/envelope/".

R1006 A MESSAGE MUST NOT contain soap:encodingStyle attributes on any element that is a child of soap:Body.

R1007 An ENVELOPE described in an rpc-literal binding MUST NOT contain soap:encodingStyle attribute on any element that is a grandchild of soap:Body.

Options 2, 3 and 4 are also wrong because BP 1.1 explicitly prohibits the rpc-encoded and document-encoded modes.

Sources:

Basic Profile Version 1.1 - http://www.ws-i.org/Profiles/BasicProfile-1.1.html

Professional hosting     Belorussian informational portal         Free SCWCD 1.4 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     Free IBM Certified Associate Developer Study Guide     Sun Certified Enterprise Architect for Java EE 5 Study Guide     Free SCDJWS 5.0 Study Guide