axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <dava...@gmail.com>
Subject Re: Idea on writing types in WSDL
Date Fri, 18 Jun 2004 12:22:27 GMT
Sounds like a good plan...(post 1.2?)

thanks,
dims

On Fri, 18 Jun 2004 16:42:29 +0900, Ias <iasandcb@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/

Mime
View raw message