KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis > encoding > Serializer


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17
18 package org.apache.axis.encoding;
19
20 import org.apache.axis.wsdl.fromJava.Types;
21 import org.w3c.dom.Element JavaDoc;
22 import org.xml.sax.Attributes JavaDoc;
23
24 import javax.xml.namespace.QName JavaDoc;
25 import java.io.IOException JavaDoc;
26
27 /**
28  * This interface describes the AXIS Serializer.
29  * An Axis compliant Serializer must provide one or more
30  * of the following methods:
31  *
32  * public <constructor>(Class javaType, QName xmlType)
33  * public <constructor>()
34  *
35  * This will allow for construction of generic factories that introspect the class
36  * to determine how to construct a deserializer.
37  * The xmlType, javaType arguments are filled in with the values known by the factory.
38  */

39 public interface Serializer extends javax.xml.rpc.encoding.Serializer JavaDoc {
40     /**
41      * Serialize an element named name, with the indicated attributes
42      * and value.
43      * @param name is the element name
44      * @param attributes are the attributes...serialize is free to add more.
45      * @param value is the value
46      * @param context is the SerializationContext
47      */

48     public void serialize(QName JavaDoc name, Attributes JavaDoc attributes,
49                           Object JavaDoc value, SerializationContext context)
50         throws IOException JavaDoc;
51
52     /**
53      * Return XML schema for the specified type, suitable for insertion into
54      * the &lt;types&gt; element of a WSDL document, or underneath an
55      * &lt;element&gt; or &lt;attribute&gt; declaration.
56      *
57      * @param javaType the Java Class we're writing out schema for
58      * @param types the Java2WSDL Types object which holds the context
59      * for the WSDL being generated.
60      * @return a type element containing a schema simpleType/complexType
61      * @see org.apache.axis.wsdl.fromJava.Types
62      */

63     public Element JavaDoc writeSchema(Class JavaDoc javaType, Types types) throws Exception JavaDoc;
64 }
65
66
67
Popular Tags