You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Ias <ia...@tmax.co.kr> on 2004/06/18 09:42:29 UTC

Idea on writing types in WSDL

While I was working on refactoring writing a WSDL file of fromJava.Emitter
from org.apache.axis.utils.DOM2Writer to javax.wsdl.xml.WSDLWriter, some
idea hit me.

The main point of the idea is creating javax.wsdl.extensions.type.Schema
extensibility element. Currently, Axis uses DOM to make types part of a
WSDL like this diagram:

Create a Definition in WSDL4J
->
Create other constructs except Types in WSDL4J
->
Convert the Definition to a Document in DOM
->
Insert Elements for Types to the Document
->
Write the Document

Once we have Schema extension element,

Create a Definition in WSDL4J
->
Create other constructs in WSDL4J. Especially, Schema element takes the
role of gathering declarations of elements and types with
org.apache.axis.wsdl.fromJava.Types and serializers in
org.apache.axis.encoding.ser package.
->
Write the Definition by WSDLWriter.

Here's a brief design of Schema class:

package javax.wsdl.extensions.soap;

...

public interface Schema extends ExtensibilityElement, java.io.Serializable
{

  public void setDeclaration(Document declaration);

  public Document getDeclaration();
}

Then, there will be a usage below:

WSDLFactory factory = WSDLFactory.newInstance();
Defintion definition = factory.newDefinition();
Types types = definition.createTypes();
ExtensionRegistry registry = factory.newPopulatedExtensionRegistry();
Schema schema = (Schema) registry.createExtension(javax.wsdl.Types, new
QName("http://www.w3.org/2001/XMLSchema", "schema"));
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document schemaDeclaration = builder.newDocument();
... (populate schemaDeclaration with elements and types)
schema.setDeclaration(schemaDeclaration);
types.addExtensibilityElement(schema);
...

What do you think of this idea?

Thanks,

Ias

=========================================================
Lee, Changshin (Korean name)
Ias (International name)
               Company Web Site: http://www.tmax.co.kr
               Personal Web Site: http://www.iasandcb.pe.kr
---------------------------------------------------------
JSR 201, 204, 222 and 224 Expert Group Member
Apache Web Services Project Member
R&D Center
Tmax Soft, Inc.
=========================================================


Re: Idea on writing types in WSDL

Posted by Srinath Perera <he...@opensource.lk>.
yes the fact that the schema type representation is not standerized is
base of meny problems. At JAXME_AXIS_reengineering we have that trouble.
To me it is seems a good idea.
Srinath

> While I was working on refactoring writing a WSDL file of fromJava.Emitter
> from org.apache.axis.utils.DOM2Writer to javax.wsdl.xml.WSDLWriter, some
> idea hit me.
>
> The main point of the idea is creating javax.wsdl.extensions.type.Schema
> extensibility element. Currently, Axis uses DOM to make types part of a
> WSDL like this diagram:
>
> Create a Definition in WSDL4J
> ->
> Create other constructs except Types in WSDL4J
> ->
> Convert the Definition to a Document in DOM
> ->
> Insert Elements for Types to the Document
> ->
> Write the Document
>
> Once we have Schema extension element,
>
> Create a Definition in WSDL4J
> ->
> Create other constructs in WSDL4J. Especially, Schema element takes the
> role of gathering declarations of elements and types with
> org.apache.axis.wsdl.fromJava.Types and serializers in
> org.apache.axis.encoding.ser package.
> ->
> Write the Definition by WSDLWriter.
>
> Here's a brief design of Schema class:
>
> package javax.wsdl.extensions.soap;
>
> ...
>
> public interface Schema extends ExtensibilityElement, java.io.Serializable
> {
>
>   public void setDeclaration(Document declaration);
>
>   public Document getDeclaration();
> }
>
> Then, there will be a usage below:
>
> WSDLFactory factory = WSDLFactory.newInstance();
> Defintion definition = factory.newDefinition();
> Types types = definition.createTypes();
> ExtensionRegistry registry = factory.newPopulatedExtensionRegistry();
> Schema schema = (Schema) registry.createExtension(javax.wsdl.Types, new
> QName("http://www.w3.org/2001/XMLSchema", "schema"));
> DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
> DocumentBuilder builder = factory.newDocumentBuilder();
> Document schemaDeclaration = builder.newDocument();
> ... (populate schemaDeclaration with elements and types)
> schema.setDeclaration(schemaDeclaration);
> types.addExtensibilityElement(schema);
> ...
>
> What do you think of this idea?
>
> Thanks,
>
> Ias
>
> =========================================================
> Lee, Changshin (Korean name)
> Ias (International name)
>                Company Web Site: http://www.tmax.co.kr
>                Personal Web Site: http://www.iasandcb.pe.kr
> ---------------------------------------------------------
> JSR 201, 204, 222 and 224 Expert Group Member
> Apache Web Services Project Member
> R&D Center
> Tmax Soft, Inc.
> =========================================================
>
>
>


------------------------------------
Lanka Sofware Foundation
------------------------------------

Re: Idea on writing types in WSDL

Posted by Davanum Srinivas <da...@gmail.com>.
Sounds like a good plan...(post 1.2?)

thanks,
dims

On Fri, 18 Jun 2004 16:42:29 +0900, Ias <ia...@tmax.co.kr> wrote:
> 
> While I was working on refactoring writing a WSDL file of fromJava.Emitter
> from org.apache.axis.utils.DOM2Writer to javax.wsdl.xml.WSDLWriter, some
> idea hit me.
> 
> The main point of the idea is creating javax.wsdl.extensions.type.Schema
> extensibility element. Currently, Axis uses DOM to make types part of a
> WSDL like this diagram:
> 
> Create a Definition in WSDL4J
> ->
> Create other constructs except Types in WSDL4J
> ->
> Convert the Definition to a Document in DOM
> ->
> Insert Elements for Types to the Document
> ->
> Write the Document
> 
> Once we have Schema extension element,
> 
> Create a Definition in WSDL4J
> ->
> Create other constructs in WSDL4J. Especially, Schema element takes the
> role of gathering declarations of elements and types with
> org.apache.axis.wsdl.fromJava.Types and serializers in
> org.apache.axis.encoding.ser package.
> ->
> Write the Definition by WSDLWriter.
> 
> Here's a brief design of Schema class:
> 
> package javax.wsdl.extensions.soap;
> 
> ...
> 
> public interface Schema extends ExtensibilityElement, java.io.Serializable
> {
> 
>   public void setDeclaration(Document declaration);
> 
>   public Document getDeclaration();
> }
> 
> Then, there will be a usage below:
> 
> WSDLFactory factory = WSDLFactory.newInstance();
> Defintion definition = factory.newDefinition();
> Types types = definition.createTypes();
> ExtensionRegistry registry = factory.newPopulatedExtensionRegistry();
> Schema schema = (Schema) registry.createExtension(javax.wsdl.Types, new
> QName("http://www.w3.org/2001/XMLSchema", "schema"));
> DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
> DocumentBuilder builder = factory.newDocumentBuilder();
> Document schemaDeclaration = builder.newDocument();
> ... (populate schemaDeclaration with elements and types)
> schema.setDeclaration(schemaDeclaration);
> types.addExtensibilityElement(schema);
> ...
> 
> What do you think of this idea?
> 
> Thanks,
> 
> Ias
> 
> =========================================================
> Lee, Changshin (Korean name)
> Ias (International name)
>                Company Web Site: http://www.tmax.co.kr
>                Personal Web Site: http://www.iasandcb.pe.kr
> ---------------------------------------------------------
> JSR 201, 204, 222 and 224 Expert Group Member
> Apache Web Services Project Member
> R&D Center
> Tmax Soft, Inc.
> =========================================================
> 
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/