[Logo]
Forums Register Login
a mock question from Xyzws
here is the question
Could anyone explain why the answer shoulb be 2)



Question No: 23 (Question ID: 2010) Catagory : SOAP

Problem

A SOAP Fault is a SOAP message that has a single child element of the soap:Body element, that element being a soap:Fault element. Which soap:Fault statement is correct based on WS-I Basic Profile 1.0a?


Options

Select 1 correct option.

1.
<soap:Fault xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' >
<soap:faultcode>soap:Client</soap:faultcode>
<soap:faultstring>Invalid message format</soap:faultstring>
<soap:faultactor>http://example.org/someactor</soap:faultactor>
<soap etail>
<m:msg xmlns:m='http://example.org/faults/exceptions'>
There were lots of elements in the message that
I did not understand
</m:msg>
</soap etail>
</soap:Fault>



2.

<soap:Fault xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'
xmlns='' >
<faultcode>soap:Client</faultcode>
<faultstring>Invalid message format</faultstring>
<faultactor>http://example.org/someactor</faultactor>
<detail>
<m:msg xmlns:m='http://example.org/faults/exceptions'>
There were lots of elements in the message that
I did not understand
</m:msg>
</detail>
</soap:Fault>



many thanks
i got the reason,

thanks anyway
Would you like to share the "reason" with us?
#2 seems better to me as it doesn't specify the soap namespace for the four elements of the Fault section.

Cheers,
Dan
The document 'Basic Profile Version 1.0' at http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16431776 says -

4.1.3 SOAP Faults and Namespaces

The children of the soap:Fault element are local to that element, therefore namespace qualification is unnecessary.

R1001 When a MESSAGE contains a soap:Fault element its element children MUST be unqualified.

Regards,
Dan

This thread has been viewed 820 times.

All times above are in ranch (not your local) time.
The current ranch time is
Oct 16, 2018 02:30:50.