Author: jason.greene(a)jboss.com
Date: 2007-02-08 19:39:19 -0500 (Thu, 08 Feb 2007)
New Revision: 2304
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSGenerate.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSImport.java
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
Log:
Add support for VM args to ant task
Properly write binding sections for empty doc bare services
Uppercase WSDL files always
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-02-08
11:44:40 UTC (rev 2303)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSWebServiceMetaDataBuilder.java 2007-02-09
00:39:19 UTC (rev 2304)
@@ -50,6 +50,7 @@
import org.jboss.ws.metadata.wsse.WSSecurityConfigFactory;
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
+import org.jboss.ws.tools.ToolsUtils;
import org.jboss.ws.tools.jaxws.JAXBWSDLGenerator;
import org.jboss.ws.tools.wsdl.WSDLGenerator;
import org.jboss.ws.tools.wsdl.WSDLWriter;
@@ -263,7 +264,8 @@
{
try
{
- String serviceName = serviceMetaData.getServiceName().getLocalPart();
+ // The RI uses upper case, and the TCK expects it, so we just mimic this even
though we don't really have to
+ String wsdlName =
ToolsUtils.firstLetterUpperCase(serviceMetaData.getServiceName().getLocalPart());
WSDLGenerator generator = new JAXBWSDLGenerator(jaxbCtx);
WSDLDefinitions wsdlDefinitions = generator.generate(serviceMetaData);
@@ -276,12 +278,12 @@
if (wsdlDirectory != null)
{
dir = wsdlDirectory;
- wsdlFile = new File(dir, serviceName + ".wsdl");
+ wsdlFile = new File(dir, wsdlName + ".wsdl");
}
else
{
dir = IOUtils.createTempDirectory();
- wsdlFile = File.createTempFile(serviceName, ".wsdl", dir);
+ wsdlFile = File.createTempFile(wsdlName, ".wsdl", dir);
wsdlFile.deleteOnExit();
}
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSGenerate.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSGenerate.java 2007-02-08
11:44:40 UTC (rev 2303)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSGenerate.java 2007-02-09
00:39:19 UTC (rev 2304)
@@ -30,6 +30,7 @@
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.ExecuteJava;
import org.apache.tools.ant.taskdefs.LogOutputStream;
+import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.Reference;
@@ -81,6 +82,7 @@
public class WSGenerate 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;
@@ -97,6 +99,11 @@
this.debug = debug;
}
+ public Commandline.Argument createJvmarg()
+ {
+ return command.createVmArgument();
+ }
+
public void setClasspath(Path classpath)
{
this.classpath = classpath;
@@ -212,7 +219,6 @@
private void executeForked() throws BuildException
{
- CommandlineJava command = new CommandlineJava();
command.setClassname(org.jboss.ws.tools.jaxws.WSGenerate.class.getName());
Path path = command.createClasspath(getProject());
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSImport.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSImport.java 2007-02-08
11:44:40 UTC (rev 2303)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/jaxws/ant/WSImport.java 2007-02-09
00:39:19 UTC (rev 2304)
@@ -34,6 +34,7 @@
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.ExecuteJava;
import org.apache.tools.ant.taskdefs.LogOutputStream;
+import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.Path;
@@ -77,6 +78,7 @@
*/
public class WSImport extends Task
{
+ private CommandlineJava command = new CommandlineJava();
private String wsdl = null;
private File destdir = null;
private File sourcedestdir = null;
@@ -94,6 +96,11 @@
{
this.debug = debug;
}
+
+ public Commandline.Argument createJvmarg()
+ {
+ return command.createVmArgument();
+ }
public void setBinding(File bindingFile)
{
@@ -238,7 +245,6 @@
private void executeForked() throws BuildException
{
- CommandlineJava command = new CommandlineJava();
command.setClassname(org.jboss.ws.tools.jaxws.WSImport.class.getName());
Path path = command.createClasspath(getProject());
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2007-02-08
11:44:40 UTC (rev 2303)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/tools/wsdl/WSDL11Writer.java 2007-02-09
00:39:19 UTC (rev 2304)
@@ -459,7 +459,9 @@
StringBuilder bodyParts = new StringBuilder();
if (Constants.DOCUMENT_LITERAL == wsdlStyle)
{
- bodyParts.append(reference.getPartName());
+ // Empty bare body
+ if (reference.getPartName() != null)
+ bodyParts.append(reference.getPartName());
}
else
{
Show replies by date