org.apache.woden.internal.wsdl20.validation
Class WSDLComponentValidator

java.lang.Object
  extended by org.apache.woden.internal.wsdl20.validation.WSDLComponentValidator

public class WSDLComponentValidator
extends java.lang.Object

The WSDL component validator can validate a WSDL 2.0 component model against the assertions defined in the WSDL 2.0 specification. The WSDL 2.0 component assertions are currently available in the non-normative version of the WSDL 2.0 specification and can be viewed at http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/wsdl20/wsdl20.html?content-type=text/html;%20charset=utf-8#assertionsummary


Constructor Summary
WSDLComponentValidator()
           
 
Method Summary
protected  boolean testAssertionBinding0054(Binding binding, ErrorReporter errorReporter)
          Test assertion Binding-0054.
protected  boolean testAssertionBinding0055(Binding binding, ErrorReporter errorReporter)
          Test assertion Binding-0055.
protected  boolean testAssertionBinding0056(Binding binding, ErrorReporter errorReporter)
          Test assertion Binding-0056.
protected  boolean testAssertionBinding0057(Binding[] bindings, ErrorReporter errorReporter)
          Test assertion Binding-0057.
protected  boolean testAssertionBindingFault0058(BindingFault[] bindingFaults, ErrorReporter errorReporter)
          Test assertion BindingFault-0058.
protected  boolean testAssertionBindingFaultReference0061(BindingFaultReference[] bindingFaultReferences, ErrorReporter errorReporter)
          Test assertion BindingFaultReference-0061.
protected  boolean testAssertionBindingFaultReference0062(BindingFaultReference bindingFaultReference, ErrorReporter errorReporter)
          Test assertion BindingFaultReference-0062.
protected  boolean testAssertionBindingMessageReference0060(BindingMessageReference[] bindingMessageReferences, ErrorReporter errorReporter)
          Test assertion BindingMessageReference-0060.
protected  boolean testAssertionBindingOperation0059(BindingOperation[] bindingOperations, ErrorReporter errorReporter)
          Test assertion BindingOperation-0059.
protected  boolean testAssertionEndpoint0064(Endpoint endpoint, ErrorReporter errorReporter)
          Test assertion Endpoint-0064.
protected  boolean testAssertionEndpoint0065(Endpoint[] endpoints, ErrorReporter errorReporter)
          Test assertion Endpoint-0065.
protected  boolean testAssertionEndpoint0066(Endpoint endpoint, ErrorReporter errorReporter)
          Test assertion Endpoint-0066.
protected  boolean testAssertionInterface0027(Interface interfac, ErrorReporter errorReporter)
          Test assertion Interface-0027.
protected  boolean testAssertionInterface0030(Interface[] interfaces, ErrorReporter errorReporter)
          Test assertion Interface-0030.
protected  boolean testAssertionInterfaceFault0028(InterfaceFault interfaceFault, Interface interfac, ErrorReporter errorReporter)
          Test assertion InterfaceFault-0028.
protected  boolean testAssertionInterfaceFault0032(InterfaceFault[] interfaceFaults, ErrorReporter errorReporter)
          Test assertion InterfaceFault-0032.
protected  boolean testAssertionInterfaceFaultReference0045(InterfaceFaultReference[] faultReferences, ErrorReporter errorReporter)
          Test assertion InterfaceFaultReference-0045.
protected  boolean testAssertionInterfaceMessageReference0041(InterfaceMessageReference messageReference, ErrorReporter errorReporter)
          Test assertion InterfaceMessageReference-0041.
protected  boolean testAssertionInterfaceMessageReference0042(InterfaceMessageReference[] messageReferences, ErrorReporter errorReporter)
          Test assertion InterfaceMessageReference-0042.
protected  boolean testAssertionInterfaceOperation0029(InterfaceOperation interfaceOperation, Interface interfac, ErrorReporter errorReporter)
          Test assertion InterfaceOperation-0029.
protected  boolean testAssertionInterfaceOperation0035(InterfaceOperation[] interfaceOperations, ErrorReporter errorReporter)
          Test assertion InterfaceOperation-0035.
protected  boolean testAssertionMEP0037(java.net.URI pattern, ErrorReporter errorReporter)
          Test assertion MEP-0037.
protected  boolean testAssertionService0063(Service[] services, ErrorReporter errorReporter)
          Test assertion Service-0063.
 void validate(Description desc, ErrorReporter errorReporter)
          Validate the WSDL 2.0 component model described by the description component.
protected  void validateBindingFaultReferences(BindingFaultReference[] bindingFaultReferences, Description desc, ErrorReporter errorReporter)
          Validate the binding fault references in the WSDL component model.
protected  void validateBindingFaults(BindingFault[] bindingFaults, Description desc, ErrorReporter errorReporter)
          Validate the binding faults in the WSDL component model.
protected  void validateBindingMessageReferences(BindingMessageReference[] bindingMessageReferences, Description desc, ErrorReporter errorReporter)
          Validate the binding message references in the WSDL component model.
protected  void validateBindingOperations(BindingOperation[] bindingOperations, Description desc, ErrorReporter errorReporter)
          Validate the binding operations in the WSDL component model.
protected  void validateBindings(Binding[] bindings, Description desc, ErrorReporter errorReporter)
          Validate the bindings in the WSDL component model.
protected  void validateEndpoints(Endpoint[] endpoints, Description desc, ErrorReporter errorReporter)
          Validate the endpoints in a service component in the WSDL component model.
protected  void validateInterfaceFaultReferences(InterfaceFaultReference[] faultReferences, ErrorReporter errorReporter)
          Validate the interface fault references in the WSDL component model.
protected  void validateInterfaceFaults(Interface interfac, InterfaceFault[] interfaceFaults, ErrorReporter errorReporter)
          Validate the interface faults in the WSDL component model.
protected  void validateInterfaceMessageReferences(InterfaceMessageReference[] messageReferences, ErrorReporter errorReporter)
          Validate the interface message references in the WSDL component model.
protected  void validateInterfaceOperations(Interface interfac, InterfaceOperation[] interfaceOperations, ErrorReporter errorReporter)
          Validate the interface operations in the WSDL component model.
protected  void validateInterfaces(Interface[] interfaces, ErrorReporter errorReporter)
          Validate the interfaces in the WSDL component model.
protected  void validateServices(Service[] services, Description desc, ErrorReporter errorReporter)
          Validate the services in the WSDL component model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSDLComponentValidator

public WSDLComponentValidator()
Method Detail

validate

public void validate(Description desc,
                     ErrorReporter errorReporter)
              throws WSDLException
Validate the WSDL 2.0 component model described by the description component.

Parameters:
desc - The description component of the WSDL 2.0 component model.
errorReporter - An error reporter to be used for reporting errors found with the model.
Throws:
WSDLException - A WSDLException is thrown if a problem occurs while validating the WSDL 2.0 component model.

validateInterfaces

protected void validateInterfaces(Interface[] interfaces,
                                  ErrorReporter errorReporter)
                           throws WSDLException
Validate the interfaces in the WSDL component model.

Parameters:
interfaces - The interfaces in the WSDL component model.
errorReporter - An error reporter to be used for reporting errors.
Throws:
WSDLException - A WSDLException is thrown if a problem occurs while validating the interface components.

validateInterfaceOperations

protected void validateInterfaceOperations(Interface interfac,
                                           InterfaceOperation[] interfaceOperations,
                                           ErrorReporter errorReporter)
                                    throws WSDLException
Validate the interface operations in the WSDL component model.

Parameters:
interfac - The interface that contains the interface operations.
interfaceOperations - An array of the interface operations.
errorReporter - An error reporter.
Throws:
WSDLException

validateInterfaceFaults

protected void validateInterfaceFaults(Interface interfac,
                                       InterfaceFault[] interfaceFaults,
                                       ErrorReporter errorReporter)
                                throws WSDLException
Validate the interface faults in the WSDL component model.

Parameters:
interfac - The interface that contains the interface faults.
interfaceFaults - An array of the interface faults.
errorReporter - An error reporter.
Throws:
WSDLException

validateInterfaceMessageReferences

protected void validateInterfaceMessageReferences(InterfaceMessageReference[] messageReferences,
                                                  ErrorReporter errorReporter)
                                           throws WSDLException
Validate the interface message references in the WSDL component model.

Parameters:
messageReferences - An array containing the interface message references.
errorReporter - An error reporter.
Throws:
WSDLException

validateInterfaceFaultReferences

protected void validateInterfaceFaultReferences(InterfaceFaultReference[] faultReferences,
                                                ErrorReporter errorReporter)
                                         throws WSDLException
Validate the interface fault references in the WSDL component model.

Parameters:
faultReferences - An array containing the interface fault references.
errorReporter - An error reporter.
Throws:
WSDLException

validateBindings

protected void validateBindings(Binding[] bindings,
                                Description desc,
                                ErrorReporter errorReporter)
                         throws WSDLException
Validate the bindings in the WSDL component model.

Parameters:
bindings - The bindings in the WSDL component model.
desc - The WSDL 2.0 description component.
errorReporter - An error reporter to be used for reporting errors.
Throws:
WSDLException - A WSDLException is thrown if a problem occurs while validating the binding components.

validateBindingOperations

protected void validateBindingOperations(BindingOperation[] bindingOperations,
                                         Description desc,
                                         ErrorReporter errorReporter)
                                  throws WSDLException
Validate the binding operations in the WSDL component model.

Parameters:
bindingOperations - The bindings operations in the WSDL component model.
desc - The WSDL 2.0 description component.
errorReporter - An error reporter to be used for reporting errors.
Throws:
WSDLException - A WSDLException is thrown if a problem occurs while validating the binding operation components.

validateBindingMessageReferences

protected void validateBindingMessageReferences(BindingMessageReference[] bindingMessageReferences,
                                                Description desc,
                                                ErrorReporter errorReporter)
                                         throws WSDLException
Validate the binding message references in the WSDL component model.

Parameters:
bindingMessageReferences - The bindings message references in the WSDL component model.
desc - The WSDL 2.0 description component.
errorReporter - An error reporter to be used for reporting errors.
Throws:
WSDLException - A WSDLException is thrown if a problem occurs while validating the binding message reference components.

validateBindingFaultReferences

protected void validateBindingFaultReferences(BindingFaultReference[] bindingFaultReferences,
                                              Description desc,
                                              ErrorReporter errorReporter)
                                       throws WSDLException
Validate the binding fault references in the WSDL component model.

Parameters:
bindingFaultReferences - The bindings fault references in the WSDL component model.
desc - The WSDL 2.0 description component.
errorReporter - An error reporter to be used for reporting errors.
Throws:
WSDLException - A WSDLException is thrown if a problem occurs while validating the binding fault reference components.

validateBindingFaults

protected void validateBindingFaults(BindingFault[] bindingFaults,
                                     Description desc,
                                     ErrorReporter errorReporter)
                              throws WSDLException
Validate the binding faults in the WSDL component model.

Parameters:
bindingFaults - The bindings faults in the WSDL component model.
desc - The WSDL 2.0 description component.
errorReporter - An error reporter to be used for reporting errors.
Throws:
WSDLException - A WSDLException is thrown if a problem occurs while validating the binding fault components.

validateServices

protected void validateServices(Service[] services,
                                Description desc,
                                ErrorReporter errorReporter)
                         throws WSDLException
Validate the services in the WSDL component model.

Parameters:
services - The services in the WSDL component model.
desc - The WSDL 2.0 description component.
errorReporter - An error reporter to be used for reporting errors.
Throws:
WSDLException - A WSDLException is thrown if a problem occurs while validating the service components.

validateEndpoints

protected void validateEndpoints(Endpoint[] endpoints,
                                 Description desc,
                                 ErrorReporter errorReporter)
                          throws WSDLException
Validate the endpoints in a service component in the WSDL component model.

Parameters:
endpoints - The endpoints in a service in the WSDL component model.
desc - The WSDL 2.0 description component.
errorReporter - An error reporter to be used for reporting errors.
Throws:
WSDLException - A WSDLException is thrown if a problem occurs while validating the endpoint components.

testAssertionInterface0027

protected boolean testAssertionInterface0027(Interface interfac,
                                             ErrorReporter errorReporter)
                                      throws WSDLException
Test assertion Interface-0027. An interface cannot appear, either directly or indirectly, in the list of interfaces it extends.

Parameters:
interfac - The interface to check.
errorReporter - The error reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionInterface0030

protected boolean testAssertionInterface0030(Interface[] interfaces,
                                             ErrorReporter errorReporter)
                                      throws WSDLException
Test assertion Interface-0030. An interface must have a unique name out of all the interfaces in the description component.

Parameters:
interfaces - The interfaces in the description component.
errorReporter - The error reporter.
Returns:
True if all the interfaces have unique names, false otherwise.
Throws:
WSDLException

testAssertionMEP0037

protected boolean testAssertionMEP0037(java.net.URI pattern,
                                       ErrorReporter errorReporter)
                                throws WSDLException
Test assertion MEP-0037. A message exchange pattern must be an absolute IRI.

Parameters:
pattern - The message exchange pattern to check.
errorReporter - The error reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionInterfaceOperation0029

protected boolean testAssertionInterfaceOperation0029(InterfaceOperation interfaceOperation,
                                                      Interface interfac,
                                                      ErrorReporter errorReporter)
                                               throws WSDLException
Test assertion InterfaceOperation-0029. The namespace name of the interface operation must be the same as the namespace name of the interface.

Parameters:
interfaceOperation - The interface operation to check the namespace of.
interfac - The interface parent of the interface operation.
errorReporter - The error reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionInterfaceOperation0035

protected boolean testAssertionInterfaceOperation0035(InterfaceOperation[] interfaceOperations,
                                                      ErrorReporter errorReporter)
                                               throws WSDLException
Test assertion InterfaceOperation-0035. An interface operation must have a unique name out of all the interface operations defined in an interface component.

Parameters:
interfaceOperations - The interface operations to check for duplicate names.
errorReporter - The error reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionInterfaceFault0032

protected boolean testAssertionInterfaceFault0032(InterfaceFault[] interfaceFaults,
                                                  ErrorReporter errorReporter)
                                           throws WSDLException
Test assertion InterfaceFault-0032. An interface fault must have a unique name out of all the interface faults defined in an interface component.

Parameters:
interfaceFaults - The interface faults to check for duplicate names.
errorReporter - The error reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionInterfaceFault0028

protected boolean testAssertionInterfaceFault0028(InterfaceFault interfaceFault,
                                                  Interface interfac,
                                                  ErrorReporter errorReporter)
                                           throws WSDLException
Test assertion InterfaceFault-0028. The namespace name of the interface fault must be the same as the namespace name of the interface.

Parameters:
interfaceFault - The interface fault to check the namespace of.
interfac - The interface parent of the interface fault.
errorReporter - The error reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionInterfaceMessageReference0041

protected boolean testAssertionInterfaceMessageReference0041(InterfaceMessageReference messageReference,
                                                             ErrorReporter errorReporter)
                                                      throws WSDLException
Test assertion InterfaceMessageReference-0041. When the {message content model} property has the value #any or #none the {element declaration} property MUST be empty.

Parameters:
messageReference - The interface message reference to check the message content model and element declarations.
errorReporter - The error reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionInterfaceMessageReference0042

protected boolean testAssertionInterfaceMessageReference0042(InterfaceMessageReference[] messageReferences,
                                                             ErrorReporter errorReporter)
                                                      throws WSDLException
Test assertion InterfaceMessageReference-0042. For each Interface Message Reference component in the {interface message references} property of an Interface Operation component, its {message label} property MUST be unique.

Parameters:
messageReferences - The message references to check for duplicate names.
errorReporter - The error reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionInterfaceFaultReference0045

protected boolean testAssertionInterfaceFaultReference0045(InterfaceFaultReference[] faultReferences,
                                                           ErrorReporter errorReporter)
                                                    throws WSDLException
Test assertion InterfaceFaultReference-0045. For each Interface Fault Reference component in the {interface fault references} property of an Interface Operation component, the combination of its {interface fault} and {message label} properties MUST be unique.

Parameters:
faultReferences - The fault references to check for duplicate fault/message label pairs.
errorReporter - The error reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionBinding0054

protected boolean testAssertionBinding0054(Binding binding,
                                           ErrorReporter errorReporter)
                                    throws WSDLException
Test assertion Binding-0054. If a Binding component specifies any operation-specific binding details (by including Binding Operation components) or any fault binding details (by including Binding Fault components) then it MUST specify an interface the Binding component applies to, so as to indicate which interface the operations come from.

Parameters:
binding - The binding for which to check the contstraint.
errorReporter - The error Reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionBinding0055

protected boolean testAssertionBinding0055(Binding binding,
                                           ErrorReporter errorReporter)
                                    throws WSDLException
Test assertion Binding-0055. A Binding component that defines bindings for an Interface component MUST define bindings for all the operations of that Interface component.

Parameters:
binding - The binding of which to check the binding operations.
errorReporter - The error reporter.
Returns:
True if the all the operations specified on the interface have bindings defined, false otherwise.
Throws:
WSDLException

testAssertionBinding0056

protected boolean testAssertionBinding0056(Binding binding,
                                           ErrorReporter errorReporter)
                                    throws WSDLException
Test assertion Binding-0056. The binding type xs:anyURI MUST be an absolute IRI as defined by [IETF RFC 3987].

Parameters:
binding - The binding of which to check the type.
errorReporter - The error reporter.
Returns:
True if the type is absolute, false otherwise.
Throws:
WSDLException

testAssertionBinding0057

protected boolean testAssertionBinding0057(Binding[] bindings,
                                           ErrorReporter errorReporter)
                                    throws WSDLException
Test assertion Binding-0057. For each Binding component in the {bindings} property of a Description component, the {name} property MUST be unique.

Parameters:
bindings - The bindings in the description component.
errorReporter - The error reporter.
Returns:
True if the all the bindings have unique names, false otherwise.
Throws:
WSDLException

testAssertionBindingFault0058

protected boolean testAssertionBindingFault0058(BindingFault[] bindingFaults,
                                                ErrorReporter errorReporter)
                                         throws WSDLException
Test assertion BindingFault-0058. For each Binding Fault component in the {binding faults} property of a Binding component, the {interface fault} property MUST be unique.

Parameters:
bindingFaults - The binding faults in the description component.
errorReporter - The error reporter.
Returns:
True if the all the bindings have unique names, false otherwise.
Throws:
WSDLException

testAssertionBindingOperation0059

protected boolean testAssertionBindingOperation0059(BindingOperation[] bindingOperations,
                                                    ErrorReporter errorReporter)
                                             throws WSDLException
Test assertion BindingOperation-0059. For each Binding Operation component in the {binding operations} property of a Binding component, the {interface operation} property MUST be unique.

Parameters:
bindingOperations - The binding operations to check for unique interface operations.
errorReporter - The error reporter.
Returns:
True if the all the binding operations have specified unique interface operations, false otherwise.
Throws:
WSDLException

testAssertionBindingMessageReference0060

protected boolean testAssertionBindingMessageReference0060(BindingMessageReference[] bindingMessageReferences,
                                                           ErrorReporter errorReporter)
                                                    throws WSDLException
Test assertion BindingMessageReference-0060. For each Binding Message Reference component in the {binding message references} property of a Binding Operation component, the {interface message reference} property MUST be unique.

Parameters:
bindingMessageReferences - The binding message references to check for unique interface message references.
errorReporter - The error reporter.
Returns:
True if the all the binding message references have specified unique interface message references, false otherwise.
Throws:
WSDLException

testAssertionBindingFaultReference0061

protected boolean testAssertionBindingFaultReference0061(BindingFaultReference[] bindingFaultReferences,
                                                         ErrorReporter errorReporter)
                                                  throws WSDLException
Test assertion BindingFaultReference-0061. For each Binding Fault Reference component in the {binding fault references} property of a Binding Operation component, the {interface fault reference} property MUST be unique.

Parameters:
bindingFaultReferences - The binding fault references to check for unique interface fault references.
errorReporter - The error reporter.
Returns:
True if the all the binding fault references have specified unique interface fault references, false otherwise.
Throws:
WSDLException

testAssertionBindingFaultReference0062

protected boolean testAssertionBindingFaultReference0062(BindingFaultReference bindingFaultReference,
                                                         ErrorReporter errorReporter)
                                                  throws WSDLException
Test assertion BindingFaultReference-0062. There MUST be an Interface Fault Reference component in the {interface fault references} of the Interface Operation being bound with {message label} equal to the effective message label and with {interface fault} equal to an Interface Fault component with {name} equal to the actual value of the ref attribute information item.

Parameters:
bindingFaultReference - The binding fault reference to check if the specified interface fault reference exists.
errorReporter - The error reporter.
Returns:
True if the binding fault reference specifies a valid interface fault reference, false otherwise.
Throws:
WSDLException

testAssertionService0063

protected boolean testAssertionService0063(Service[] services,
                                           ErrorReporter errorReporter)
                                    throws WSDLException
Test assertion Service-0063. For each Service component in the {services} property of a Description component, the {name} property MUST be unique.

Parameters:
services - An array containing all the services in the description component.
errorReporter - The error reporter.
Returns:
True if all services contain unique names, false otherwise.
Throws:
WSDLException

testAssertionEndpoint0065

protected boolean testAssertionEndpoint0065(Endpoint[] endpoints,
                                            ErrorReporter errorReporter)
                                     throws WSDLException
Test assertion Endpoint-0065. For each Endpoint component in the {endpoints} property of a Service component, the {name} property MUST be unique.

Parameters:
endpoints - An array containing all the endpoints for a service in the description component.
errorReporter - The error reporter.
Returns:
True if all endpoints in the array contain unique names, false otherwise.
Throws:
WSDLException

testAssertionEndpoint0064

protected boolean testAssertionEndpoint0064(Endpoint endpoint,
                                            ErrorReporter errorReporter)
                                     throws WSDLException
Test assertion Endpoint-0064. This xs:anyURI MUST be an absolute IRI as defined by [IETF RFC 3987]. This xs:anyURI refers to the address IRI.

Parameters:
endpoint - The endpoint of which the address should be checked.
errorReporter - The error reporter.
Returns:
True if the address IRI is absolute, false otherwise.
Throws:
WSDLException

testAssertionEndpoint0066

protected boolean testAssertionEndpoint0066(Endpoint endpoint,
                                            ErrorReporter errorReporter)
                                     throws WSDLException
Test assertion Endpoint-0066. For each Endpoint component in the {endpoints} property of a Service component, the {binding} property MUST either be a Binding component with an unspecified {interface} property or a Binding component with an {interface} property equal to the {interface} property of the Service component.

Parameters:
endpoint - The endpoint of which the binding should be checked.
errorReporter - The error reporter.
Returns:
True if the binding specified the interface specified by the service or no interface, false otherwise.
Throws:
WSDLException


Copyright © 2007. All Rights Reserved.