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 testAssertionBinding1044(Binding binding, ErrorReporter errorReporter)
          Test assertion Binding-1044.
protected  boolean testAssertionBinding1045(Binding binding, ErrorReporter errorReporter)
          Test assertion Binding-1045.
protected  boolean testAssertionBinding1048(Binding binding, ErrorReporter errorReporter)
          Test assertion Binding-1048.
protected  boolean testAssertionBinding1049(Binding[] bindings, ErrorReporter errorReporter)
          Test assertion Binding-1049.
protected  boolean testAssertionBindingFault1050(BindingFault[] bindingFaults, ErrorReporter errorReporter)
          Test assertion BindingFault-1050.
protected  boolean testAssertionBindingFaultReference1055(BindingFaultReference[] bindingFaultReferences, ErrorReporter errorReporter)
          Test assertion BindingFaultReference-1055.
protected  boolean testAssertionBindingFaultReference1059(BindingFaultReference bindingFaultReference, ErrorReporter errorReporter)
          Test assertion BindingFaultReference-1059.
protected  boolean testAssertionBindingMessageReference1052(BindingMessageReference[] bindingMessageReferences, ErrorReporter errorReporter)
          Test assertion BindingMessageReference-1052.
protected  boolean testAssertionBindingOperation1051(BindingOperation[] bindingOperations, ErrorReporter errorReporter)
          Test assertion BindingOperation-1051.
protected  boolean testAssertionEndpoint1061(Endpoint endpoint, ErrorReporter errorReporter)
          Test assertion Endpoint-1061.
protected  boolean testAssertionEndpoint1062(Endpoint endpoint, ErrorReporter errorReporter)
          Test assertion Endpoint-1062.
protected  boolean testAssertionInterface1009(Interface interfac, ErrorReporter errorReporter)
          Test assertion Interface-1009.
protected  boolean testAssertionInterface1010(Interface[] interfaces, ErrorReporter errorReporter)
          Test assertion Interface-1010.
protected  boolean testAssertionInterfaceFaultReference1039(InterfaceFaultReference[] faultReferences, ErrorReporter errorReporter)
          Test assertion InterfaceFaultReference-1039.
protected  boolean testAssertionInterfaceMessageReference1028(InterfaceMessageReference messageReference, ErrorReporter errorReporter)
          Test assertion InterfaceMessageReference-1028.
protected  boolean testAssertionInterfaceMessageReference1029(InterfaceMessageReference[] messageReferences, ErrorReporter errorReporter)
          Test assertion InterfaceMessageReference-1029.
protected  boolean testAssertionMEP1022(java.net.URI pattern, ErrorReporter errorReporter)
          Test assertion MEP-1022.
protected  boolean testAssertionService1060(Service[] services, ErrorReporter errorReporter)
          Test assertion Service-1060.
 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 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

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.

testAssertionInterface1009

protected boolean testAssertionInterface1009(Interface interfac,
                                             ErrorReporter errorReporter)
                                      throws WSDLException
Test assertion Interface-1009. 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

testAssertionInterface1010

protected boolean testAssertionInterface1010(Interface[] interfaces,
                                             ErrorReporter errorReporter)
                                      throws WSDLException
Test assertion Interface-1010. 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

testAssertionMEP1022

protected boolean testAssertionMEP1022(java.net.URI pattern,
                                       ErrorReporter errorReporter)
                                throws WSDLException
Test assertion MEP-1022. 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

testAssertionInterfaceMessageReference1028

protected boolean testAssertionInterfaceMessageReference1028(InterfaceMessageReference messageReference,
                                                             ErrorReporter errorReporter)
                                                      throws WSDLException
Test assertion InterfaceMessageReference-1028. 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

testAssertionInterfaceMessageReference1029

protected boolean testAssertionInterfaceMessageReference1029(InterfaceMessageReference[] messageReferences,
                                                             ErrorReporter errorReporter)
                                                      throws WSDLException
Test assertion InterfaceMessageReference-1029. 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

testAssertionInterfaceFaultReference1039

protected boolean testAssertionInterfaceFaultReference1039(InterfaceFaultReference[] faultReferences,
                                                           ErrorReporter errorReporter)
                                                    throws WSDLException
Test assertion InterfaceFaultReference-1039. 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

testAssertionBinding1044

protected boolean testAssertionBinding1044(Binding binding,
                                           ErrorReporter errorReporter)
                                    throws WSDLException
Test assertion Binding-1044. 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

testAssertionBinding1045

protected boolean testAssertionBinding1045(Binding binding,
                                           ErrorReporter errorReporter)
                                    throws WSDLException
Test assertion Binding-1045. 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

testAssertionBinding1048

protected boolean testAssertionBinding1048(Binding binding,
                                           ErrorReporter errorReporter)
                                    throws WSDLException
Test assertion Binding-1048. 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

testAssertionBinding1049

protected boolean testAssertionBinding1049(Binding[] bindings,
                                           ErrorReporter errorReporter)
                                    throws WSDLException
Test assertion Binding-1049. 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

testAssertionBindingFault1050

protected boolean testAssertionBindingFault1050(BindingFault[] bindingFaults,
                                                ErrorReporter errorReporter)
                                         throws WSDLException
Test assertion BindingFault-1050. 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

testAssertionBindingOperation1051

protected boolean testAssertionBindingOperation1051(BindingOperation[] bindingOperations,
                                                    ErrorReporter errorReporter)
                                             throws WSDLException
Test assertion BindingOperation-1051. 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

testAssertionBindingMessageReference1052

protected boolean testAssertionBindingMessageReference1052(BindingMessageReference[] bindingMessageReferences,
                                                           ErrorReporter errorReporter)
                                                    throws WSDLException
Test assertion BindingMessageReference-1052. 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

testAssertionBindingFaultReference1055

protected boolean testAssertionBindingFaultReference1055(BindingFaultReference[] bindingFaultReferences,
                                                         ErrorReporter errorReporter)
                                                  throws WSDLException
Test assertion BindingFaultReference-1055. 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

testAssertionBindingFaultReference1059

protected boolean testAssertionBindingFaultReference1059(BindingFaultReference bindingFaultReference,
                                                         ErrorReporter errorReporter)
                                                  throws WSDLException
Test assertion BindingFaultReference-1059. 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

testAssertionService1060

protected boolean testAssertionService1060(Service[] services,
                                           ErrorReporter errorReporter)
                                    throws WSDLException
Test assertion Service-1060. 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

testAssertionEndpoint1061

protected boolean testAssertionEndpoint1061(Endpoint endpoint,
                                            ErrorReporter errorReporter)
                                     throws WSDLException
Test assertion Endpoint-1061. 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

testAssertionEndpoint1062

protected boolean testAssertionEndpoint1062(Endpoint endpoint,
                                            ErrorReporter errorReporter)
                                     throws WSDLException
Test assertion Endpoint-1062. 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 © 2005-2010 Apache Software Foundation. All Rights Reserved.