KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > caucho > ant > jaxws > WSDLImporter


1 /*
2  * Copyright (c) 1998-2006 Caucho Technology -- all rights reserved
3  *
4  * This file is part of Resin(R) Open Source
5  *
6  * Each copy or derived work must preserve the copyright notice and this
7  * notice unmodified.
8  *
9  * Resin Open Source is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * Resin Open Source is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
17  * of NON-INFRINGEMENT. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Resin Open Source; if not, write to the
22  * Free SoftwareFoundation, Inc.
23  * 59 Temple Place, Suite 330
24  * Boston, MA 02111-1307 USA
25  *
26  * @author Emil Ong
27  */

28
29 package com.caucho.ant.jaxws;
30
31 import com.caucho.soap.reflect.WebServiceIntrospector;
32 import com.caucho.server.util.CauchoSystem;
33
34 import java.io.*;
35
36 /**
37  * Command-line tool and ant task to generate Java from WSDLs.
38  */

39 public class WSDLImporter extends org.apache.tools.ant.Task {
40   private String JavaDoc _wsdl;
41   private String JavaDoc _destDir;
42   private String JavaDoc _sourceDestDir;
43   private boolean _keep;
44   private boolean _verbose;
45   private boolean _extension;
46   private boolean _debug;
47   private boolean _fork;
48   private String JavaDoc _wsdlLocation;
49   private String JavaDoc _catalog;
50   private String JavaDoc _package;
51   private String JavaDoc _bindingPath;
52   private Binding _binding;
53
54   private static void error(String JavaDoc msg)
55   {
56     System.err.println(msg);
57     System.exit(1);
58   }
59
60   public void setWsdl(String JavaDoc wsdl)
61   {
62     _wsdl = wsdl;
63   }
64
65   public void setDestdir(String JavaDoc destDir)
66   {
67     _destDir = destDir;
68   }
69
70   public void setSourcedestdir(String JavaDoc sourceDestDir)
71   {
72     _sourceDestDir = sourceDestDir;
73   }
74
75   public void setKeep(boolean keep)
76   {
77     _keep = keep;
78   }
79
80   public void setVerbose(boolean verbose)
81   {
82     _verbose = verbose;
83   }
84
85   public void setExtension(boolean extension)
86   {
87     _extension = extension;
88   }
89
90   public void setDebug(boolean debug)
91   {
92     _debug = debug;
93   }
94
95   public void setFork(boolean fork)
96   {
97     _fork = fork;
98   }
99
100   public void setWsdllocation(String JavaDoc wsdlLocation)
101   {
102     _wsdlLocation = wsdlLocation;
103   }
104
105   public void setCatalog(String JavaDoc catalog)
106   {
107     _catalog = catalog;
108   }
109
110   public void setPackage(String JavaDoc pkg)
111   {
112     _package = pkg;
113   }
114
115   public void addBinding(Binding binding)
116   {
117     _binding = binding;
118   }
119   
120   public void setBinding(String JavaDoc bindingPath)
121   {
122     _bindingPath = bindingPath;
123   }
124   
125   /**
126    * Executes the ant task.
127    **/

128   public void execute()
129     throws org.apache.tools.ant.BuildException
130   {
131     // XXX
132
}
133
134   public static void main(String JavaDoc[] args)
135     throws Exception JavaDoc
136   {
137   }
138
139   public static class Binding {
140     private String JavaDoc _dir;
141     private String JavaDoc _includes;
142     private String JavaDoc _excludes; // undocumented in tck
143

144     public String JavaDoc getDir()
145     {
146       return _dir;
147     }
148
149     public void setDir(String JavaDoc dir)
150     {
151       _dir = dir;
152     }
153
154     public String JavaDoc getIncludes()
155     {
156       return _includes;
157     }
158
159     public void setIncludes(String JavaDoc includes)
160     {
161       _includes = includes;
162     }
163
164     public String JavaDoc getExcludes()
165     {
166       return _excludes;
167     }
168
169     public void setExcludes(String JavaDoc excludes)
170     {
171       _excludes = excludes;
172     }
173   }
174 }
175
176
177
Popular Tags