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

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

public class WSDLDocumentValidator
extends java.lang.Object

The WSDL document validator validates a WSDL XML model against the document assertions specified in the WSDL 2.0 specification.


Constructor Summary
WSDLDocumentValidator()
           
 
Method Summary
protected  boolean testAssertionDescription1006(DescriptionElement descElement, ErrorReporter errorReporter)
          Test assertion Description-1006.
protected  boolean testAssertionInterface1012(InterfaceElement interfaceElem, ErrorReporter errorReporter)
          Test assertion Interface-1012.
protected  boolean testAssertionQNameResolution1064ForInterfaceFaultReference(InterfaceFaultReferenceElement faultReference, ErrorReporter errorReporter)
          Test assertion QName-resolution-1064 for an InterfaceFaultReference element.
protected  boolean testAssertionSchema1066(DescriptionElement descElement, QName qualifiedName, ErrorReporter errorReporter)
          Test assertion Schema-1066.
protected  boolean testAssertionSchema1069(ImportedSchema schema, ErrorReporter errorReporter)
          Test assertion Schema-1069.
protected  boolean testAssertionSchema1070(ImportedSchema schema, ErrorReporter errorReporter)
          Test assertion Schema-1070.
protected  boolean testAssertionSchema1073(InlinedSchema[] schema, ErrorReporter errorReporter)
          Test assertion Schema-1073.
 boolean validate(DescriptionElement descElement, ErrorReporter errorReporter)
          Validate the document representation of the WSDL document against the WSDL 2.0 specification.
protected  boolean validateInterfaceFaultReferences(DescriptionElement descElement, InterfaceFaultReferenceElement[] faultReferences, ErrorReporter errorReporter)
          Validate the InterfaceFaultReference elements.
protected  boolean validateInterfaceFaults(DescriptionElement descElement, InterfaceFaultElement[] faultElements, ErrorReporter errorReporter)
          Validate the InterfaceFault elements.
protected  boolean validateInterfaceMessageReferences(DescriptionElement descElement, InterfaceMessageReferenceElement[] messageReferences, ErrorReporter errorReporter)
          Validate the InterfaceMessageReference elements.
protected  boolean validateInterfaceOperations(DescriptionElement descElement, InterfaceOperationElement[] interfaceOperations, ErrorReporter errorReporter)
          Validate the InterfaceOperation elements.
protected  boolean validateInterfaces(DescriptionElement descElement, InterfaceElement[] interfaces, ErrorReporter errorReporter)
          Validate the contents of the interface element.
protected  boolean validateTypes(TypesElement types, ErrorReporter errorReporter)
          Validate the contents of the types element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSDLDocumentValidator

public WSDLDocumentValidator()
Method Detail

validate

public boolean validate(DescriptionElement descElement,
                        ErrorReporter errorReporter)
                 throws WSDLException
Validate the document representation of the WSDL document against the WSDL 2.0 specification.

Parameters:
descElement - The WSDL 2.0 XML model description element.
errorReporter - The error reporter to use for any errors.
Returns:
True if the WSDL document representation is valid, false otherwise.
Throws:
WSDLException

validateTypes

protected boolean validateTypes(TypesElement types,
                                ErrorReporter errorReporter)
                         throws WSDLException
Validate the contents of the types element. This method runs the assertion tests for inline and imported types.

Parameters:
types - The types element of which to validate the contents.
errorReporter - The error reporter.
Returns:
True if all the types related assertions pass, false otherwise.
Throws:
WSDLException

validateInterfaces

protected boolean validateInterfaces(DescriptionElement descElement,
                                     InterfaceElement[] interfaces,
                                     ErrorReporter errorReporter)
                              throws WSDLException
Validate the contents of the interface element. This method runs the assertion tests for interface element components.

Parameters:
interfaces - An array of interface elements for which to validate the contents.
errorReporter - The error reporter.
Returns:
True if all the interface related assertions pass, false otherwise.
Throws:
WSDLException

validateInterfaceFaults

protected boolean validateInterfaceFaults(DescriptionElement descElement,
                                          InterfaceFaultElement[] faultElements,
                                          ErrorReporter errorReporter)
                                   throws WSDLException
Validate the InterfaceFault elements.

Parameters:
descElement - The root description element.
faultElements - An array of fault elements.
errorReporter - An error reporter.
Returns:
True if the interface fault elements are all valid, false otherwise.
Throws:
WSDLException

validateInterfaceOperations

protected boolean validateInterfaceOperations(DescriptionElement descElement,
                                              InterfaceOperationElement[] interfaceOperations,
                                              ErrorReporter errorReporter)
                                       throws WSDLException
Validate the InterfaceOperation elements.

Parameters:
descElement - The root description element.
interfaceOperations - An array of interface operation elements.
errorReporter - An error reporter.
Returns:
True if the interface operation elements are all valid, false otherwise.
Throws:
WSDLException

validateInterfaceMessageReferences

protected boolean validateInterfaceMessageReferences(DescriptionElement descElement,
                                                     InterfaceMessageReferenceElement[] messageReferences,
                                                     ErrorReporter errorReporter)
                                              throws WSDLException
Validate the InterfaceMessageReference elements.

Parameters:
descElement - The root description element.
messageReferences - An array of interface message reference elements.
errorReporter - An error reporter.
Returns:
True if the interface message reference elements are all valid, false otherwise.
Throws:
WSDLException

validateInterfaceFaultReferences

protected boolean validateInterfaceFaultReferences(DescriptionElement descElement,
                                                   InterfaceFaultReferenceElement[] faultReferences,
                                                   ErrorReporter errorReporter)
                                            throws WSDLException
Validate the InterfaceFaultReference elements.

Parameters:
descElement - The root description element.
faultReferences - An array of interface fault reference elements.
errorReporter - An error reporter.
Returns:
True if the interface fault reference elements are all valid, false otherwise.
Throws:
WSDLException

testAssertionDescription1006

protected boolean testAssertionDescription1006(DescriptionElement descElement,
                                               ErrorReporter errorReporter)
                                        throws WSDLException
Test assertion Description-1006. Tests whether the target namespace specified is an absolute IRI.

Parameters:
descElement - The description element for which to check the target namespace.
errorReporter - The error reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionSchema1069

protected boolean testAssertionSchema1069(ImportedSchema schema,
                                          ErrorReporter errorReporter)
                                   throws WSDLException
Test assertion Schema-1069. An imported schema must contain a target namespace.

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

testAssertionSchema1070

protected boolean testAssertionSchema1070(ImportedSchema schema,
                                          ErrorReporter errorReporter)
                                   throws WSDLException
Test assertion Schema-1070. An imported schema must specify the same target namespace as the import element.

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

testAssertionSchema1073

protected boolean testAssertionSchema1073(InlinedSchema[] schema,
                                          ErrorReporter errorReporter)
                                   throws WSDLException
Test assertion Schema-1073. Inlined XML Schemas must not define an element that has already been defined by another inline schema with the same target namespace.

Parameters:
schema - An array containing all the inline schemas in the order in which they are defined.
errorReporter - The error reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionInterface1012

protected boolean testAssertionInterface1012(InterfaceElement interfaceElem,
                                             ErrorReporter errorReporter)
                                      throws WSDLException
Test assertion Interface-1012. All style defaults specified on an interface element must be absolute.

Parameters:
interfaceElem - The interface element to check the style default list.
errorReporter - The error reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionSchema1066

protected boolean testAssertionSchema1066(DescriptionElement descElement,
                                          QName qualifiedName,
                                          ErrorReporter errorReporter)
                                   throws WSDLException
Test assertion Schema-1066. References to XML schema components must only refer to elements and types in namespaces that have been imported or inlined or that are part of the XML schema namespace.

Parameters:
descElement - The description element of the document.
namespace - Check this namespace to see if it has been defined.
errorReporter - The error Reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionQNameResolution1064ForInterfaceFaultReference

protected boolean testAssertionQNameResolution1064ForInterfaceFaultReference(InterfaceFaultReferenceElement faultReference,
                                                                             ErrorReporter errorReporter)
                                                                      throws WSDLException
Test assertion QName-resolution-1064 for an InterfaceFaultReference element. \ A Description component must not contain broken QName references.

Parameters:
faultReference - The interface fault reference to check for a broken reference.
errorReporter - An error reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException


Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.