Author: heiko.braun(a)jboss.com
Date: 2008-05-29 17:52:37 -0400 (Thu, 29 May 2008)
New Revision: 7218
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPluginDelegate.java
Modified:
framework/trunk/framework.iml
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java
Log:
JBWS-2175: Sort classpath first then delegate to plugin
Modified: framework/trunk/framework.iml
===================================================================
--- framework/trunk/framework.iml 2008-05-29 21:48:21 UTC (rev 7217)
+++ framework/trunk/framework.iml 2008-05-29 21:52:37 UTC (rev 7218)
@@ -4,80 +4,71 @@
<component name="NewModuleRootManager"
inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/framework/src/main/etc"
isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/framework/src/main/java"
isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/framework/src/test/java"
isTestSource="true" />
- <sourceFolder url="file://$MODULE_DIR$/framework/src/test/resources"
isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/etc"
isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java"
isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/java"
isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/resources"
isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="spi" />
<orderEntry type="module-library">
- <library name="M2 Dep:
org.jboss:jboss-common-core:jar:2.2.1.GA:compile">
+ <library name="M2 Dep:
org.jboss.ws:jbossws-common:jar:3.0.0-SNAPSHOT:compile">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/org/jboss/jboss-common-core/2.2.1.GA/jboss-common-core-2.2.1.GA.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/org/jboss/ws/jbossws-common/3.0.0-SNAPSHOT/jbossws-common-3.0.0-SNAPSHOT.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep: tjws:webserver:jar:1.3.3:compile">
+ <library name="M2 Dep: wsdl4j:wsdl4j:jar:1.6.1:compile">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/tjws/webserver/1.3.3/webserver-1.3.3.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/wsdl4j/wsdl4j/1.6.1/wsdl4j-1.6.1.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep: log4j:log4j:jar:1.2.14:compile">
+ <library name="M2 Dep: dom4j:dom4j:jar:1.6.1:compile">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep:
jboss:jboss-common-logging-spi:jar:2.0.4.GA:compile">
+ <library name="M2 Dep: gnu-getopt:getopt:jar:1.0.13:compile">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/jboss/jboss-common-logging-spi/2.0.4.GA/jboss-common-logging-spi-2.0.4.GA.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/gnu-getopt/getopt/1.0.13/getopt-1.0.13.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep:
javax.annotation:jsr250-api:jar:1.0:compile">
+ <library name="M2 Dep: org.apache.ant:ant:jar:1.7.0:compile">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep:
oswego-concurrent:concurrent:jar:1.3.4:compile">
+ <library name="M2 Dep:
javax.annotation:jsr250-api:jar:1.0:provided">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/oswego-concurrent/concurrent/1.3.4/concurrent-1.3.4.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep: javax.ejb:ejb-api:jar:3.0:compile">
+ <library name="M2 Dep: javax.xml.soap:saaj-api:jar:1.3:provided">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: javax.xml.soap:saaj-api:jar:1.3:compile">
- <CLASSES>
<root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/xml/soap/saaj-api/1.3/saaj-api-1.3.jar!/"
/>
</CLASSES>
<JAVADOC />
@@ -85,7 +76,7 @@
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep: junit:junit:jar:3.8.1:compile">
+ <library name="M2 Dep: junit:junit:jar:3.8.1:test">
<CLASSES>
<root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/"
/>
</CLASSES>
@@ -94,125 +85,118 @@
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep: ant:ant-junit:jar:1.6.5:compile">
+ <library name="M2 Dep:
wutka-dtdparser:dtdparser121:jar:1.2.1:provided">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/ant/ant-junit/1.6.5/ant-junit-1.6.5.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep: org.jboss:jboss-test:jar:1.0.4.GA:compile">
+ <library name="M2 Dep:
javax.servlet:servlet-api:jar:2.5:provided">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/org/jboss/jboss-test/1.0.4.GA/jboss-test-1.0.4.GA.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep: apache-xerces:xml-apis:jar:2.7.1:compile">
+ <library name="M2 Dep: javax.xml:jaxrpc-api:jar:1.1:provided">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/apache-xerces/xml-apis/2.7.1/xml-apis-2.7.1.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/xml/jaxrpc-api/1.1/jaxrpc-api-1.1.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep: javax.servlet:servlet-api:jar:2.5:compile">
+ <library name="M2 Dep:
org.apache.ant:ant-launcher:jar:1.7.0:compile">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep:
org.jboss.ws:jbossws-common:jar:3.0.0-SNAPSHOT:compile">
+ <library name="M2 Dep: javax.xml.ws:jaxws-api:jar:2.1:provided">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/org/jboss/ws/jbossws-common/3.0.0-SNAPSHOT/jbossws-common-3.0.0-SNAPSHOT.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/xml/ws/jaxws-api/2.1/jaxws-api-2.1.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep:
jboss:jboss-logging-spi:jar:2.0.3.GA:compile">
+ <library name="M2 Dep: tjws:webserver:jar:1.3.3:compile">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/jboss/jboss-logging-spi/2.0.3.GA/jboss-logging-spi-2.0.3.GA.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/tjws/webserver/1.3.3/webserver-1.3.3.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep: wsdl4j:wsdl4j:jar:1.6.1:compile">
+ <library name="M2 Dep: javax.ejb:ejb-api:jar:3.0:provided">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/wsdl4j/wsdl4j/1.6.1/wsdl4j-1.6.1.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep:
apache-httpclient:commons-httpclient:jar:2.0.2:compile">
+ <library name="M2 Dep: javax.jws:jsr181-api:jar:1.0-MR1:provided">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/apache-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/jws/jsr181-api/1.0-MR1/jsr181-api-1.0-MR1.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
+ <library name="M2 Dep: org.jboss:jbossxb:jar:1.0.0.SP1:provided">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/org/jboss/jbossxb/1.0.0.SP1/jbossxb-1.0.0.SP1.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep: xml-apis:xml-apis:jar:1.0.b2:compile">
+ <library name="M2 Dep:
jboss.common:jboss-common:jar:1.2.1.GA:provided">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/jboss/common/jboss-common/1.2.1.GA/jboss-common-1.2.1.GA.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep:
javax.activation:activation:jar:1.1:compile">
+ <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:provided">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep:
org.jboss.microcontainer:jboss-dependency:jar:2.0.0.Beta4:compile">
+ <library name="M2 Dep:
org.jboss.ws:jbossws-spi:jar:3.0.0-SNAPSHOT:compile">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/org/jboss/microcontainer/jboss-dependency/2.0.0.Beta4/jboss-dependency-2.0.0.Beta4.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/org/jboss/ws/jbossws-spi/3.0.0-SNAPSHOT/jbossws-spi-3.0.0-SNAPSHOT.jar!/"
/>
</CLASSES>
<JAVADOC />
- <SOURCES />
+ <SOURCES>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/org/jboss/ws/jbossws-spi/3.0.0-SNAPSHOT/jbossws-spi-3.0.0-SNAPSHOT-sources.jar!/"
/>
+ </SOURCES>
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep: dom4j:dom4j:jar:1.6.1:compile">
+ <library name="M2 Dep: apache-slide:webdavlib:jar:2.0:provided">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: apache-slide:webdavlib:jar:2.0:compile">
- <CLASSES>
<root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/apache-slide/webdavlib/2.0/webdavlib-2.0.jar!/"
/>
</CLASSES>
<JAVADOC />
@@ -220,89 +204,8 @@
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep:
jboss:jboss-common-core:jar:2.0.4.GA:compile">
+ <library name="M2 Dep:
apache-xerces:xercesImpl:jar:2.7.1:provided">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/jboss/jboss-common-core/2.0.4.GA/jboss-common-core-2.0.4.GA.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep:
org.jboss.microcontainer:jboss-container:jar:2.0.0.Beta4:compile">
- <CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/org/jboss/microcontainer/jboss-container/2.0.0.Beta4/jboss-container-2.0.0.Beta4.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep:
jboss:jboss-common-logging-log4j:jar:2.0.4.GA:compile">
- <CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/jboss/jboss-common-logging-log4j/2.0.4.GA/jboss-common-logging-log4j-2.0.4.GA.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep:
wutka-dtdparser:dtdparser121:jar:1.2.1:compile">
- <CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep:
jboss.profiler.jvmti:jboss-profiler-jvmti:jar:1.0.0.CR5:compile">
- <CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.jboss:jbossxb:jar:2.0.0.CR4:compile">
- <CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/org/jboss/jbossxb/2.0.0.CR4/jbossxb-2.0.0.CR4.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.jboss:javassist:jar:3.6-beta:compile">
- <CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/org/jboss/javassist/3.6-beta/javassist-3.6-beta.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: gnu-getopt:getopt:jar:1.0.13:compile">
- <CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/gnu-getopt/getopt/1.0.13/getopt-1.0.13.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: ant:ant:jar:1.6.5:compile">
- <CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/ant/ant/1.6.5/ant-1.6.5.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep:
apache-xerces:xercesImpl:jar:2.7.1:compile">
- <CLASSES>
<root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/apache-xerces/xercesImpl/2.7.1/xercesImpl-2.7.1.jar!/"
/>
</CLASSES>
<JAVADOC />
@@ -310,17 +213,8 @@
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep: javax.xml:jaxrpc-api:jar:1.1:compile">
+ <library name="M2 Dep:
javax.xml.stream:stax-api:jar:1.0-2:provided">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/xml/jaxrpc-api/1.1/jaxrpc-api-1.1.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep:
javax.xml.stream:stax-api:jar:1.0-2:compile">
- <CLASSES>
<root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/"
/>
</CLASSES>
<JAVADOC />
@@ -328,23 +222,14 @@
</library>
</orderEntry>
<orderEntry type="module-library">
- <library name="M2 Dep:
org.jboss.microcontainer:jboss-kernel:jar:2.0.0.Beta4:compile">
+ <library name="M2 Dep:
javax.activation:activation:jar:1.0.2:provided">
<CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/org/jboss/microcontainer/jboss-kernel/2.0.0.Beta4/jboss-kernel-2.0.0.Beta4.jar!/"
/>
+ <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/activation/activation/1.0.2/activation-1.0.2.jar!/"
/>
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: javax.xml.ws:jaxws-api:jar:2.1:compile">
- <CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../../.m2/repository/javax/xml/ws/jaxws-api/2.1/jaxws-api-2.1.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
<orderEntryProperties />
</component>
</module>
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java 2008-05-29
21:52:37 UTC (rev 7218)
@@ -0,0 +1,320 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.smoke.tools;
+
+import org.jboss.wsf.spi.tools.WSContractConsumer;
+import org.jboss.wsf.test.JBossWSTest;
+
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.PrintStream;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class WSConsumerPlugin extends JBossWSTest implements WSConsumerPluginDelegate
+{
+ // Tools delegate. Recreated for every test. See setup(...)
+ WSContractConsumer consumer;
+
+ // common output dir for all tests. Tests need to be executed below
'output/tests'
+ File outputDirectory;
+
+ // default is off
+ boolean toogleMessageOut =
Boolean.getBoolean(WSConsumerPlugin.class.getName()+".verbose");
+
+ private File workDirectory;
+
+
+ public WSConsumerPlugin()
+ {
+ // create a new consumer for every test case
+ consumer = WSContractConsumer.newInstance();
+ consumer.setNoCompile(true);
+
+ if (toogleMessageOut)
+ {
+ consumer.setMessageStream(System.out);
+ }
+
+ // shared output directory, we go out of the test-resources directory
+ outputDirectory = createResourceFile("../wsconsume/java");
+ workDirectory = createResourceFile("../work");
+ }
+
+ /**
+ * Specifies the JAX-WS and JAXB binding files to use on import operations.
+ * See
http://java.sun.com/webservices/docs/2.0/jaxws/customizations.html
+ */
+ public void testBindingFiles() throws Exception
+ {
+ List<File> files = new ArrayList<File>();
+ files.add(getResourceFile("jaxws/smoke/tools/wsdl/async-binding.xml"));
+
+ consumer.setBindingFiles(files);
+ consumer.setTargetPackage("org.jboss.test.ws.tools.testBindingFiles");
+ consumer.setGenerateSource(true);
+
+ consumeWSDL();
+
+ Class sei = loadEndpointInterface("testBindingFiles");
+
+ boolean containsAsyncOperations = false;
+ for (Method m : sei.getDeclaredMethods())
+ {
+ if (m.getName().equals("echoAsync"))
+ {
+ containsAsyncOperations = true;
+ break;
+ }
+ }
+
+ assertTrue("External binding file was ignored",
containsAsyncOperations);
+
+ }
+
+ /**
+ * Sets the OASIS XML Catalog file to use for entity resolution.
+ *
+ */
+ public void testCatalog() throws Exception
+ {
+ consumer.setTargetPackage("org.jboss.test.ws.tools.testCatalog");
+
consumer.setCatalog(getResourceFile("jaxws/smoke/tools/wsdl/jax-ws-catalog.xml"));
+ consumer.setGenerateSource(true);
+ consumer.setOutputDirectory(outputDirectory);
+
consumer.consume(getResourceFile("jaxws/smoke/tools/wsdl/TestServiceCatalog.wsdl").getCanonicalPath());
+ }
+
+ /**
+ * Sets the main output directory. If the directory does not exist, it will be
created.
+ *
+ */
+ public void testOutputDirectory() throws Exception
+ {
+
consumer.setTargetPackage("org.jboss.test.ws.tools.testOutputDirectory");
+ consumer.setGenerateSource(true);
+ consumer.setSourceDirectory(new File(workDirectory,
"testOutputDirectory/java/"));
+
+ consumeWSDL();
+
+ File sei = new File(workDirectory,
"testOutputDirectory/java/org/jboss/test/ws/tools/testOutputDirectory/EndpointInterface.java");
+ assertTrue("Output directory switch ignored", sei.exists());
+ }
+
+ /**
+ * 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,
+ * the output directory will be used instead.
+ *
+ */
+ public void testSourceDirectory() throws Exception
+ {
+
consumer.setTargetPackage("org.jboss.test.ws.tools.testSourceDirectory");
+ consumer.setGenerateSource(true);
+ consumer.setSourceDirectory(new File(workDirectory,
"wsconsumeSource/java/"));
+
+ consumeWSDL();
+
+ File sei = new File(workDirectory,
"wsconsumeSource/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java");
+ assertTrue("Source directory switch ignored", sei.exists());
+ }
+
+ /**
+ * Enables/Disables Java source generation.
+ *
+ */
+ public void testGenerateSource() throws Exception
+ {
+ testTargetPackage();
+ }
+
+ /**
+ * Sets the target package for generated source. If not specified the default
+ * is based off of the XML namespace.
+ *
+ */
+ public void testTargetPackage() throws Exception
+ {
+ consumer.setTargetPackage("org.jboss.test.ws.tools.testTargetPackage");
+ consumer.setGenerateSource(true);
+
+ consumeWSDL();
+
+ File packageDir = new File(outputDirectory,
"org/jboss/test/ws/tools/testTargetPackage");
+ assertTrue("Package not created", packageDir.exists());
+
+ File seiSource = new File(outputDirectory,
"org/jboss/test/ws/tools/testTargetPackage/EndpointInterface.java");
+ assertTrue("SEI not generated", seiSource.exists());
+
+ Class seiClass = loadEndpointInterface("testTargetPackage");
+ assertNotNull("Cannot load SEI class", seiClass);
+ }
+
+ /**
+ * Sets the @(a)WebService.wsdlLocation and @(a)WebServiceClient.wsdlLocation attributes
to a custom value.
+ *
+ */
+ public void testWsdlLocation() throws Exception
+ {
+ consumer.setTargetPackage("org.jboss.test.ws.tools.testWsdlLocation");
+
consumer.setWsdlLocation("http://foo.bar.com/endpoint?wsdl");
+ consumer.setGenerateSource(true);
+ consumer.setNoCompile(false); // explicitly enable compilation
+
+ consumeWSDL();
+
+ //URLClassLoader loader = new URLClassLoader(new URL[] { outputDirectory.toURL()
});
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ String seiClassName =
"org.jboss.test.ws.tools.testWsdlLocation.TestService";
+ Class sei = loader.loadClass(seiClassName);
+
+ WebServiceClient webServiceClient =
(WebServiceClient)sei.getAnnotation(WebServiceClient.class);
+ assertNotNull("@WebServiceClient not generated on service interface",
webServiceClient);
+ assertEquals("(a)WebServiceClient.wsdlLocation not set",
"http://foo.bar.com/endpoint?wsdl", webServiceClient.wsdlLocation());
+ }
+
+ /**
+ * Sets the PrintStream to use for status feedback.
+ * The simplest example would be to use System.out.
+ */
+ public void testMessageStream() throws Exception
+ {
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ PrintStream pout = new PrintStream(bout);
+
+ consumer.setTargetPackage("org.jboss.test.ws.tools.testMessageStream");
+ consumer.setMessageStream(pout);
+
+ consumeWSDL();
+
+ String messageOut = new String(bout.toByteArray());
+ System.out.println("-- Begin captured output -- ");
+ System.out.println(messageOut);
+ System.out.println("--- End captured output --");
+
+ System.out.println("FIXME [JBWS-1772] WSConsume output is not correctly
redirected");
+
+ /*assertTrue("Tools output not correctly redirected",
+
messageOut.indexOf("org/jboss/test/ws/tools/testMessageStream/EndpointInterface.java")!=-1
+ );*/
+ }
+
+ /**
+ * Sets the additional classpath to use if/when invoking the Java compiler.
+ * 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
+ * implementation.
+ *
+ */
+ public void testAdditionalCompilerClassPath()
+ {
+ System.out.println("FIXME [JBWS-1773] Verify isolated classloading with
WSConsume");
+ }
+
+ /**
+ * Set the target JAX-WS specification target. Defaults to
<code>2.0</code>
+ */
+ public void testTarget() throws Exception
+ {
+ consumer.setTargetPackage("org.jboss.test.ws.tools.testTarget");
+ consumer.setGenerateSource(true);
+ consumer.setTarget("2.1");
+
+ try
+ {
+ consumeWSDL();
+ fail("Target 2.1 should not be supported");
+ }
+ catch (Exception e)
+ {
+ File outputDir = new File(outputDirectory,
"org/jboss/test/ws/tools/testTarget");
+ outputDir.deleteOnExit();
+ return;
+ }
+
+ URLClassLoader loader = new URLClassLoader(new URL[] { outputDirectory.toURL() });
+ String seiClassName = "org.jboss.test.ws.tools.testTarget.TestService";
+ Class sei = loader.loadClass(seiClassName);
+
+ boolean featureSig = false;
+ for (Method m : sei.getDeclaredMethods())
+ {
+ if (m.getName().equals("getEndpointInterfacePort"))
+ {
+ for (Class c : m.getParameterTypes())
+ {
+ if (c.isArray() &&
c.getComponentType().equals(WebServiceFeature.class))
+ {
+ featureSig = true;
+ break;
+ }
+ }
+ }
+ }
+
+ assertTrue("JAX-WS 2.1 extensions not generated with
'target=2.1'", featureSig);
+
+ }
+
+ /**
+ * Tests the SOAP 1.2 binding extension
+ *
+ */
+ public void testSOAP12Extension() throws Exception
+ {
+ consumer.setOutputDirectory(outputDirectory);
+
consumer.setTargetPackage("org.jboss.test.ws.tools.testSOAP12Extension");
+ consumer.setGenerateSource(true);
+ consumer.setExtension(true);
+
consumer.consume(getResourceFile("jaxws/smoke/tools/wsdl/TestServiceSoap12.wsdl").getCanonicalPath());
+
+ File sei = new File(outputDirectory,
"org/jboss/test/ws/tools/testSOAP12Extension/EndpointInterface.java");
+ assertTrue("SEI not generated", sei.exists());
+ File service = new File(outputDirectory,
"org/jboss/test/ws/tools/testSOAP12Extension/TestService.java");
+ assertTrue("Service not generated", service.exists());
+ }
+
+ private void consumeWSDL() throws Exception
+ {
+ consumer.setOutputDirectory(outputDirectory);
+
consumer.consume(getResourceFile("jaxws/smoke/tools/wsdl/TestService.wsdl").getCanonicalPath());
+ }
+
+ private Class loadEndpointInterface(String testName) throws MalformedURLException,
ClassNotFoundException
+ {
+ URLClassLoader loader = new URLClassLoader(new URL[] { outputDirectory.toURL() });
+ String seiClassName = "org.jboss.test.ws.tools." + testName +
".EndpointInterface";
+ Class sei = loader.loadClass(seiClassName);
+ return sei;
+ }
+}
Property changes on:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPlugin.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPluginDelegate.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPluginDelegate.java
(rev 0)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPluginDelegate.java 2008-05-29
21:52:37 UTC (rev 7218)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.smoke.tools;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public interface WSConsumerPluginDelegate
+{
+ void testBindingFiles() throws Exception;
+
+ void testCatalog() throws Exception;
+
+ void testOutputDirectory() throws Exception;
+
+ void testSourceDirectory() throws Exception;
+
+ void testGenerateSource() throws Exception;
+
+ void testTargetPackage() throws Exception;
+
+ void testWsdlLocation() throws Exception;
+
+ void testMessageStream() throws Exception;
+
+ void testAdditionalCompilerClassPath();
+
+ void testTarget() throws Exception;
+
+ void testSOAP12Extension() throws Exception;
+}
Property changes on:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerPluginDelegate.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java
===================================================================
---
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java 2008-05-29
21:48:21 UTC (rev 7217)
+++
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSConsumerTestCase.java 2008-05-29
21:52:37 UTC (rev 7218)
@@ -23,62 +23,59 @@
// $Id$
-import java.io.ByteArrayOutputStream;
+import org.jboss.wsf.test.JBossWSTest;
+
import java.io.File;
-import java.io.PrintStream;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.StringTokenizer;
+import java.lang.reflect.InvocationTargetException;
-import javax.xml.ws.WebServiceClient;
-import javax.xml.ws.WebServiceFeature;
-
-import org.jboss.wsf.spi.tools.WSContractConsumer;
-import org.jboss.wsf.test.JBossWSTest;
-
/**
* Test the WSContractConsumer API across different implementations.
* NOTE: All tests expect to be executed below 'output/tests'.
*
* @author Heiko.Braun(a)jboss.com
*/
-public class WSConsumerTestCase extends JBossWSTest
+public class WSConsumerTestCase extends JBossWSTest implements WSConsumerPluginDelegate
{
+ Object delegate = null;
+ ClassLoader origClassLoader;
- // Tools delegate. Recreated for every test. See setup(...)
- WSContractConsumer consumer;
-
- // common output dir for all tests. Tests need to be executed below
'output/tests'
- File outputDirectory;
-
- // default is off
- boolean toogleMessageOut = false;
-
- private File workDirectory;
-
/**
* Recreates a tools delegate for every test
* @throws Exception
*/
protected void setUp() throws Exception
{
- super.setUp();
- // create a new consumer for every test case
- consumer = WSContractConsumer.newInstance();
- if (toogleMessageOut)
+ // JBWS-2175
+ maskClasspath();
+
+ Class wscClass =
Thread.currentThread().getContextClassLoader().loadClass("org.jboss.test.ws.jaxws.smoke.tools.WSConsumerPlugin");
+ delegate = wscClass.newInstance();
+ }
+
+
+ protected void tearDown() throws Exception
+ {
+ unmaskClasspath();
+ }
+
+ private void dispatch(String methodName) throws Exception
+ {
+ try
{
- consumer.setMessageStream(System.out);
+ delegate.getClass().getMethod(methodName).invoke(delegate);
}
-
- // shared output directory, we go out of the test-resources directory
- outputDirectory = createResourceFile("../wsconsume/java");
- workDirectory = createResourceFile("../work");
+ catch (InvocationTargetException e)
+ {
+ e.printStackTrace();
+ throw e;
+ }
}
/**
@@ -87,29 +84,8 @@
*/
public void testBindingFiles() throws Exception
{
- List<File> files = new ArrayList<File>();
- files.add(getResourceFile("jaxws/smoke/tools/wsdl/async-binding.xml"));
+ dispatch("testBindingFiles");
- consumer.setBindingFiles(files);
- consumer.setTargetPackage("org.jboss.test.ws.tools.testBindingFiles");
- consumer.setGenerateSource(true);
-
- consumeWSDL();
-
- Class sei = loadEndpointInterface("testBindingFiles");
-
- boolean containsAsyncOperations = false;
- for (Method m : sei.getDeclaredMethods())
- {
- if (m.getName().equals("echoAsync"))
- {
- containsAsyncOperations = true;
- break;
- }
- }
-
- assertTrue("External binding file was ignored",
containsAsyncOperations);
-
}
/**
@@ -118,27 +94,16 @@
*/
public void testCatalog() throws Exception
{
- consumer.setTargetPackage("org.jboss.test.ws.tools.testCatalog");
-
consumer.setCatalog(getResourceFile("jaxws/smoke/tools/wsdl/jax-ws-catalog.xml"));
- consumer.setGenerateSource(true);
- consumer.setOutputDirectory(outputDirectory);
-
consumer.consume(getResourceFile("jaxws/smoke/tools/wsdl/TestServiceCatalog.wsdl").getCanonicalPath());
+ dispatch("testCatalog");
}
/**
- * Sets the main output directory. If the directory does not exist, it will be
created.
+ * Sets the main output directory. If the directory does not exist, it will be
created. org.jboss.test.ws.jaxws.smoke.tools
*
*/
public void testOutputDirectory() throws Exception
{
-
consumer.setTargetPackage("org.jboss.test.ws.tools.testOutputDirectory");
- consumer.setGenerateSource(true);
- consumer.setSourceDirectory(new File(workDirectory,
"testOutputDirectory/java/"));
-
- consumeWSDL();
-
- File sei = new File(workDirectory,
"testOutputDirectory/java/org/jboss/test/ws/tools/testOutputDirectory/EndpointInterface.java");
- assertTrue("Output directory switch ignored", sei.exists());
+ dispatch("testOutputDirectory");
}
/**
@@ -149,14 +114,7 @@
*/
public void testSourceDirectory() throws Exception
{
-
consumer.setTargetPackage("org.jboss.test.ws.tools.testSourceDirectory");
- consumer.setGenerateSource(true);
- consumer.setSourceDirectory(new File(workDirectory,
"wsconsumeSource/java/"));
-
- consumeWSDL();
-
- File sei = new File(workDirectory,
"wsconsumeSource/java/org/jboss/test/ws/tools/testSourceDirectory/EndpointInterface.java");
- assertTrue("Source directory switch ignored", sei.exists());
+ dispatch("testSourceDirectory");
}
/**
@@ -175,19 +133,7 @@
*/
public void testTargetPackage() throws Exception
{
- consumer.setTargetPackage("org.jboss.test.ws.tools.testTargetPackage");
- consumer.setGenerateSource(true);
-
- consumeWSDL();
-
- File packageDir = new File(outputDirectory,
"org/jboss/test/ws/tools/testTargetPackage");
- assertTrue("Package not created", packageDir.exists());
-
- File seiSource = new File(outputDirectory,
"org/jboss/test/ws/tools/testTargetPackage/EndpointInterface.java");
- assertTrue("SEI not generated", seiSource.exists());
-
- Class seiClass = loadEndpointInterface("testTargetPackage");
- assertNotNull("Cannot load SEI class", seiClass);
+ dispatch("testTargetPackage");
}
/**
@@ -196,19 +142,7 @@
*/
public void testWsdlLocation() throws Exception
{
- consumer.setTargetPackage("org.jboss.test.ws.tools.testWsdlLocation");
-
consumer.setWsdlLocation("http://foo.bar.com/endpoint?wsdl");
- consumer.setGenerateSource(true);
-
- consumeWSDL();
-
- URLClassLoader loader = new URLClassLoader(new URL[] { outputDirectory.toURL() });
- String seiClassName =
"org.jboss.test.ws.tools.testWsdlLocation.TestService";
- Class sei = loader.loadClass(seiClassName);
-
- WebServiceClient webServiceClient =
(WebServiceClient)sei.getAnnotation(WebServiceClient.class);
- assertNotNull("@WebServiceClient not generated on service interface",
webServiceClient);
- assertEquals("(a)WebServiceClient.wsdlLocation not set",
"http://foo.bar.com/endpoint?wsdl", webServiceClient.wsdlLocation());
+ dispatch("testWsdlLocation");
}
/**
@@ -217,24 +151,7 @@
*/
public void testMessageStream() throws Exception
{
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- PrintStream pout = new PrintStream(bout);
-
- consumer.setTargetPackage("org.jboss.test.ws.tools.testMessageStream");
- consumer.setMessageStream(pout);
-
- consumeWSDL();
-
- String messageOut = new String(bout.toByteArray());
- System.out.println("-- Begin captured output -- ");
- System.out.println(messageOut);
- System.out.println("--- End captured output --");
-
- System.out.println("FIXME [JBWS-1772] WSConsume output is not correctly
redirected");
-
- /*assertTrue("Tools output not correctly redirected",
-
messageOut.indexOf("org/jboss/test/ws/tools/testMessageStream/EndpointInterface.java")!=-1
- );*/
+ dispatch("testMessageStream");
}
/**
@@ -256,44 +173,8 @@
*/
public void testTarget() throws Exception
{
- consumer.setTargetPackage("org.jboss.test.ws.tools.testTarget");
- consumer.setGenerateSource(true);
- consumer.setTarget("2.1");
+ dispatch("testTarget");
- try
- {
- consumeWSDL();
- fail("Target 2.1 should not be supported");
- }
- catch (Exception e)
- {
- File outputDir = new File(outputDirectory,
"org/jboss/test/ws/tools/testTarget");
- outputDir.deleteOnExit();
- return;
- }
-
- URLClassLoader loader = new URLClassLoader(new URL[] { outputDirectory.toURL() });
- String seiClassName = "org.jboss.test.ws.tools.testTarget.TestService";
- Class sei = loader.loadClass(seiClassName);
-
- boolean featureSig = false;
- for (Method m : sei.getDeclaredMethods())
- {
- if (m.getName().equals("getEndpointInterfacePort"))
- {
- for (Class c : m.getParameterTypes())
- {
- if (c.isArray() &&
c.getComponentType().equals(WebServiceFeature.class))
- {
- featureSig = true;
- break;
- }
- }
- }
- }
-
- assertTrue("JAX-WS 2.1 extensions not generated with
'target=2.1'", featureSig);
-
}
/**
@@ -302,42 +183,53 @@
*/
public void testSOAP12Extension() throws Exception
{
- consumer.setOutputDirectory(outputDirectory);
-
consumer.setTargetPackage("org.jboss.test.ws.tools.testSOAP12Extension");
- consumer.setGenerateSource(true);
- consumer.setExtension(true);
-
consumer.consume(getResourceFile("jaxws/smoke/tools/wsdl/TestServiceSoap12.wsdl").getCanonicalPath());
- File sei = new File(outputDirectory,
"org/jboss/test/ws/tools/testSOAP12Extension/EndpointInterface.java");
- assertTrue("SEI not generated", sei.exists());
- File service = new File(outputDirectory,
"org/jboss/test/ws/tools/testSOAP12Extension/TestService.java");
- assertTrue("Service not generated", service.exists());
+ dispatch("testSOAP12Extension");
}
-
- private void consumeWSDL() throws Exception
+
+ private void maskClasspath() throws Exception
{
String classpath = System.getProperty("surefire.test.class.path");
+ List<URL> jarURLs = new LinkedList<URL>();
+ StringBuffer jarURLString = new StringBuffer();
+ List<URL> classDirUrls = new LinkedList<URL>();
+
if (classpath != null && !classpath.equals(""))
{
- //setting additional compiler classpath since the consumer gets the classpath
from the
- //java.class.path system properties which actually does not contain the test
classpath
- //when running from maven surefire plugin
StringTokenizer st = new StringTokenizer(classpath, File.pathSeparator, false);
- List<String> classpathList = new LinkedList<String>();
while (st.hasMoreTokens())
{
- classpathList.add(st.nextToken());
+ String s = st.nextToken();
+ if(s.endsWith(".jar")) // JBWS-2175: skip target/classes and
target/test-classes
+ {
+ jarURLs.add( new File(s).toURL() );
+ jarURLString.append( s ).append(File.pathSeparator);
+ }
+ else
+ {
+ classDirUrls.add( new File(s).toURL() );
+ }
}
- consumer.setAdditionalCompilerClassPath(classpathList);
+
}
- consumer.setOutputDirectory(outputDirectory);
-
consumer.consume(getResourceFile("jaxws/smoke/tools/wsdl/TestService.wsdl").getCanonicalPath());
+
+ // Replace the ThreadContextLoader to prevent loading from target/classes and
target/test-classes
+ List<URL> jarFirstClasspath = new ArrayList<URL>();
+ jarFirstClasspath.addAll(jarURLs);
+ jarFirstClasspath.addAll(classDirUrls);
+ URLClassLoader jarFirstClassLoader = new URLClassLoader(jarFirstClasspath.toArray(
new URL[] {}), this.origClassLoader);
+
+ this.origClassLoader = Thread.currentThread().getContextClassLoader();
+
+ Thread.currentThread().setContextClassLoader(jarFirstClassLoader);
+ System.setProperty("java.class.path", jarURLString.toString());
}
- private Class loadEndpointInterface(String testName) throws MalformedURLException,
ClassNotFoundException
+ private void unmaskClasspath()
{
- URLClassLoader loader = new URLClassLoader(new URL[] { outputDirectory.toURL() });
- String seiClassName = "org.jboss.test.ws.tools." + testName +
".EndpointInterface";
- Class sei = loader.loadClass(seiClassName);
- return sei;
- }
+ if(this.origClassLoader !=null)
+ {
+ Thread.currentThread().setContextClassLoader(this.origClassLoader);
+ this.origClassLoader = null;
+ }
+ }
}