Author: thomas.diesler(a)jboss.com
Date: 2008-05-08 12:06:12 -0400 (Thu, 08 May 2008)
New Revision: 6975
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextEJB.java
spi/trunk/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java
spi/trunk/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java
spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java
spi/trunk/src/test/java/org/jboss/test/wsf/spi/tools/CmdConsumeTracker.java
Log:
Add support for -Xnocompile
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextEJB.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextEJB.java 2008-05-08
15:14:27 UTC (rev 6974)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextEJB.java 2008-05-08
16:06:12 UTC (rev 6975)
@@ -24,10 +24,13 @@
// $Id$
import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
+import org.w3c.dom.Element;
import java.security.Principal;
+import java.util.Collection;
import javax.ejb.EJBContext;
+import javax.xml.ws.EndpointReference;
import javax.xml.ws.handler.MessageContext;
/**
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java 2008-05-08
15:14:27 UTC (rev 6974)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/tools/WSContractConsumer.java 2008-05-08
16:06:12 UTC (rev 6975)
@@ -123,6 +123,13 @@
public abstract void setGenerateSource(boolean generateSource);
/**
+ * Enables/Disables Java source compilation.
+ *
+ * @param nocompile whether or not to compile Java source.
+ */
+ public abstract void setNoCompile(boolean nocompile);
+
+ /**
* Sets the target package for generated source. If not specified the default
* is based off of the XML namespace.
*
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java 2008-05-08
15:14:27 UTC (rev 6974)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/tools/ant/WSConsumeTask.java 2008-05-08
16:06:12 UTC (rev 6975)
@@ -93,6 +93,7 @@
private boolean verbose;
private boolean fork;
private boolean debug;
+ private boolean nocompile;
private String target;
// Not actually used right now
@@ -156,6 +157,11 @@
this.verbose = verbose;
}
+ public void setNoCompile(boolean nocompile)
+ {
+ this.nocompile = nocompile;
+ }
+
public void setWsdl(String wsdl)
{
this.wsdl = wsdl;
@@ -183,35 +189,36 @@
Thread.currentThread().setContextClassLoader(antLoader);
try
{
- WSContractConsumer importer = WSContractConsumer.newInstance();
- importer.setGenerateSource(keep);
- importer.setExtension(extension);
+ WSContractConsumer consumer = WSContractConsumer.newInstance();
+ consumer.setGenerateSource(keep);
+ consumer.setExtension(extension);
+ consumer.setNoCompile(nocompile);
if (destdir != null)
- importer.setOutputDirectory(destdir);
+ consumer.setOutputDirectory(destdir);
if (sourcedestdir != null)
- importer.setSourceDirectory(sourcedestdir);
+ consumer.setSourceDirectory(sourcedestdir);
if (targetPackage != null)
- importer.setTargetPackage(targetPackage);
+ consumer.setTargetPackage(targetPackage);
if (wsdlLocation != null)
- importer.setWsdlLocation(wsdlLocation);
+ consumer.setWsdlLocation(wsdlLocation);
if (catalog != null)
- importer.setCatalog(catalog);
+ consumer.setCatalog(catalog);
if (bindingFiles != null && bindingFiles.size() > 0)
- importer.setBindingFiles(bindingFiles);
+ consumer.setBindingFiles(bindingFiles);
if (target != null)
- importer.setTarget(target);
+ consumer.setTarget(target);
log("Consuming wsdl: " + wsdl, Project.MSG_INFO);
if (verbose)
{
- importer.setMessageStream(new PrintStream(new LogOutputStream(this,
Project.MSG_INFO)));
+ consumer.setMessageStream(new PrintStream(new LogOutputStream(this,
Project.MSG_INFO)));
}
try
{
- importer.setAdditionalCompilerClassPath(getTaskClassPathStrings());
- importer.consume(wsdl);
+ consumer.setAdditionalCompilerClassPath(getTaskClassPathStrings());
+ consumer.consume(wsdl);
}
catch (MalformedURLException e)
{
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java 2008-05-08 15:14:27
UTC (rev 6974)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/tools/cmd/WSConsume.java 2008-05-08 16:06:12
UTC (rev 6975)
@@ -192,35 +192,35 @@
private int importServices(URL wsdl)
{
- WSContractConsumer importer = WSContractConsumer.newInstance();
+ WSContractConsumer consumer = WSContractConsumer.newInstance();
- importer.setGenerateSource(generateSource);
- importer.setOutputDirectory(outputDir);
- importer.setExtension(extension);
+ consumer.setGenerateSource(generateSource);
+ consumer.setOutputDirectory(outputDir);
+ consumer.setExtension(extension);
if (sourceDir != null)
- importer.setSourceDirectory(sourceDir);
+ consumer.setSourceDirectory(sourceDir);
if (! quiet)
- importer.setMessageStream(System.out);
+ consumer.setMessageStream(System.out);
if (catalog != null)
- importer.setCatalog(catalog);
+ consumer.setCatalog(catalog);
if (targetPackage != null)
- importer.setTargetPackage(targetPackage);
+ consumer.setTargetPackage(targetPackage);
if (wsdlLocation != null)
- importer.setWsdlLocation(wsdlLocation);
+ consumer.setWsdlLocation(wsdlLocation);
if (bindingFiles != null && bindingFiles.size() > 0)
- importer.setBindingFiles(bindingFiles);
+ consumer.setBindingFiles(bindingFiles);
if(target!=null)
- importer.setTarget(target);
+ consumer.setTarget(target);
try
{
- importer.consume(wsdl);
+ consumer.consume(wsdl);
return 0;
}
catch (Throwable t)
Modified: spi/trunk/src/test/java/org/jboss/test/wsf/spi/tools/CmdConsumeTracker.java
===================================================================
--- spi/trunk/src/test/java/org/jboss/test/wsf/spi/tools/CmdConsumeTracker.java 2008-05-08
15:14:27 UTC (rev 6974)
+++ spi/trunk/src/test/java/org/jboss/test/wsf/spi/tools/CmdConsumeTracker.java 2008-05-08
16:06:12 UTC (rev 6975)
@@ -107,4 +107,10 @@
{
LAST_EVENT += "setExtension";
}
+
+ @Override
+ public void setNoCompile(boolean nocompile)
+ {
+ LAST_EVENT += "setNoCompile";
+ }
}
Show replies by date