File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes What is the difference between Optional and Ignorable WS-Policy attributes 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 "What is the difference between Optional and Ignorable WS-Policy attributes" Watch "What is the difference between Optional and Ignorable WS-Policy attributes" New topic
Author

What is the difference between Optional and Ignorable WS-Policy attributes

Kamal Tripathi
Ranch Hand

Joined: Oct 02, 2008
Posts: 86
Quoting from Ivan's notes

The following policy expression requires:
•Addressing.
•Optionally MIME-serialization.
• Transport or message-level security. Additionally there is a policy assertion informing clients that the service performs logging of some kind. This policy assertion may be completely ignored, as specified by the wsp:Ignorable attribute.



Don't both mean the same here??

Kamal Tripathi
SCJP 1.4 90%, SCWCD5 94%, Next SCDJWS--> In Naescent stage. Researching abt exam and material itself.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
First of all, this is the policy expression discussed:


The <All> element means that all contained policies are required (but it is not as simple, so read on! ).
The <mtom:OptimizedMimeSerialization> element says that MIME serialization is required, until we encounter the Optional attribute, which suddenly makes MIME serialization optional. Note that the Optional attribute only affects the MIME serialization policy!
The <wsam:Addressing> element says that addressing is required. Period.
The <log:Logging> element says that logging is required, until we see the Ignorable attribute with a value "true" which tells us that the requirement regarding logging may be ignored. Again, this only affects the policy element in which the Ignorable attribute appears, which is logging.
Then there is an <ExaclyOne> element, which means that exactly one of the policies contained in this element is required.
Hope this clarifies!
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Kamal Tripathi
Ranch Hand

Joined: Oct 02, 2008
Posts: 86
Ivan,

thanks for the reply. However probably my question was not clear. I already understood each policy expression element from your notes. However I was confused how using Optional and Ignorable elements affects each expression. So in this example if we consider the following snippet.



How would it impact the overall policy if I rewrite it like this (note I have switched the attributes)



Point being that if each attribute causes the particular policy to be optional/ignorable (which I am taking means implementer may or may not implement it), why two attributes, why not just one.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the difference between Optional and Ignorable WS-Policy attributes