• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

when to use soap:mustUnderstand="1"

 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Could you please provide some info, when to use soap:mustUnderstand="1" (in real time example)

Everywhere given comments like, "it will be in header and server has to understand when value is 1", if server cannot understand then it has to generate fault. these comments are not much clear.

Thanks.
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
I'll give it a try, though I am not sure I can make it simpler.
Let's say I have four nodes (computers) A, B, C and D.
A client is running on node A, a server on node D. Finally, B and C are intermediary nodes; B passes messages on to C and C on to D.
If the client sends out a header block targeted at node C with the mustUnderstand attribute set to 0, then the client cannot know whether node C chooses to process the message or not.
If the client sends out a header block targeted at node B with the mustUnderstand attribute set to 1 and the client does not receive a fault, then the client can be sure that node B has processed the header block.
The mustUnderstand attribute can be used to force a node to process a header block. This is good if, for instance, the header block contain information that must reach the node.
On the other hand, there may be information that is not essential to the intermediary node. Then mustUnderstand can be set to 0, which allows the node to ignore the header block.
Best wishes!
 
Greenhorn
Posts: 1
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes that's right. If mustunderstand attribute is 1, any targeted node must process that header if not able to process that header it will generate faultCode "mustUnderstand" and send it to the client.
This is useful in case of implementing security and other meta services to the webservice. we can same receiver act as ultimate receiver and also other role like "Authetication Processor". we can put header info like userId and password for processing by this Authentication Processor, so when it is successfuly processed it will deliver to the real webservice otherwise generate a fault and send it to the client.

Most of the times developers combine authentication in webservice itself but best practice is to have seperate code block and targeted by header.

I hope this gives some more information on header.
 
Shankar sanjay
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nice explanation, thank You both
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic