• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

a mock question from Xyzws  RSS feed

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Shouton Eulle
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got the reason,

thanks anyway
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would you like to share the "reason" with us?
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
#2 seems better to me as it doesn't specify the soap namespace for the four elements of the Fault section.

Cheers,
Dan
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!