File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes SOAP 1.2 Fault children qualified Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "SOAP 1.2 Fault children qualified" Watch "SOAP 1.2 Fault children qualified" New topic

SOAP 1.2 Fault children qualified

Sim Kim
Ranch Hand

Joined: Aug 06, 2004
Posts: 268
Hi All,

I created a WebService using SOAP 1.2 bindings and the SOAP Fault which I got looked like this :

The chilren of Fault are qualified .

In SOAP 1.1 , I get the following message :

Is this a change in SOAP 1.2 ?
Peer Reynders

Joined: Aug 19, 2005
Posts: 2906
SOAP 1.1
4.4 SOAP Fault

The schema does not specify an 'elementFormDefault' attribute. That means that it defaults to "unqualified". This means that (local) subelements are not namespace qualified. Therefore faultcode, etc MUST be unqualified which is emphasized by the WS-I Basic Profile 1.0
4.1.3 SOAP Faults and Namespaces

SOAP 1.2
The schema specifies 'elementFormDefault="qualified"' which means that local subelements are namespace qualified. That means that the subelements of {}Fault have to have a namespace prefix as their namespace isn't the default namespace.

The 'elementFormDefault' issue is discussed at length here. It is at this point that I really started to hate XML Schema ...

"Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
Chintan Rajyaguru
Ranch Hand

Joined: Aug 19, 2001
Posts: 341
Also, it is important to note that the new exam uses Basic Profile 1.1, which still refers to SOAP 1.1 and states that the children of fault must be unqualified but the details tag under fault can have qualified elements. So, your first sample is SOAP 1.2 valid but not Basic Profile 1.1 compliant. - Coming soon!
Sim Kim
Ranch Hand

Joined: Aug 06, 2004
Posts: 268
But the exam also refers to SOAP 1.2 .
So how do we deal any such question in exam ?
[ November 13, 2008: Message edited by: Sim Kim ]
Chintan Rajyaguru
Ranch Hand

Joined: Aug 19, 2001
Posts: 341
No right answer here but here is what I would do:
If it's an interoperability question, use SOAP 1.1
If it's a SOAP question use SOAP 1.2
If in doubt use SOAP 1.1 because that's what is referenced most of the time.
Faraz Ali
Ranch Hand

Joined: May 15, 2008
Posts: 108
Hi Sim Kim,

Thanks for pointing out this issue. I fear that i studied SOAP 1.1. Now started reading SOAP 1.2. Here is a point about SOAP fault.

In SOAP 1.2, faultcode, faultstring, actor are changed to Code, Reason and Role. And it defines a new element Node.

Can you mention any good articles which describe the differences between SOAP 1.1 and 1.2? And what do you think how big is the change from 1.1 to 1.2?

Sim Kim
Ranch Hand

Joined: Aug 06, 2004
Posts: 268
Here is one article which give the difference :
I agree. Here's the link:
subject: SOAP 1.2 Fault children qualified
Similar Threads
Did not understand "MustUnderstand" header(s)
Throwing Fault
Problem in Throwing Exception
Defining a detail element for a fault in a WSDL
Why Getting Fault Code in SOAP Response Message