Author: richard.opalka(a)jboss.com
Date: 2010-03-26 02:37:07 -0400 (Fri, 26 Mar 2010)
New Revision: 11862
Modified:
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/ant/WSProvideTask.java
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java
spi/branches/jbossws-spi-1.1.2/src/test/java/org/jboss/test/wsf/spi/tools/CmdProvideTracker.java
Log:
[JBPAPP-3999] implementing support for protocol in wsprovide
Modified:
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java
===================================================================
---
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java 2010-03-25
14:34:22 UTC (rev 11861)
+++
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/WSContractProvider.java 2010-03-26
06:37:07 UTC (rev 11862)
@@ -98,6 +98,13 @@
* @param generateWsdl whether or not to generate WSDL
*/
public abstract void setGenerateWsdl(boolean generateWsdl);
+
+ /**
+ * Enables/Disables SOAP 1.2 binding extension
+ *
+ * @param extension whether or not to enable SOAP 1.2 binding extension
+ */
+ public abstract void setExtension(boolean extension);
/**
* Enables/Disables Java source generation.
Modified:
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/ant/WSProvideTask.java
===================================================================
---
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/ant/WSProvideTask.java 2010-03-25
14:34:22 UTC (rev 11861)
+++
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/ant/WSProvideTask.java 2010-03-26
06:37:07 UTC (rev 11862)
@@ -53,8 +53,9 @@
* <tr><td>resourcedestdir</td><td>The output directory for
resource artifacts (WSDL/XSD).</td><td>value of destdir</td></tr>
* <tr><td>sourcedestdir</td><td>The output directory for Java
source.</td><td>value of destdir</td></tr>
* <tr><td>genwsdl</td><td>Whether or not to generate
WSDL.</td><td>false</td><tr>
+ * <tr><td>extension</td><td>Enable SOAP 1.2 binding
extension.</td><td>false</td></tr>
* <tr><td>verbose</td><td>Enables more informational output
about cmd progress.</td><td>false</td><tr>
- * <tr><td>sei*</td><td>Service Endpoint
Implementation.</td><td></td><tr>
+ * <tr><td>sei</td><td>Service Endpoint
Implementation.</td><td></td><tr>
* <tr><td>classpath</td><td>The classpath that contains the
service endpoint implementation.</td><td>""</tr>
* </table>
* <b>* = required.</b>
@@ -73,6 +74,7 @@
* resourcedestdir="out-resource"
* sourcedestdir="out-source"
* genwsdl="true"
+ * extension="true"
* verbose="true"
*
sei="org.jboss.test.ws.jaxws.jsr181.soapbinding.DocWrappedServiceImpl">
* <classpath>
@@ -83,20 +85,22 @@
* </pre>
*
* @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
public class WSProvideTask extends Task
{
private Path classpath = new Path(getProject());
private CommandlineJava command = new CommandlineJava();
- private String sei = null;
- private File destdir = null;
- private File resourcedestdir = null;
- private File sourcedestdir = null;
- private boolean keep = false;
- private boolean genwsdl = false;
- private boolean verbose = false;
- private boolean fork = false;
- private boolean debug = false;
+ private String sei;
+ private File destdir;
+ private File resourcedestdir;
+ private File sourcedestdir;
+ private boolean keep;
+ private boolean extension;
+ private boolean genwsdl;
+ private boolean verbose;
+ private boolean fork;
+ private boolean debug;
// Not actually used right now
public void setDebug(boolean debug)
@@ -128,7 +132,20 @@
{
this.destdir = destdir;
}
+
+ public void setExtension(boolean extension)
+ {
+ this.extension = extension;
+ }
+ public void setProtocol(String protocol)
+ {
+ if (protocol != null)
+ {
+ this.extension = protocol.toLowerCase().indexOf("Xsoap1.2") != -1;
+ }
+ }
+
public void setKeep(boolean keep)
{
this.keep = keep;
@@ -208,6 +225,8 @@
gen.setMessageStream(new PrintStream(new LogOutputStream(this,
Project.MSG_INFO)));
gen.setGenerateSource(keep);
gen.setGenerateWsdl(genwsdl);
+ gen.setExtension(extension);
+
if (destdir != null)
gen.setOutputDirectory(destdir);
if (resourcedestdir != null)
@@ -266,6 +285,9 @@
if (genwsdl)
command.createArgument().setValue("-w");
+ if (extension)
+ command.createArgument().setValue("-e");
+
if (destdir != null)
{
command.createArgument().setValue("-o");
Modified:
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java
===================================================================
---
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java 2010-03-25
14:34:22 UTC (rev 11861)
+++
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java 2010-03-26
06:37:07 UTC (rev 11862)
@@ -59,18 +59,18 @@
public class WSConsume
{
private List<File> bindingFiles = new ArrayList<File>();
- private boolean generateSource = false;
- private File catalog = null;
- private String targetPackage = null;
- private String wsdlLocation = null;
- private boolean quiet = false;
- private boolean verbose = false;
- private boolean noCompile = false;
- private boolean loadConsumer = false;
- private boolean extension = false;
private File outputDir = new File("output");
- private File sourceDir = null;
- private String target = null;
+ private boolean generateSource;
+ private File catalog;
+ private String targetPackage;
+ private String wsdlLocation;
+ private boolean quiet;
+ private boolean verbose;
+ private boolean loadConsumer;
+ private boolean extension;
+ private boolean noCompile;
+ private File sourceDir;
+ private String target;
public static final String PROGRAM_NAME = System.getProperty("program.name",
WSConsume.class.getName());
Modified:
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java
===================================================================
---
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java 2010-03-25
14:34:22 UTC (rev 11861)
+++
spi/branches/jbossws-spi-1.1.2/src/main/java/org/jboss/wsf/spi/tools/cmd/WSProvide.java 2010-03-26
06:37:07 UTC (rev 11862)
@@ -51,21 +51,23 @@
* -q, --quiet Be somewhat more quiet
* -t, --show-traces Show full exception stack traces
* -l, --load-provider Load the provider and exit (debug utility)
+ * -e, --extension Enable SOAP 1.2 binding extension
* </pre>
*
* @author <a href="mailto:jason.greene@jboss.com">Jason T.
Greene</a>
*/
public class WSProvide
{
- private boolean generateSource = false;
- private boolean generateWsdl = false;
- private boolean quiet = false;
- private boolean showTraces = false;
- private boolean loadProvider = false;
private ClassLoader loader = Thread.currentThread().getContextClassLoader();
private File outputDir = new File("output");
- private File resourceDir = null;
- private File sourceDir = null;
+ private boolean generateSource;
+ private boolean generateWsdl;
+ private boolean extension;
+ private boolean quiet;
+ private boolean showTraces;
+ private boolean loadProvider;
+ private File resourceDir;
+ private File sourceDir;
public static final String PROGRAM_NAME = System.getProperty("program.name",
WSProvide.class.getSimpleName());
@@ -78,7 +80,7 @@
private String parseArguments(String[] args)
{
- String shortOpts = "hwko:r:s:c:qtl";
+ String shortOpts = "hwko:r:s:c:qtle";
LongOpt[] longOpts =
{
new LongOpt("help", LongOpt.NO_ARGUMENT, null, 'h'),
@@ -91,6 +93,7 @@
new LongOpt("quiet", LongOpt.NO_ARGUMENT, null, 'q'),
new LongOpt("show-traces", LongOpt.NO_ARGUMENT, null, 't'),
new LongOpt("load-provider", LongOpt.NO_ARGUMENT, null, 'l'),
+ new LongOpt("extension", LongOpt.NO_ARGUMENT, null, 'e'),
};
Getopt getopt = new Getopt(PROGRAM_NAME, args, shortOpts, longOpts);
@@ -126,6 +129,9 @@
case 'l':
loadProvider = true;
break;
+ case 'e':
+ extension = true;
+ break;
case 'h':
printHelp();
System.exit(0);
@@ -170,6 +176,7 @@
gen.setGenerateWsdl(generateWsdl);
gen.setGenerateSource(generateSource);
gen.setOutputDirectory(outputDir);
+ gen.setExtension(extension);
if (resourceDir != null)
gen.setResourceDirectory(resourceDir);
if (sourceDir != null)
@@ -234,9 +241,10 @@
out.println(" -o, --output=<directory> The directory to put
generated artifacts");
out.println(" -r, --resource=<directory> The directory to put
resource artifacts");
out.println(" -s, --source=<directory> The directory to put Java
source");
+ out.println(" -e, --extension Enable SOAP 1.2 binding
extension");
out.println(" -q, --quiet Be somewhat more quiet");
out.println(" -t, --show-traces Show full exception stack
traces");
- out.println(" -l, --load-provider Load the provider and exit (debug
utility)");
- out.flush();
+ out.println(" -l, --load-provider Load the provider and exit (debug
utility)");
+ out.flush();
}
}
Modified:
spi/branches/jbossws-spi-1.1.2/src/test/java/org/jboss/test/wsf/spi/tools/CmdProvideTracker.java
===================================================================
---
spi/branches/jbossws-spi-1.1.2/src/test/java/org/jboss/test/wsf/spi/tools/CmdProvideTracker.java 2010-03-25
14:34:22 UTC (rev 11861)
+++
spi/branches/jbossws-spi-1.1.2/src/test/java/org/jboss/test/wsf/spi/tools/CmdProvideTracker.java 2010-03-26
06:37:07 UTC (rev 11862)
@@ -39,6 +39,11 @@
LAST_EVENT += "setGenerateWsdl";
}
+ public void setExtension(boolean extension)
+ {
+ LAST_EVENT += "setExtension";
+ }
+
public void setGenerateSource(boolean generateSource)
{
LAST_EVENT += "setGenerateSource";