John,

Could we please use XmlSchema?
(http://svn.apache.org/repos/asf/webservices/commons/trunk/XmlSchema/)

That way we are not stuck to a specifc version of Xerces.

-- dims

On 9/6/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Author: jkaputin
> Date: Tue Sep  6 07:55:53 2005
> New Revision: 279015
> 
> URL: http://svn.apache.org/viewcvs?rev=279015&view=rev
> Log:
> Added DOM parsing of schema and schema import using XML
> 
> Schema API (XSModel) to access element and types.
> 
> Modified:
>     incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java
>     incubator/woden/java/src/org/apache/woden/internal/wsdl20/Constants.java
>     
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/DocumentationImpl.java
>     
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java
>     incubator/woden/java/src/org/apache/woden/internal/wsdl20/TypesImpl.java
>     
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/SchemaImpl.java
>     
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/SchemaImportImpl.java
>     incubator/woden/java/src/org/apache/woden/wsdl20/ElementDeclaration.java
>     
> incubator/woden/java/src/org/apache/woden/wsdl20/InterfaceMessageReference.java
>     incubator/woden/java/src/org/apache/woden/wsdl20/TypeDefinition.java
>     incubator/woden/java/src/org/apache/woden/wsdl20/extensions/Schema.java
>     
> incubator/woden/java/src/org/apache/woden/wsdl20/extensions/SchemaImport.java
>     
> incubator/woden/java/src/org/apache/woden/wsdl20/xml/DocumentationElement.java
>     incubator/woden/java/src/org/apache/woden/wsdl20/xml/TypesElement.java
> 
> Modified: 
> incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java
> URL: 
> http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java?rev=279015&r1=279014&r2=279015&view=diff
> ==============================================================================
> --- incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java 
> (original)
> +++ incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java Tue 
> Sep  6 07:55:53 2005
> @@ -27,6 +27,18 @@
>  import org.xml.sax.InputSource;
> 
>  import org.xml.sax.SAXException;
> 
> 
> 
> +//JK temporary imports (pending TODOs)
> 
> +
> 
> +import com.ibm.wsdl.util.xml.DOM2Writer;
> 
> +
> 
> +import org.apache.xerces.dom3.bootstrap.DOMImplementationRegistry;
> 
> +import org.apache.xerces.xs.XSImplementation;
> 
> +import org.apache.xerces.xs.XSLoader;
> 
> +import org.apache.xerces.xs.XSModel;
> 
> +
> 
> +import org.w3c.dom.ls.DOMImplementationLS;
> 
> +import org.w3c.dom.ls.LSInput;
> 
> +
> 
>  import temp.WSDLException;
> 
> 
> 
>  /**
> 
> @@ -164,7 +176,7 @@
>                                                      DescriptionElement desc)
> 
>      {
> 
>          DocumentationElement documentation = 
> desc.createDocumentationElement();
> 
> -        documentation.setContentModel(docEl);
> 
> +        documentation.setContent(docEl);
> 
>          return documentation;
> 
>      }
> 
> 
> 
> @@ -189,18 +201,81 @@
>       * TODO Initial schema parsing is specific to XML Schema.
> 
>       * Need generic support for other type systems.
> 
>       * Consider extension architecture with serializer/deserializer.
> 
> +     *
> 
> +     * TODO For now, use XML Schema API (Xerces XSModel) to represent
> 
> +     * schema and parse elements and types. This will create a Xerces
> 
> +     * parser dependency on the Woden DOM implementation (rather than
> 
> +     * just a JAXP/SAX/DOM API dependency). To be considered further.
> 
>       */
> 
>      private Schema parseSchemaInline(Element schemaEl,
> 
>                                       TypesElement desc)
> 
>                                       throws WSDLException
> 
>      {
> 
> -        Schema schema = new SchemaImpl();
> 
> +        SchemaImpl schema = new SchemaImpl();
> 
> 
> 
>          schema.setTargetNamespace(
> 
>              DOMUtils.getAttribute(schemaEl, 
> Constants.ATTR_TARGET_NAMESPACE));
> 
> 
> 
> -        schema.setContentModel(schemaEl);
> 
> +        //TODO the type system will depend on the WSDL doc so consider
> 
> +        //parameterizing it. Fixed with an XML Schema constant for now.
> 
> +
> 
> +        schema.setTypeSystem(Constants.TYPE_XSD_2001);  //XML Schema type 
> system
> 
> +        schema.setContentModel(Constants.TYPE_XS_API);  //XML Schema API
> 
> 
> 
> +        //TODO currently only the XSModel is stored in Schema.
> 
> +        //The DOM element representing the schema is not stored.
> 
> +        //Either might be useful to an application dealing
> 
> +        //with the underlying types (e.g. generator tooling).
> 
> +        //So consider changing Schema so that it stores both.
> 
> +        //Perhaps using a Map with a ContentModel/Content pair.
> 
> +
> 
> +        try {
> 
> +            //create an LSInput object to hold the schema string
> 
> +            System.setProperty(DOMImplementationRegistry.PROPERTY,
> 
> +                "org.apache.xerces.dom.DOMImplementationSourceImpl");
> 
> +            DOMImplementationRegistry domRegistry =
> 
> +                DOMImplementationRegistry.newInstance();
> 
> +
> 
> +            DOMImplementationLS domImpl =
> 
> +                (DOMImplementationLS)domRegistry.getDOMImplementation("LS");
> 
> +
> 
> +            LSInput lsInput = domImpl.createLSInput();
> 
> +
> 
> +            //store the schema as a string in the LSInput
> 
> +            String schemaString = DOM2Writer.nodeToString(schemaEl);
> 
> +            System.out.println(schemaString);
> 
> +            lsInput.setStringData(schemaString);
> 
> +
> 
> +            //Use DOM level 3 bootstrap to get an XSModel of the schema
> 
> +            System.setProperty(DOMImplementationRegistry.PROPERTY,
> 
> +                "org.apache.xerces.dom.DOMXSImplementationSourceImpl");
> 
> +            DOMImplementationRegistry xsRegistry = 
> DOMImplementationRegistry.newInstance();
> 
> +
> 
> +            XSImplementation xsImpl =
> 
> +                (XSImplementation) 
> xsRegistry.getDOMImplementation("XS-Loader");
> 
> +
> 
> +            XSLoader xsLoader = xsImpl.createXSLoader(null);
> 
> +
> 
> +            XSModel xsModel = xsLoader.load(lsInput);
> 
> +
> 
> +            schema.setContent(xsModel);
> 
> +
> 
> +            /*
> 
> +             * print out the schema elements
> 
> +             *
> 
> +            XSNamedMap xsNamedMap = 
> xsModel.getComponents(XSConstants.ELEMENT_DECLARATION);
> 
> +            System.out.println("\nInline schema elements (" + 
> xsNamedMap.getLength() +"):");
> 
> +            for(int i = 0; i < xsNamedMap.getLength(); i++)
> 
> +            {
> 
> +                System.out.println( (xsNamedMap.item(i)).getName() );
> 
> +            }
> 
> +             */
> 
> +
> 
> +        } catch (Exception e) {
> 
> +            // TODO consider appropriate exceptions
> 
> +            e.printStackTrace();
> 
> +        }
> 
> +
> 
>          return schema;
> 
>      }
> 
> 
> 
> @@ -208,19 +283,67 @@
>       * TODO Initial schema parsing is specific to XML Schema.
> 
>       * Need generic support for other type systems.
> 
>       * Consider extension architecture with serializer/deserializer.
> 
> +     *
> 
> +     * TODO For now, use XML Schema API (Xerces XSModel) to represent
> 
> +     * schema and parse elements and types. This will create a Xerces
> 
> +     * parser dependency on the Woden DOM implementation (rather than
> 
> +     * just a JAXP/SAX/DOM API dependency). To be considered further.
> 
>       */
> 
> -    private SchemaImport parseSchemaImport(Element schemaEl,
> 
> +    private SchemaImport parseSchemaImport(Element importEl,
> 
>                                             TypesElement types)
> 
>                                             throws WSDLException
> 
>      {
> 
> -        SchemaImport schemaImport = new SchemaImportImpl();
> 
> +        //TODO use extension architecture aka WSDL4J
> 
> +        SchemaImportImpl schemaImport = new SchemaImportImpl();
> 
> 
> 
>          schemaImport.setNamespace(
> 
> -            DOMUtils.getAttribute(schemaEl, Constants.ATTR_NAMESPACE));
> 
> +            DOMUtils.getAttribute(importEl, Constants.ATTR_NAMESPACE));
> 
> 
> 
>          schemaImport.setSchemaLocation(
> 
> -            DOMUtils.getAttribute(schemaEl, 
> SchemaConstants.ATTR_SCHEMA_LOCATION));
> 
> +            DOMUtils.getAttribute(importEl, 
> SchemaConstants.ATTR_SCHEMA_LOCATION));
> 
> +
> 
> +        //TODO currently only the XSModel is stored in Schema.
> 
> +        //The DOM element representing the schema is not stored.
> 
> +        //Either might be useful to an application dealing
> 
> +        //with the underlying types (e.g. generator tooling).
> 
> +        //So consider changing Schema so that it stores both.
> 
> +        //Perhaps using a Map with a ContentModel/Content pair.
> 
> +
> 
> +        schemaImport.setTypeSystem(Constants.TYPE_XSD_2001);  //XML Schema 
> type system
> 
> +        schemaImport.setContentModel(Constants.TYPE_XS_API);  //XML Schema 
> API
> 
> 
> 
> +        try {
> 
> +            //Use DOM level 3 bootstrap to get an XSModel of the schema
> 
> +            System.setProperty(DOMImplementationRegistry.PROPERTY,
> 
> +                "org.apache.xerces.dom.DOMXSImplementationSourceImpl");
> 
> +            DOMImplementationRegistry xsRegistry = 
> DOMImplementationRegistry.newInstance();
> 
> +
> 
> +            XSImplementation xsImpl =
> 
> +                (XSImplementation) 
> xsRegistry.getDOMImplementation("XS-Loader");
> 
> +
> 
> +            XSLoader xsLoader = xsImpl.createXSLoader(null);
> 
> +
> 
> +            String sloc = schemaImport.getSchemaLocation();
> 
> +            XSModel xsModel = xsLoader.loadURI(sloc);
> 
> +
> 
> +            schemaImport.setContent(xsModel);
> 
> +
> 
> +            /*
> 
> +             * print out the schema elements
> 
> +             *
> 
> +            XSNamedMap xsNamedMap = 
> xsModel.getComponents(XSConstants.ELEMENT_DECLARATION);
> 
> +            System.out.println("\nImported schema elements (" + 
> xsNamedMap.getLength() +"):");
> 
> +            for(int i = 0; i < xsNamedMap.getLength(); i++)
> 
> +            {
> 
> +                System.out.println( (xsNamedMap.item(i)).getName() );
> 
> +            }
> 
> +             */
> 
> +
> 
> +        } catch (Exception e) {
> 
> +            // TODO consider appropriate exceptions
> 
> +            e.printStackTrace();
> 
> +        }
> 
> +
> 
>          return schemaImport;
> 
>      }
> 
> 
> 
> @@ -235,11 +358,11 @@
>      {
> 
>          TypesElement types = desc.createTypesElement();
> 
> 
> 
> -
> 
> -
> 
> +        //TODO for now, set to XML Schema namespace. Later,
> 
> +        //add support for non-XML Schema type systems
> 
> +        types.setTypeSystem(SchemaConstants.NS_URI_XSD_2001);
> 
> 
> 
>          Element tempEl = DOMUtils.getFirstChildElement(typesEl);
> 
> -
> 
> 
> 
>          while (tempEl != null)
> 
>          {
> 
> 
> Modified: 
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/Constants.java
> URL: 
> http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/Constants.java?rev=279015&r1=279014&r2=279015&view=diff
> ==============================================================================
> --- incubator/woden/java/src/org/apache/woden/internal/wsdl20/Constants.java 
> (original)
> +++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/Constants.java 
> Tue Sep  6 07:55:53 2005
> @@ -104,6 +104,15 @@
>      public static final String ATTR_BINDING = "binding";
> 
>      public static final String ATTR_LOCATION = "address";
> 
> 
> 
> +    //Type systems or content models
> 
> +    public static final String TYPE_XSD_2001 =
> 
> +        "http://www.w3.org/2001/XMLSchema";;
> 
> +    public static final String TYPE_DOM_API =
> 
> +        "org.w3c.dom";
> 
> +    public static final String TYPE_XS_API =
> 
> +        "org.apache.xerces.xs";
> 
> +
> 
> +
> 
>    //TODO determine if/how these needed
> 
>    public static final String ATTR_XMLNS = "xmlns";
> 
>    public static final String ATTR_NAMESPACE = "namespace";
> 
> 
> Modified: 
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/DocumentationImpl.java
> URL: 
> http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/DocumentationImpl.java?rev=279015&r1=279014&r2=279015&view=diff
> ==============================================================================
> --- 
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/DocumentationImpl.java
>  (original)
> +++ 
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/DocumentationImpl.java
>  Tue Sep  6 07:55:53 2005
> @@ -16,22 +16,22 @@
>   */
> 
>  public class DocumentationImpl implements DocumentationElement {
> 
> 
> 
> -    private Object fContentModel;
> 
> +    private Object fContent;
> 
> 
> 
>      /* (non-Javadoc)
> 
>       * @see 
> org.apache.woden.wsdl20.xml.DocumentationElement#setContentModel(java.lang.Object)
> 
>       */
> 
> -    public void setContentModel(Object docEl)
> 
> +    public void setContent(Object docEl)
> 
>      {
> 
> -        this.fContentModel = docEl;
> 
> +        this.fContent = docEl;
> 
>      }
> 
> 
> 
>      /* (non-Javadoc)
> 
>       * @see 
> org.apache.woden.wsdl20.xml.DocumentationElement#getContentModel()
> 
>       */
> 
> -    public Object getContentModel()
> 
> +    public Object getContent()
> 
>      {
> 
> -        return this.fContentModel;
> 
> +        return this.fContent;
> 
>      }
> 
> 
> 
>  }
> 
> 
> Modified: 
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java
> URL: 
> http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java?rev=279015&r1=279014&r2=279015&view=diff
> ==============================================================================
> --- 
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java 
> (original)
> +++ 
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/InterfaceImpl.java 
> Tue Sep  6 07:55:53 2005
> @@ -21,13 +21,14 @@
>   * @author [EMAIL PROTECTED]
> 
>   */
> 
>  public class InterfaceImpl implements Interface, InterfaceElement {
> 
> +
> 
> +    QName fName;
> 
> 
> 
>      /* (non-Javadoc)
> 
>       * @see org.apache.woden.wsdl20.Interface#getName()
> 
>       */
> 
>      public QName getName() {
> 
> -        // TODO Auto-generated method stub
> 
> -        return null;
> 
> +        return fName;
> 
>      }
> 
> 
> 
>      /* (non-Javadoc)
> 
> 
> Modified: 
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/TypesImpl.java
> URL: 
> http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/TypesImpl.java?rev=279015&r1=279014&r2=279015&view=diff
> ==============================================================================
> --- incubator/woden/java/src/org/apache/woden/internal/wsdl20/TypesImpl.java 
> (original)
> +++ incubator/woden/java/src/org/apache/woden/internal/wsdl20/TypesImpl.java 
> Tue Sep  6 07:55:53 2005
> @@ -27,6 +27,7 @@
>  public class TypesImpl implements TypesElement {
> 
> 
> 
>      private DocumentationElement fDocumentation;
> 
> +    private String fTypeSystem;
> 
>      private Map fSchemaImports = new HashMap();
> 
>      private Map fSchemas = new HashMap();
> 
> 
> 
> @@ -40,6 +41,16 @@
>      public DocumentationElement getDocumentationElement()
> 
>      {
> 
>          return fDocumentation;
> 
> +    }
> 
> +
> 
> +    public void setTypeSystem(String typeSystem)
> 
> +    {
> 
> +        fTypeSystem = typeSystem;
> 
> +    }
> 
> +
> 
> +    public String getTypeSystem()
> 
> +    {
> 
> +        return fTypeSystem;
> 
>      }
> 
> 
> 
>      /*
> 
> 
> Modified: 
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/SchemaImpl.java
> URL: 
> http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/SchemaImpl.java?rev=279015&r1=279014&r2=279015&view=diff
> ==============================================================================
> --- 
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/SchemaImpl.java
>  (original)
> +++ 
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/SchemaImpl.java
>  Tue Sep  6 07:55:53 2005
> @@ -6,14 +6,16 @@
>  import org.apache.woden.wsdl20.extensions.Schema;
> 
> 
> 
>  /**
> 
> - * A wrapper for a <xs:schema> element.
> 
> + * A wrapper for a &lt;xs:schema&gt; element.
> 
>   *
> 
>   * @author [EMAIL PROTECTED]
> 
>   */
> 
>  public class SchemaImpl implements Schema {
> 
> 
> 
>      private String fTargetNamespace;
> 
> -    private Object fContentModel;
> 
> +    private String fTypeSystem;
> 
> +    private String fContentModel;
> 
> +    private Object fContent;
> 
> 
> 
>      /* (non-Javadoc)
> 
>       * @see 
> org.apache.woden.wsdl20.extensions.Schema#setTargetNamespace(java.lang.String)
> 
> @@ -30,15 +32,35 @@
>      {
> 
>          return fTargetNamespace;
> 
>      }
> 
> +
> 
> +    public void setTypeSystem(String typeSystem)
> 
> +    {
> 
> +        fTypeSystem = typeSystem;
> 
> +    }
> 
> +
> 
> +    public String getTypeSystem()
> 
> +    {
> 
> +        return fTypeSystem;
> 
> +    }
> 
> 
> 
> -    public void setContentModel(Object schemaEl)
> 
> +    public void setContentModel(String contentModel)
> 
>      {
> 
> -        fContentModel = schemaEl;
> 
> +        fContentModel = contentModel;
> 
>      }
> 
> 
> 
> -    public Object getContentModel()
> 
> +    public String getContentModel()
> 
>      {
> 
>          return fContentModel;
> 
> +    }
> 
> +
> 
> +    public void setContent(Object schemaContent)
> 
> +    {
> 
> +        fContent = schemaContent;
> 
> +    }
> 
> +
> 
> +    public Object getContent()
> 
> +    {
> 
> +        return fContent;
> 
>      }
> 
> 
> 
>  }
> 
> 
> Modified: 
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/SchemaImportImpl.java
> URL: 
> http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/SchemaImportImpl.java?rev=279015&r1=279014&r2=279015&view=diff
> ==============================================================================
> --- 
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/SchemaImportImpl.java
>  (original)
> +++ 
> incubator/woden/java/src/org/apache/woden/internal/wsdl20/extensions/SchemaImportImpl.java
>  Tue Sep  6 07:55:53 2005
> @@ -6,9 +6,7 @@
>  import org.apache.woden.wsdl20.extensions.SchemaImport;
> 
> 
> 
>  /**
> 
> - * This interface represents the XML element information item for
> 
> - * a &lt;xs:import&gt; element. It declares the behaviour required to
> 
> - * support parsing, creating and manipulating a &lt;xs:import&gt; element.
> 
> + * A wrapper for a &lt;xs:import&gt; element.
> 
>   *
> 
>   * @author [EMAIL PROTECTED]
> 
>   */
> 
> @@ -16,6 +14,9 @@
> 
> 
>      private String fNamespace = null;
> 
>      private String fSchemaLocation = null;
> 
> +    private String fTypeSystem;
> 
> +    private String fContentModel;
> 
> +    private Object fContent;
> 
> 
> 
>      /* (non-Javadoc)
> 
>       * @see 
> org.apache.woden.wsdl20.extensions.SchemaImport#setNamespace(java.lang.String)
> 
> @@ -49,5 +50,34 @@
>      {
> 
>          return this.fSchemaLocation;
> 
>      }
> 
> +
> 
> +    public void setTypeSystem(String typeSystem)
> 
> +    {
> 
> +        this.fTypeSystem = typeSystem;
> 
> +    }
> 
> +
> 
> +    public String getTypeSystem()
> 
> +    {
> 
> +        return this.fTypeSystem;
> 
> +    }
> 
> +
> 
> +    public void setContentModel(String contentModel)
> 
> +    {
> 
> +        this.fContentModel = contentModel;
> 
> +    }
> 
> +
> 
> +    public String getContentModel()
> 
> +    {
> 
> +        return this.fContentModel;
> 
> +    }
> 
> 
> 
> +    public void setContent(Object importedSchemaContent)
> 
> +    {
> 
> +        this.fContent = importedSchemaContent;
> 
> +    }
> 
> +
> 
> +    public Object getContent()
> 
> +    {
> 
> +        return this.fContent;
> 
> +    }
> 
>  }
> 
> 
> Modified: 
> incubator/woden/java/src/org/apache/woden/wsdl20/ElementDeclaration.java
> URL: 
> http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/ElementDeclaration.java?rev=279015&r1=279014&r2=279015&view=diff
> ==============================================================================
> --- incubator/woden/java/src/org/apache/woden/wsdl20/ElementDeclaration.java 
> (original)
> +++ incubator/woden/java/src/org/apache/woden/wsdl20/ElementDeclaration.java 
> Tue Sep  6 07:55:53 2005
> @@ -8,21 +8,42 @@
>  /**
> 
>   * This interface represents the ElementDeclaration component described
> 
>   * in the WSDL 2.0 Component Model specification (within the Description
> 
> - * Component section). This component is used for describing the content
> 
> - * of input, output and fault messages. Although it reflects an XML
> 
> - * Schema global element declaration (&lt;xs:element&gt.), it does not
> 
> - * impose XML Schema as the type system. Instead it returns a string 
> describing
> 
> - * the type system being used (e.g. "http://www.w3.org/2001/XMLSchema";),
> 
> - * which will indicate how to interpret the content model.
> 
> + * Component section). An ElementDeclaration refers to an element, such as
> 
> + * a global element declaration in the XML Schema type system
> 
> + * (&lt;xs:element&gt.), that describes the content of WSDL input, output
> 
> + * and fault messages.  However, it does not impose XML Schema as the type 
> system.
> 
> + * It returns a String representing the content model or type system
> 
> + * (e.g. "http://www.w3.org/2001/XMLSchema";) and a java.lang.Object
> 
> + * representing the content of the element declaration. This Object may
> 
> + * be cast to a type appropriate for the content model.
> 
> + *
> 
> + * TODO consider using woden specific package style names for the type
> 
> + * system and content model constants, so that these can be configured or
> 
> + * defaulted prior to parsing and then referred to in a standard way via the 
> API
> 
> + * (e.g.
> 
> + * org.apache.woden.XML_Schema_Type_System,
> 
> + * org.apache.woden.DOM_Content_Model,
> 
> + * org.apache.woden.XML_Schema_API_Content_Model).
> 
>   *
> 
> + *
> 
>   * @author [EMAIL PROTECTED]
> 
>   */
> 
>  public interface ElementDeclaration {
> 
> 
> 
>      public QName getName();
> 
> 
> 
> +    /*
> 
> +     * e.g. "http://www.w3.org/2001/XMLSchema";
> 
> +     */
> 
>      public String getTypeSystem();
> 
> 
> 
> -    public Object getContentModel();
> 
> +    /*
> 
> +     * Indicates the type of model or API used to represent the content.
> 
> +     * For example, "org.w3c.dom" for a DOM Element or
> 
> +     * "org.apache.xerces.xs" for an XML Schema API XSElementDeclaration.
> 
> +     */
> 
> +    public String getContentModel();
> 
> +
> 
> +    public Object getContent();
> 
> 
> 
>  }
> 
> 
> Modified: 
> incubator/woden/java/src/org/apache/woden/wsdl20/InterfaceMessageReference.java
> URL: 
> http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/InterfaceMessageReference.java?rev=279015&r1=279014&r2=279015&view=diff
> ==============================================================================
> --- 
> incubator/woden/java/src/org/apache/woden/wsdl20/InterfaceMessageReference.java
>  (original)
> +++ 
> incubator/woden/java/src/org/apache/woden/wsdl20/InterfaceMessageReference.java
>  Tue Sep  6 07:55:53 2005
> @@ -13,6 +13,13 @@
> 
> 
>      public String getDirection();
> 
> 
> 
> +    /**
> 
> +     * Indicates the type of message content.#any means any single element,
> 
> +     * #none means no message content, #other means non-XML extension type 
> system
> 
> +     * or #element means XML Schema global element definition.
> 
> +     *
> 
> +     * @return string representing the type of message content
> 
> +     */
> 
>      public String getMessageContentModel();
> 
> 
> 
>      public ElementDeclaration getElementDeclaration();
> 
> 
> Modified: incubator/woden/java/src/org/apache/woden/wsdl20/TypeDefinition.java
> URL: 
> http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/TypeDefinition.java?rev=279015&r1=279014&r2=279015&view=diff
> ==============================================================================
> --- incubator/woden/java/src/org/apache/woden/wsdl20/TypeDefinition.java 
> (original)
> +++ incubator/woden/java/src/org/apache/woden/wsdl20/TypeDefinition.java Tue 
> Sep  6 07:55:53 2005
> @@ -8,12 +8,22 @@
>  /**
> 
>   * This interface represents the TypeDefinition component described
> 
>   * in the WSDL 2.0 Component Model specification (within the Description
> 
> - * Component section). This component is used for describing simple or
> 
> - * complex data types. Although it reflects an XML Schema global type
> 
> - * definition (&lt;xs:simpleType&gt. or &lt;xs:complexType&gt.), it does not
> 
> - * impose XML Schema as the type system. Instead it returns a string 
> describing
> 
> - * the type system being used (e.g. "http://www.w3.org/2001/XMLSchema";),
> 
> - * which will indicate how to interpret the content model.
> 
> + * Component section). This component refers to simple or complex data types
> 
> + * defined in a type system such as XML Schema
> 
> + * (e.g. &lt;xs:simpleType&gt. or &lt;xs:complexType&gt.).
> 
> + * However, it does not impose XML Schema as the type system.
> 
> + * It returns a String representing the content model or type system
> 
> + * (e.g. "http://www.w3.org/2001/XMLSchema";) and a java.lang.Object
> 
> + * representing the content of the type definition. This Object may
> 
> + * be cast to a type appropriate for the content model.
> 
> + *
> 
> + * TODO consider using woden specific package style names for the type
> 
> + * system and content model constants, so that these can be configured or
> 
> + * defaulted prior to parsing and then referred to in a standard way via the 
> API
> 
> + * (e.g.
> 
> + * org.apache.woden.XML_Schema_Type_System,
> 
> + * org.apache.woden.DOM_Content_Model,
> 
> + * org.apache.woden.XML_Schema_API_Content_Model).
> 
>   *
> 
>   * @author [EMAIL PROTECTED]
> 
>   */
> 
> @@ -21,8 +31,18 @@
> 
> 
>      public QName getName();
> 
> 
> 
> +    /*
> 
> +     * e.g. "http://www.w3.org/2001/XMLSchema";
> 
> +     */
> 
>      public String getTypeSystem();
> 
> 
> 
> -    public Object getContentModel();
> 
> +    /*
> 
> +     * Indicates the type of model or API used to represent the content.
> 
> +     * For example, "org.w3c.dom" for a DOM Element or
> 
> +     * "org.apache.xerces.xs" for an XML Schema API XSTypeDefinition.
> 
> +     */
> 
> +    public String getContentModel();
> 
> +
> 
> +    public Object getContent();
> 
> 
> 
>  }
> 
> 
> Modified: 
> incubator/woden/java/src/org/apache/woden/wsdl20/extensions/Schema.java
> URL: 
> http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/extensions/Schema.java?rev=279015&r1=279014&r2=279015&view=diff
> ==============================================================================
> --- incubator/woden/java/src/org/apache/woden/wsdl20/extensions/Schema.java 
> (original)
> +++ incubator/woden/java/src/org/apache/woden/wsdl20/extensions/Schema.java 
> Tue Sep  6 07:55:53 2005
> @@ -17,8 +17,10 @@
> 
> 
>      public String getTargetNamespace();
> 
> 
> 
> -    public void setContentModel(Object schemaEl);
> 
> +    public String getTypeSystem();
> 
> 
> 
> -    public Object getContentModel();
> 
> +    public String getContentModel();
> 
> +
> 
> +    public Object getContent();
> 
> 
> 
>  }
> 
> 
> Modified: 
> incubator/woden/java/src/org/apache/woden/wsdl20/extensions/SchemaImport.java
> URL: 
> http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/extensions/SchemaImport.java?rev=279015&r1=279014&r2=279015&view=diff
> ==============================================================================
> --- 
> incubator/woden/java/src/org/apache/woden/wsdl20/extensions/SchemaImport.java 
> (original)
> +++ 
> incubator/woden/java/src/org/apache/woden/wsdl20/extensions/SchemaImport.java 
> Tue Sep  6 07:55:53 2005
> @@ -20,4 +20,9 @@
> 
> 
>      public String getSchemaLocation();
> 
> 
> 
> +    public String getTypeSystem();
> 
> +
> 
> +    public String getContentModel();
> 
> +
> 
> +    public Object getContent();
> 
>  }
> 
> 
> Modified: 
> incubator/woden/java/src/org/apache/woden/wsdl20/xml/DocumentationElement.java
> URL: 
> http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/xml/DocumentationElement.java?rev=279015&r1=279014&r2=279015&view=diff
> ==============================================================================
> --- 
> incubator/woden/java/src/org/apache/woden/wsdl20/xml/DocumentationElement.java
>  (original)
> +++ 
> incubator/woden/java/src/org/apache/woden/wsdl20/xml/DocumentationElement.java
>  Tue Sep  6 07:55:53 2005
> @@ -13,7 +13,7 @@
>   */
> 
>  public interface DocumentationElement extends WSDL20Element {
> 
> 
> 
> -    public void setContentModel(Object docEl);
> 
> +    public void setContent(Object docEl);
> 
> 
> 
> -    public Object getContentModel();
> 
> +    public Object getContent();
> 
>  }
> 
> 
> Modified: 
> incubator/woden/java/src/org/apache/woden/wsdl20/xml/TypesElement.java
> URL: 
> http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/wsdl20/xml/TypesElement.java?rev=279015&r1=279014&r2=279015&view=diff
> ==============================================================================
> --- incubator/woden/java/src/org/apache/woden/wsdl20/xml/TypesElement.java 
> (original)
> +++ incubator/woden/java/src/org/apache/woden/wsdl20/xml/TypesElement.java 
> Tue Sep  6 07:55:53 2005
> @@ -31,19 +31,37 @@
> 
> 
>      public DocumentationElement getDocumentationElement();
> 
> 
> 
> +    /**
> 
> +     * Indicate the type system used within the &lt;types&gt;
> 
> +     * element. Typically the XML Schema type system will be
> 
> +     * used, represented by the XML Schema namespace
> 
> +     * "http://www.w3.org/2001/XMLSchema";.
> 
> +     */
> 
> +    public void setTypeSystem(String typeSystem);
> 
> +
> 
> +    /**
> 
> +     * Get the string indicating the type system used within the 
> &lt;types&gt;
> 
> +     * element.
> 
> +     */
> 
> +    public String getTypeSystem();
> 
> +
> 
>      /*
> 
>       * Schema imports &lt;xs:import&gt; are stored in a Map of SchemaImport[]
> 
>       * keyed by namespace. The schemaLocation attribute will distinguish
> 
>       * schemas imported with the same namespace.
> 
>       */
> 
> 
> 
> +    /**
> 
> +     * Add a SchemaImport to the schemas imported within the &lt;types&gt; 
> element.
> 
> +     */
> 
>      public void addSchemaImport(SchemaImport schemaImport);
> 
> 
> 
>      //TODO what if schemaLoc is null and there is more than one import for 
> this namespace?
> 
>      //Delete all or raise an error?
> 
> 
> 
>      /**
> 
> -     * Add a SchemaImport to the schemas imported within the &lt;types&gt; 
> element.
> 
> +     * Remove a SchemaImport from the list of schemas imported
> 
> +     * within the &lt;types&gt; element.
> 
>       */
> 
>      public void removeSchemaImport(String namespace, String schemaLoc);
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to