01: /*
02: * BEGIN_HEADER - DO NOT EDIT
03: *
04: * The contents of this file are subject to the terms
05: * of the Common Development and Distribution License
06: * (the "License"). You may not use this file except
07: * in compliance with the License.
08: *
09: * You can obtain a copy of the license at
10: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
11: * See the License for the specific language governing
12: * permissions and limitations under the License.
13: *
14: * When distributing Covered Code, include this CDDL
15: * HEADER in each file and include the License file at
16: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
17: * If applicable add the following below this CDDL HEADER,
18: * with the fields enclosed by brackets "[]" replaced with
19: * your own identifying information: Portions Copyright
20: * [year] [name of copyright owner]
21: */
22:
23: /*
24: * @(#)WsdlWriter.java
25: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
26: *
27: * END_HEADER - DO NOT EDIT
28: */
29: package com.sun.jbi.wsdl2;
30:
31: import java.io.IOException;
32: import java.io.OutputStream;
33: import java.io.Writer;
34:
35: import org.w3c.dom.Document;
36:
37: /**
38: * This interface describes a collection of methods that allow a WSDL 2.0
39: * Description component to be written to a writer in an XML format that
40: * follows the WSDL 2.0 schema.
41: *
42: * Based on javax.wsdl.WSDLWriter, Matthew J. Duftler, IBM.
43: *
44: * @author Sun Microsystems, Inc.
45: */
46: public interface WsdlWriter {
47: /**
48: * Return a document generated from the specified WSDL model.
49: *
50: * @param model The WSDL Description component to be written
51: * @return A DOM document that reflects the contents of the given model
52: *
53: * @exception WsdlException if a WSDL 2.0 validity error is encountered.
54: */
55: Document getDocument(Description model) throws WsdlException;
56:
57: /**
58: * @deprecated use Document getDocument(Description model)
59: */
60: Document getDocument(Definitions model) throws WsdlException;
61:
62: /**
63: * Write the specified WSDL Description to the specified Writer.
64: *
65: * @param model The WSDL Description component to be written
66: * @param sink The Writer to write the xml to
67: *
68: * @exception WsdlException if a WSDL 2.0 validity error is encountered.
69: * @exception IOException if an I/O errors while writing to the given
70: * writer.
71: */
72: void writeDescription(Description model, Writer sink)
73: throws WsdlException, IOException;
74:
75: /**
76: * @deprecated use writeDescription
77: */
78: void writeWsdl(Definitions model, Writer sink)
79: throws WsdlException, IOException;
80:
81: /**
82: * Write the specified WSDL Description to the specified OutputStream.
83: *
84: * @param model The WSDL Description component to be written
85: * @param sink The OutputStream to write the XML to
86: *
87: * @exception WsdlException if a WSDL 2.0 validity error is encountered.
88: * @exception IOException if an I/O errors while writing to the given
89: * output stream.
90: */
91: void writeDescription(Description model, OutputStream sink)
92: throws WsdlException, IOException;
93:
94: /**
95: * @deprecated use writeDescription
96: */
97: void writeWsdl(Definitions model, OutputStream sink)
98: throws WsdlException, IOException;
99: }
|