• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

SOAP 1.2 Fault children qualified

 
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SOAP 1.1
4.4 SOAP Fault

The http://schemas.xmlsoap.org/soap/envelope/ 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 http://www.w3.org/2003/05/soap-envelope/ schema specifies 'elementFormDefault="qualified"' which means that local subelements are namespace qualified. That means that the subelements of {http://www.w3.org/2003/05/soap-envelope/}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 ...
 
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sim Kim
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

Thanks,
 
Sim Kim
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is one article which give the difference :

http://www.idealliance.org/papers/xmle02/dx_xmle02/papers/02-02-02/02-02-02.html
 
Your mother was a hamster and your father was a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic