org.apache.woden

## Interface WSDLReader

-     public interface WSDLReader

  This interface declares an API for reading WSDL descriptions from different sources such as WSDL documents or files, parsed XML elements and input byte streams. It contains various `readWSDL` methods that obtain the WSDL infoset from the specified source, parse it into the Woden object model and return this as a WSDL `Description` component containing the WSDL components derived from that infoset. If the WSDL is comprised of a composite set of documents nested via wsdl:import or wsdl:include, the Description component will represent the abstract, 'flattened' view of the WSDL tree, containing all of the WSDL components derived from the various WSDL documents, but without the document structure.
  Author:
    John Kaputin (jkaputin@apache.org)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `FEATURE_CONTINUE_ON_ERROR` Set to `true` if parsing should continue after encountering a non-fatal error in the WSDL which might result in incomplete WSDL model being returned by the reader, `false` otherwise.
    `static String` | `FEATURE_VALIDATION` Set to `true` to enable the WSDL validation feature, `false` otherwise.
    `static String` | `FEATURE_VERBOSE` Set to `true` to enable verbose diagnostic tracing, `false` otherwise.
    `static String` | `PROPERTY_TYPE_SYSTEM_API`
    `static String` | `PROPERTY_XML_PARSER_API` Constants for reader configuration property names.
    `static String` | `TYPE_XSD_2001` A constant representing the W3C XML Schema type system.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `WSDLSource` | `createWSDLSource()` Returns a WSDLSource object that is compatible with the WSDLReader implementation.
    `ErrorReporter` | `getErrorReporter()`
    `ExtensionRegistry` | `getExtensionRegistry()`
    `String` | `getFactoryImplName()`
    `boolean` | `getFeature(String name)` Returns the on/off setting of the named feature, represented as a boolean.
    `Object` | `getProperty(String name)` Returns the value of the named property.
    `URIResolver` | `getURIResolver()` Gets the URI Resolver currently in use
    `Description` | `readWSDL(String wsdlURI)` Read the WSDL document at the specified URI and return a WSDL Description component containing the WSDL components derived from that document.
    `Description` | `readWSDL(WSDLSource wsdlSource)` Read the WSDL obtained from the specified WSDLSource object and return a WSDL Description component containing the WSDL components derived from that WSDL source.
    `void` | `setExtensionRegistry(ExtensionRegistry extReg)` Set the extension registry to the specified registry reference.
    `void` | `setFactoryImplName(String factoryImplName)` Store the name of the WSDLFactory implementation class to be used for any subsequent WSDLFactory requests.
    `void` | `setFeature(String name, boolean value)` Set a named feature on or off with a boolean.
    `void` | `setProperty(String name, Object value)` Set a named property to the specified object.
    `void` | `setURIResolver(URIResolver resolver)` Sets the URI resolver to be used.

- - ### Field Detail

    - #### FEATURE_VERBOSE

          static final String FEATURE_VERBOSE

      Set to `true` to enable verbose diagnostic tracing, `false` otherwise.
      See Also:
        Constant Field Values

    - #### FEATURE_VALIDATION

          static final String FEATURE_VALIDATION

      Set to `true` to enable the WSDL validation feature, `false` otherwise.
      See Also:
        Constant Field Values

    - #### FEATURE_CONTINUE_ON_ERROR

          static final String FEATURE_CONTINUE_ON_ERROR

      Set to `true` if parsing should continue after encountering a non-fatal error in the WSDL which might result in incomplete WSDL model being returned by the reader, `false` otherwise.
      See Also:
        Constant Field Values

    - #### PROPERTY_XML_PARSER_API

          static final String PROPERTY_XML_PARSER_API

      Constants for reader configuration property names. Properties have a value represented by an object. TODO ditto the comment on features, about whether to define property constants here and use generic set/getProperty methods or remove the constants and use property-specific methods.
      See Also:
        Constant Field Values

    - #### PROPERTY_TYPE_SYSTEM_API

          static final String PROPERTY_TYPE_SYSTEM_API

      See Also:
        Constant Field Values

    - #### TYPE_XSD_2001

          static final String TYPE_XSD_2001

      A constant representing the W3C XML Schema type system. All implementations of the Woden API must support W3C XML Schema. An implementation configured to use this type system can use this constant to specify its value for the property "http://ws.apache.org/woden/property/type_system_api".
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### readWSDL

          Description readWSDL(String wsdlURI)
                               throws WSDLException

      Read the WSDL document at the specified URI and return a WSDL Description component containing the WSDL components derived from that document.
      Parameters:
        `wsdlURI` - a URI (absolute filename or URL) pointing to a WSDL document.
      Returns:
        the Description component
      Throws:
        `WSDLException` - for terminating errors and as wrapper for checked exceptions.

    - #### readWSDL

          Description readWSDL(WSDLSource wsdlSource)
                               throws WSDLException

      Read the WSDL obtained from the specified WSDLSource object and return a WSDL Description component containing the WSDL components derived from that WSDL source.

      The WSDLSource object must represent the WSDL using a type that the WSDLReader implementation can understand. That is, the WSDLSource and WSDLReader implementations must be compatible. For example, a DOM-based WSDLReader implementation will likely require the WSDLSource object to represent the WSDL as a DOM Document or Element (org.w3c.dom.Document or org.w3c.dom.Element), both of which should be type compatible the DOM-based reader.

      Parameters:
        `wsdlSource` - contains an object representing the WSDL
      Returns:
        the Description component
      Throws:
        `WSDLException` - for terminating errors and as a wrapper for checked exceptions

    - #### createWSDLSource

          WSDLSource createWSDLSource()

      Returns a WSDLSource object that is compatible with the WSDLReader implementation. That is, a WSDLSource implementation that represents WSDL using types that the WSDLReader implementation can understand. For example, DOM-based WSDLReader implementation will likely return a WSDLSource object that represents the WSDL as a DOM Document or Element (org.w3c.dom.Document or org.w3c.dom.Element), both of which should be type compatible the DOM-based reader.

      This WSDLSource object can be used to encapsulate the WSDL and is then passed to the WSDLReader as a parameter to its `readWSDL` methods.

      Returns:
        the WSDLSource class compatible with the WSDLReader implementation.

    - #### getErrorReporter

          ErrorReporter getErrorReporter()

      Returns:
        the ErrorReporter used by this reader

    - #### setFactoryImplName

          void setFactoryImplName(String factoryImplName)

      Store the name of the WSDLFactory implementation class to be used for any subsequent WSDLFactory requests. The named factory class will replace any existing factory object in use.
      Parameters:
        `factoryImplName` - the WSDLFactory implementation classname

    - #### getFactoryImplName

          String getFactoryImplName()

      Returns:
        the WSDLFactory implementation classname

    - #### setExtensionRegistry

          void setExtensionRegistry(ExtensionRegistry extReg)

      Set the extension registry to the specified registry reference. The registry parameter cannot be null.
      Parameters:
        `extReg` - an ExtensionRegistry
      Throws:
        `NullPointerException` - if extReg is null

    - #### getExtensionRegistry

          ExtensionRegistry getExtensionRegistry()

    - #### setFeature

          void setFeature(String name,
                        boolean value)

      Set a named feature on or off with a boolean. Note, this relates to features of the Woden framework, not to WSDL-specific features such as the WSDL 2.0 Feature component.

      All feature names should be fully-qualified, Java package style to avoid name clashes. All names starting with org.apache.woden. are reserved for features defined by the Woden implementation. Features specific to other implementations should be fully-qualified to match the package name structure of that implementation. For example: com.abc.featureName

      Parameters:
        `name` - the name of the feature to be set
        `value` - a boolean value where true sets the feature on, false sets it off
      Throws:
        `IllegalArgumentException` - if the feature name is not recognized.

    - #### getFeature

          boolean getFeature(String name)

      Returns the on/off setting of the named feature, represented as a boolean.
      Parameters:
        `name` - the name of the feature to get the value of
      Returns:
        a boolean representing the on/off state of the named feature
      Throws:
        `IllegalArgumentException` - if the feature name is not recognized.

    - #### setProperty

          void setProperty(String name,
                         Object value)

      Set a named property to the specified object. Note, this relates to properties of the Woden implementation, not to WSDL-specific properties such as the WSDL 2.0 Property component.

      All property names should be fully-qualified, Java package style to avoid name clashes. All names starting with org.apache.woden. are reserved for properties defined by the Woden implementation. Properties specific to other implementations should be fully-qualified to match the package name structure of that implementation. For example: com.abc.propertyName

      Parameters:
        `name` - the name of the property to be set
        `value` - an Object representing the value to set the property to
      Throws:
        `IllegalArgumentException` - if the property name is not recognized.

    - #### getProperty

          Object getProperty(String name)

      Returns the value of the named property.
      Parameters:
        `name` - the name of the property to get the value of
      Returns:
        an Object representing the property's value
      Throws:
        `IllegalArgumentException` - if the property name is not recognized.

    - #### setURIResolver

          void setURIResolver(URIResolver resolver)

      Sets the URI resolver to be used.
      Parameters:
        `resolver` -

    - #### getURIResolver

          URIResolver getURIResolver()

      Gets the URI Resolver currently in use
      Returns:
        the URI resolver currently in use

Copyright ? Apache Software Foundation. All Rights Reserved.