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 testAssertionDescription0025(DescriptionElement descElement, ErrorReporter errorReporter)
          Test assertion Description-0025.
protected  boolean testAssertionInterface0031(InterfaceElement interfaceElem, ErrorReporter errorReporter)
          Test assertion Interface-0031.
protected  boolean testAssertionSchema0016(DescriptionElement descElement, java.lang.String namespace, ErrorReporter errorReporter)
          Test assertion Schema-0016.
protected  boolean testAssertionSchema0017(ImportedSchema schema, ErrorReporter errorReporter)
          Test assertion Schema-0017.
protected  boolean testAssertionSchema0018(InlinedSchema[] schema, ErrorReporter errorReporter)
          Test assertion Schema-0018.
protected  boolean testAssertionSchema0020(DescriptionElement descElement, InterfaceMessageReferenceElement messageReference, ErrorReporter errorReporter)
          Test assertion Schema-0020.
protected  boolean testAssertionSchema0020b(DescriptionElement descElement, InterfaceFaultElement faultElement, ErrorReporter errorReporter)
          Test assertion Schema-0020.
protected  boolean testAssertionSchema0052(ImportedSchema schema, ErrorReporter errorReporter)
          Test assertion Schema-0052.
 boolean validate(DescriptionElement descElement, ErrorReporter errorReporter)
          Validate the document representation of the WSDL document against the WSDL 2.0 specification.
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

testAssertionDescription0025

protected boolean testAssertionDescription0025(DescriptionElement descElement,
                                               ErrorReporter errorReporter)
                                        throws WSDLException
Test assertion Description-0025. 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

testAssertionSchema0017

protected boolean testAssertionSchema0017(ImportedSchema schema,
                                          ErrorReporter errorReporter)
                                   throws WSDLException
Test assertion Schema-0017. 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

testAssertionSchema0052

protected boolean testAssertionSchema0052(ImportedSchema schema,
                                          ErrorReporter errorReporter)
                                   throws WSDLException
Test assertion Schema-0052. 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

testAssertionSchema0018

protected boolean testAssertionSchema0018(InlinedSchema[] schema,
                                          ErrorReporter errorReporter)
                                   throws WSDLException
Test assertion Schema-0018. 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

testAssertionInterface0031

protected boolean testAssertionInterface0031(InterfaceElement interfaceElem,
                                             ErrorReporter errorReporter)
                                      throws WSDLException
Test assertion Interface-0031. 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

testAssertionSchema0020

protected boolean testAssertionSchema0020(DescriptionElement descElement,
                                          InterfaceMessageReferenceElement messageReference,
                                          ErrorReporter errorReporter)
                                   throws WSDLException
Test assertion Schema-0020. An interface message reference element must not refer to an xs:simpleType or xs:complexType.

Parameters:
descElement - The description element of the document.
messageReference - The message reference to check.
errorReporter - The error Reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionSchema0020b

protected boolean testAssertionSchema0020b(DescriptionElement descElement,
                                           InterfaceFaultElement faultElement,
                                           ErrorReporter errorReporter)
                                    throws WSDLException
Test assertion Schema-0020. An interface fault element must not refer to an xs:simpleType or xs:complexType.

Parameters:
descElement - The description element of the document.
faultElement - The fault element to check.
errorReporter - The error Reporter.
Returns:
True if the assertion passes, false otherwise.
Throws:
WSDLException

testAssertionSchema0016

protected boolean testAssertionSchema0016(DescriptionElement descElement,
                                          java.lang.String namespace,
                                          ErrorReporter errorReporter)
                                   throws WSDLException
Test assertion Schema-0016. 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


Copyright © 2007. All Rights Reserved.