Author: heiko.braun(a)jboss.com
Date: 2007-07-06 06:30:13 -0400 (Fri, 06 Jul 2007)
New Revision: 3808
Modified:
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
Log:
Docs and comments
Modified:
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java
===================================================================
---
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java 2007-07-06
10:19:18 UTC (rev 3807)
+++
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java 2007-07-06
10:30:13 UTC (rev 3808)
@@ -48,7 +48,7 @@
* Obtain a new instance of a WSContractProvider. This will use the current
* thread's context class loader to locate the WSContractProviderFactory
* implementation.
- *
+ *
* @return a new WSContractProvider
*/
public static WSContractConsumer newInstance()
@@ -59,7 +59,7 @@
/**
* Obtain a new instance of a WSContractConsumer. The specified ClassLoader will be
used to
* locate the WebServiceImporterProvide implementation
- *
+ *
* @param loader the ClassLoader to use
* @return a new WSContractConsumer
*/
@@ -80,37 +80,37 @@
/**
* Specifies the JAX-WS and JAXB binding files to use on import operations.
- *
+ *
* @param bindingFiles list of JAX-WS or JAXB binding files
*/
public abstract void setBindingFiles(List<File> bindingFiles);
/**
* Sets the OASIS XML Catalog file to use for entity resolution.
- *
+ *
* @param catalog the OASIS XML Catalog file
*/
public abstract void setCatalog(File catalog);
/**
* Sets the main output directory. If the directory does not exist, it will be
created.
- *
+ *
* @param directory the root directory for generated files
*/
public abstract void setOutputDirectory(File directory);
/**
* Sets the source directory. This directory will contain any generated Java source.
- * If the directory does not exist, it will be created. If not specified,
+ * If the directory does not exist, it will be created. If not specified,
* the output directory will be used instead.
- *
+ *
* @param directory the root directory for generated source code
*/
public abstract void setSourceDirectory(File directory);
/**
* Enables/Disables Java source generation.
- *
+ *
* @param generateSource whether or not to generate Java source.
*/
public abstract void setGenerateSource(boolean generateSource);
@@ -118,14 +118,14 @@
/**
* Sets the target package for generated source. If not specified the default
* is based off of the XML namespace.
- *
+ *
* @param targetPackage the target package for generated source
*/
public abstract void setTargetPackage(String targetPackage);
/**
* Sets the @(a)WebService.wsdlLocation and @(a)WebServiceClient.wsdlLocation attributes
to a custom value.
- *
+ *
* @param wsdlLocation the custom WSDL location to use in generated source
*/
public abstract void setWsdlLocation(String wsdlLocation);
@@ -133,26 +133,26 @@
/**
* Sets the PrintStream to use for status feedback. The simplest example
* would be to use System.out.
- *
+ *
* @param messageStream the stream to use for status messages:
*/
public abstract void setMessageStream(PrintStream messageStream);
/**
* Sets the additional classpath to use if/when invoking the Java compiler.
- * Typically an implementation will use the system
<code>java.class.path</code>
+ * Typically an implementation will use the system
<code>java.class.path</code>
* property. So for most normal applications this method is not needed. However,
* if this API is being used from an isolated classloader, then it needs to
- * be called in order to reference all jars that are required by the
+ * be called in order to reference all jars that are required by the
* implementation.
- *
- * @param classPath a list of strings where each entry references a
+ *
+ * @param classPath a list of strings where each entry references a
* single jar or directory
*/
public abstract void setAdditionalCompilerClassPath(List<String> classPath);
/**
- * Set the target JAX-WS specification revision. Defaults to
<code>2.0</code>
+ * Set the target JAX-WS specification target. Defaults to
<code>2.0</code>
* @param target the JAX-WS specification version. Allowed values are 2.0, 2.1
*/
public abstract void setTarget(String target);
Modified:
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java
===================================================================
---
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java 2007-07-06
10:19:18 UTC (rev 3807)
+++
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java 2007-07-06
10:30:13 UTC (rev 3808)
@@ -42,7 +42,7 @@
/**
* Ant task which consumes a Web Service contract.
- *
+ *
* <table border="1">
* <tr align="left" BGCOLOR="#CCCCFF"
CLASS="TableHeadingColor"><th>Attribute</th><th>Description</th><th>Default</th></tr>
* <tr><td>fork</td><td>Whether or not to run the generation
task in a separate VM.</td><td>true</td></tr>
@@ -53,14 +53,14 @@
* <tr><td>wsdlLocation</td><td>Value to use for
@(a)WebService.wsdlLocation</td><td>generated</td></tr>
* <tr><td>destdir</td><td>The output directory for generated
artifacts.</td><td>"output"</td></tr>
* <tr><td>sourcedestdir</td><td>The output directory for Java
source.</td><td>value of destdir</td></tr>
- * <tr><td>revision</td><td>The JAX-WS specification
target</td><td>2.0 | 2.1</td></tr>
+ * <tr><td>target</td><td>The JAX-WS specification
target</td><td>2.0 | 2.1</td></tr>
* <tr><td>verbose</td><td>Enables more informational output
about cmd progress.</td><td>false</td><tr>
* <tr><td>wsdl*</td><td>The WSDL file or
URL</td><td>n/a</td><tr>
* </table>
* <b>* = required.</b>
- *
+ *
* <p>Example:
- *
+ *
* <pre>
* <WSConsumeTask
* fork="true"
@@ -68,12 +68,12 @@
* destdir="output"
* sourcedestdir="gen-src"
* keep="true"
- * wsdllocation="handEdited.wsdl"
+ * wsdllocation="handEdited.wsdl"
* wsdl="foo.wsdl">
* <binding dir="binding-files"
includes="*.xml" excludes="bad.xml"/>
* </wsimport>
* </pre>
- *
+ *
* @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
* @version $Revision$
*/
Modified:
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java
===================================================================
---
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java 2007-07-06
10:19:18 UTC (rev 3807)
+++
branches/jbossws-2.0/integration/spi/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java 2007-07-06
10:30:13 UTC (rev 3808)
@@ -30,18 +30,17 @@
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
/**
* WSConsumeTask is a cmd line tool that generates portable JAX-WS artifacts
* from a WSDL file.
- *
+ *
* <pre>
* usage: WSConsumeTask [options] <wsdl-url>
- * options:
+ * options:
* -h, --help Show this help message
- * -b, --binding=<file> One or more JAX-WS or JAXB binding files
+ * -b, --binding=<file> One or more JAX-WS or JAXB binding files
* -k, --keep Keep/Generate Java source
* -c --catalog=<file> Oasis XML Catalog file for entity resolution
* -p --package=<name> The target package for generated source
@@ -53,7 +52,7 @@
* -v, --verbose Show full exception stack traces
* -l, --load-consumer Load the consumer and exit (debug utility)
* </pre>
- *
+ *
* @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
* @version $Revision$
*/
@@ -79,11 +78,11 @@
URL wsdl = importer.parseArguments(args);
System.exit(importer.importServices(wsdl));
}
-
+
private URL parseArguments(String[] args)
{
String shortOpts = "b:c:p:w:o:s:t:khqvl";
- LongOpt[] longOpts =
+ LongOpt[] longOpts =
{
new LongOpt("binding", LongOpt.REQUIRED_ARGUMENT, null, 'b'),
new LongOpt("catalog", LongOpt.REQUIRED_ARGUMENT, null, 'c'),
@@ -98,7 +97,7 @@
new LongOpt("verbose", LongOpt.NO_ARGUMENT, null, 'v'),
new LongOpt("load-consumer", LongOpt.NO_ARGUMENT, null, 'l'),
};
-
+
Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
int c;
while ((c = getopt.getopt()) != -1)
@@ -161,7 +160,7 @@
printHelp();
System.exit(1);
}
-
+
URL url = null;
try
{
@@ -180,11 +179,11 @@
System.err.println("Error: Invalid URI: " + args[wsdlPos]);
System.exit(1);
}
-
+
return url;
}
-
-
+
+
private int importServices(URL wsdl)
{
WSContractConsumer importer = WSContractConsumer.newInstance();
@@ -196,16 +195,16 @@
if (! quiet)
importer.setMessageStream(System.out);
-
+
if (catalog != null)
importer.setCatalog(catalog);
-
+
if (targetPackage != null)
importer.setTargetPackage(targetPackage);
-
+
if (wsdlLocation != null)
importer.setWsdlLocation(wsdlLocation);
-
+
if (bindingFiles != null && bindingFiles.size() > 0)
importer.setBindingFiles(bindingFiles);
@@ -231,9 +230,9 @@
{
t.printStackTrace(System.err);
}
-
+
}
-
+
return 1;
}
Modified:
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
===================================================================
---
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2007-07-06
10:19:18 UTC (rev 3807)
+++
branches/jbossws-2.0/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2007-07-06
10:30:13 UTC (rev 3808)
@@ -104,7 +104,7 @@
}
public void setTarget(String target)
- {
+ {
this.target = target;
}
@@ -187,7 +187,7 @@
boolean success = compileTool.run(args.toArray(new String[args.size()]));
if (!success)
- throw new IllegalStateException("WsImport invocation failed");
+ throw new IllegalStateException("WsImport invocation failed. Try the
verbose switch for more information");
}
catch (Throwable t)
{