ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Ws Wiki] Update of "FrontPage/Woden/ValidationAPI" by LawrenceMandel
Date Tue, 11 Dec 2007 03:23:29 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ws Wiki" for change notification.

The following page has been changed by LawrenceMandel:
http://wiki.apache.org/ws/FrontPage/Woden/ValidationAPI

------------------------------------------------------------------------------
  The following are two potential assertion interfaces with pros and cons:
  
   1. {{{
- public Interface IAssertion {
+ public Interface Assertion {
    public void validate(Description desc, ErrorReporter errorReporter);
  }
  }}}
@@ -30, +30 @@

     * Every assertion must traverse the WSDL tree (performance)
  
   2. {{{
- public Interface IAssertion {
+ public Interface Assertion {
    public void validate(Object wsdlObj, Description desc, ErrorReporter errorReporter);
  }
  }}}
@@ -43, +43 @@

  
  
  == Goal 3: Allow for specification of dependencies among assertions ==
- It seems to me that the best way to declare dependencies is when registering an assertion
with Woden. An assertion can be registered via a method on WSDLReader such as 
+ Assertion classes need to be specified to Woden in order for Woden to pick them up and use
them for validation. The following are two possible ways to specify an assertion with Woden.

  
+  1. An assertion can be registered via a method on WSDLReader such as {{{
- {{{public void registerAssertion(IAssertion assertion, String id, String dependencies);}}}
+ public void registerAssertion(IAssertion assertion, String id, String dependencies);
+ }}}where {{{id}}} is the assertion id and {{{dependencies}}} is a comma separated list of
assertion ids for assertions that this assertion depends. 
+   * Pros: 
+    * Allows for multiple instances of the WSDL 2.0 validating parser to be configured differently
within the same runtime
+    * This approach makes it very clear what assertions have been registered as they must
all be registered manually  (note that Woden can register all of the WSDL 2.0 assertions internally
so clients will not have to reference all of the Woden assertion classes)
+   * Cons: 
+    * This approach requires work by clients as they must manually register all extensions
+  2. Assertions can be automatically discovered by Woden at runtime. Automatic discovery
will still require some way of specifying dependencies. Dependencies can be specified using
an Assertion XML file (such as the service XML file Axis2 uses for registering services):{{{
+ <assertions xmlns="http://ws.apache.org/woden/assertion">
+   <assertion id="ASSERTION_ID" 
+              class="org.apache.woden.internal.validation.Assertion" 
+              depends="ASSERTION_ID1,ASSERTION_ID2"/>
+ </assertions>
+ }}}Alternatively dependencies can be worked into the Assertion interface (by having a {{{getDependencies()}}}
method) such as:{{{
+ public String getDependencies();
+ }}}
  
- where {{{id}}} is the assertion id and {{{dependencies}}} is a comma separated list of assertion
ids for assertions that this assertion depends. 
- 

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@ws.apache.org
For additional commands, e-mail: general-help@ws.apache.org


Mime
View raw message