Author: heiko.braun(a)jboss.com
Date: 2007-09-26 09:10:41 -0400 (Wed, 26 Sep 2007)
New Revision: 4631
Modified:
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java
stack/native/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
Log:
Fix WSConsumer classloading: previous commit was incomplete
Modified:
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java
===================================================================
---
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java 2007-09-26
10:14:18 UTC (rev 4630)
+++
framework/trunk/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java 2007-09-26
13:10:41 UTC (rev 4631)
@@ -31,6 +31,7 @@
import java.io.PrintStream;
import java.net.URL;
import java.net.URLClassLoader;
+import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.List;
import java.lang.reflect.Method;
@@ -247,9 +248,19 @@
consumer.setTargetPackage("org.jboss.test.ws.tools.testTarget");
consumer.setGenerateSource(true);
consumer.setTarget("2.1");
-
- consumeWSDL();
+ try
+ {
+ consumeWSDL();
+ fail("Target 2.1 should not be supported");
+ }
+ catch (Exception e)
+ {
+ File outputDir = new
File(System.getProperty("user.dir")+"/wsconsume/java/org/jboss/test/ws/tools/testTarget");
+ outputDir.deleteOnExit();
+ return;
+ }
+
URLClassLoader loader = new URLClassLoader(new URL[] { new
URL("file:"+System.getProperty("user.dir")+"/wsconsume/java/")
});
String seiClassName = "org.jboss.test.ws.tools.testTarget.TestService";
Class sei = loader.loadClass(seiClassName);
@@ -263,7 +274,7 @@
for(Class c : m.getParameterTypes())
{
if(c.isArray() &&
- c.getComponentType().equals(WebServiceFeature.class))
+ c.getComponentType().equals(WebServiceFeature.class))
{
featureSig = true;
break;
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2007-09-26
10:14:18 UTC (rev 4630)
+++
stack/native/trunk/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2007-09-26
13:10:41 UTC (rev 4631)
@@ -47,7 +47,7 @@
private String targetPackage;
private PrintStream messageStream;
private String wsdlLocation;
- private List<String> additionalCompilerClassPath;
+ private List<String> additionalCompilerClassPath = new
ArrayList<String>();
private String target = "2.0";
@Override
@@ -104,7 +104,7 @@
}
public void setTarget(String target)
- {
+ {
this.target = target;
}
@@ -171,6 +171,9 @@
args.add(outputDir.getAbsolutePath());
// Always set the target
+ if(!target.equals("2.0"))
+ throw new IllegalArgumentException("WSConsume (native) only supports JAX-WS
2.0");
+
args.add("-target");
args.add(target);
Show replies by date