This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SOAP 1.2 Fault children qualified

 
Sim Kim
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • 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 ?
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • 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 ...
 
Chintan Rajyaguru
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
Faraz Ali
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic