JBossWS SVN: r14406 - spi/tags.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-18 12:42:27 -0400 (Wed, 18 May 2011)
New Revision: 14406
Added:
spi/tags/jbossws-spi-2.0.0.Beta2/
Log:
Tagging jbossws-spi-2.0.0.Beta2
13 years, 10 months
JBossWS SVN: r14405 - in stack/cxf/trunk/modules/testsuite: cxf-spring-tests/src/test/etc and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-18 12:35:03 -0400 (Wed, 18 May 2011)
New Revision: 14405
Added:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/jbossws-roles.properties
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/jbossws-users.properties
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbossws-roles.properties
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbossws-users.properties
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-roles.properties
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-users.properties
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[AS7-765] Adding JBossWS security domain conf files and setting proper sysprops at testsuite execution time
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/jbossws-roles.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/jbossws-roles.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/jbossws-roles.properties 2011-05-18 16:35:03 UTC (rev 14405)
@@ -0,0 +1,2 @@
+# A sample roles.properties file for use with the UsersRolesLoginModule
+kermit=friend
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/jbossws-users.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/jbossws-users.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/etc/jbossws-users.properties 2011-05-18 16:35:03 UTC (rev 14405)
@@ -0,0 +1,2 @@
+# A sample users.properties file for use with the UsersRolesLoginModule
+kermit=thefrog
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbossws-roles.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbossws-roles.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbossws-roles.properties 2011-05-18 16:35:03 UTC (rev 14405)
@@ -0,0 +1,2 @@
+# A sample roles.properties file for use with the UsersRolesLoginModule
+kermit=friend
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbossws-users.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbossws-users.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/etc/jbossws-users.properties 2011-05-18 16:35:03 UTC (rev 14405)
@@ -0,0 +1,2 @@
+# A sample users.properties file for use with the UsersRolesLoginModule
+kermit=thefrog
\ No newline at end of file
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-18 16:13:35 UTC (rev 14404)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-18 16:35:03 UTC (rev 14405)
@@ -272,6 +272,14 @@
<value>${project.build.directory}</value>
</property>
<property>
+ <name>org.jboss.ws.testsuite.securityDomain.users.propfile</name>
+ <value>${project.build.directory}/test-classes/jbossws-users.properties</value>
+ </property>
+ <property>
+ <name>org.jboss.ws.testsuite.securityDomain.roles.propfile</name>
+ <value>${project.build.directory}/test-classes/jbossws-roles.properties</value>
+ </property>
+ <property>
<name>org.jboss.ws.wsse.keyStore</name>
<value>${test.resources.directory}/jaxws/samples/wssecurity/wsse.keystore</value>
</property>
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-roles.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-roles.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-roles.properties 2011-05-18 16:35:03 UTC (rev 14405)
@@ -0,0 +1,2 @@
+# A sample roles.properties file for use with the UsersRolesLoginModule
+kermit=friend
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-users.properties
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-users.properties (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-users.properties 2011-05-18 16:35:03 UTC (rev 14405)
@@ -0,0 +1,2 @@
+# A sample users.properties file for use with the UsersRolesLoginModule
+kermit=thefrog
\ No newline at end of file
13 years, 10 months
JBossWS SVN: r14404 - in stack/native/trunk/modules/testsuite: native-tests/src/test/etc and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-18 12:13:35 -0400 (Wed, 18 May 2011)
New Revision: 14404
Added:
stack/native/trunk/modules/testsuite/native-tests/src/test/etc/jbossws-roles.properties
stack/native/trunk/modules/testsuite/native-tests/src/test/etc/jbossws-users.properties
stack/native/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-roles.properties
stack/native/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-users.properties
Modified:
stack/native/trunk/modules/testsuite/pom.xml
Log:
[AS7-765] Adding JBossWS security domain conf files and setting proper sysprops at testsuite execution time
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/etc/jbossws-roles.properties
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/etc/jbossws-roles.properties (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/etc/jbossws-roles.properties 2011-05-18 16:13:35 UTC (rev 14404)
@@ -0,0 +1,2 @@
+# A sample roles.properties file for use with the UsersRolesLoginModule
+kermit=friend
\ No newline at end of file
Added: stack/native/trunk/modules/testsuite/native-tests/src/test/etc/jbossws-users.properties
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/etc/jbossws-users.properties (rev 0)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/etc/jbossws-users.properties 2011-05-18 16:13:35 UTC (rev 14404)
@@ -0,0 +1,2 @@
+# A sample users.properties file for use with the UsersRolesLoginModule
+kermit=thefrog
\ No newline at end of file
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2011-05-18 15:38:51 UTC (rev 14403)
+++ stack/native/trunk/modules/testsuite/pom.xml 2011-05-18 16:13:35 UTC (rev 14404)
@@ -288,6 +288,14 @@
<value>${log4j.output.dir}</value>
</property>
<property>
+ <name>org.jboss.ws.testsuite.securityDomain.users.propfile</name>
+ <value>${project.build.directory}/test-classes/jbossws-users.properties</value>
+ </property>
+ <property>
+ <name>org.jboss.ws.testsuite.securityDomain.roles.propfile</name>
+ <value>${project.build.directory}/test-classes/jbossws-roles.properties</value>
+ </property>
+ <property>
<name>org.jboss.ws.wsse.keyStore</name>
<value>${test.resources.directory}/jaxws/samples/wssecurity/wsse.keystore</value>
</property>
Added: stack/native/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-roles.properties
===================================================================
--- stack/native/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-roles.properties (rev 0)
+++ stack/native/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-roles.properties 2011-05-18 16:13:35 UTC (rev 14404)
@@ -0,0 +1,2 @@
+# A sample roles.properties file for use with the UsersRolesLoginModule
+kermit=friend
\ No newline at end of file
Added: stack/native/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-users.properties
===================================================================
--- stack/native/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-users.properties (rev 0)
+++ stack/native/trunk/modules/testsuite/shared-tests/src/test/etc/jbossws-users.properties 2011-05-18 16:13:35 UTC (rev 14404)
@@ -0,0 +1,2 @@
+# A sample users.properties file for use with the UsersRolesLoginModule
+kermit=thefrog
\ No newline at end of file
13 years, 10 months
JBossWS SVN: r14403 - framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-05-18 11:38:51 -0400 (Wed, 18 May 2011)
New Revision: 14403
Removed:
framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/PluginBase.java
framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/StackConfigurable.java
framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPluginDelegate.java
Modified:
framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.java
Log:
[JBPAPP-6253]:Fixed test failure and removed unnecessary classes
Deleted: framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/PluginBase.java
===================================================================
--- framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/PluginBase.java 2011-05-18 12:24:24 UTC (rev 14402)
+++ framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/PluginBase.java 2011-05-18 15:38:51 UTC (rev 14403)
@@ -1,154 +0,0 @@
-/*
- * 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.test.JBossWSTest;
-
-import java.lang.reflect.InvocationTargetException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.Arrays;
-import java.util.List;
-import java.util.LinkedList;
-import java.util.StringTokenizer;
-import java.util.ArrayList;
-import java.io.File;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public abstract class PluginBase extends JBossWSTest
-{
- protected Object delegate = null;
- protected ClassLoader origClassLoader;
- protected String oldCPProp;
- protected boolean integrationNative = false;
- protected boolean integrationMetro = false;
- protected boolean integrationCXF = false;
-
- protected void dispatch(String methodName) throws Exception
- {
- try
- {
- delegate.getClass().getMethod(methodName).invoke(delegate);
- }
- catch (InvocationTargetException e)
- {
- e.printStackTrace();
- throw e;
- }
- }
-
- protected void setDelegate(Class<?> clazz) throws Exception
- {
- delegate = clazz.newInstance();
- List<String> list = new LinkedList<String>();
- for (Class<?> c : clazz.getInterfaces())
- {
- list.add(c.getName());
- }
- if (list.contains(StackConfigurable.class.getName()))
- {
- clazz.getMethod("setIntegrationNative", boolean.class).invoke(delegate, integrationNative);
- clazz.getMethod("setIntegrationMetro", boolean.class).invoke(delegate, integrationMetro);
- clazz.getMethod("setIntegrationCXF", boolean.class).invoke(delegate, integrationCXF);
- }
- }
-
- protected void setupClasspath() throws Exception
- {
- if (!(integrationCXF || integrationMetro || integrationNative))
- {
- //the integration stack is not set yet, doing it before mangling with the classpath
- readIntegrationStack();
- }
- String classpath = System.getProperty("surefire.test.class.path");
- if (classpath == null) //no maven surefire classpath hacks required
- return;
- List<URL> jarURLs = new LinkedList<URL>();
- StringBuffer jarURLString = new StringBuffer();
- List<URL> classDirUrls = new LinkedList<URL>();
-
- if (classpath != null && !classpath.equals(""))
- {
- StringTokenizer st = new StringTokenizer(classpath, File.pathSeparator, false);
- while (st.hasMoreTokens())
- {
- String s = st.nextToken();
- if(s.endsWith(".jar")) // JBWS-2175: skip target/classes and target/test-classes
- {
- if( filtered(s) )
- continue;
- jarURLs.add( new File(s).toURL() );
- jarURLString.append( s ).append(File.pathSeparator);
- }
- else
- {
- classDirUrls.add( new File(s).toURL() );
- }
- }
-
- }
-
- List<URL> jarFirstClasspath = new ArrayList<URL>();
-
- // Replace the ThreadContextLoader to prevent loading from target/classes and target/test-classes
- 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);
- this.oldCPProp = System.getProperty("java.class.path");
- System.setProperty("java.class.path", jarURLString.toString());
- }
-
- protected abstract boolean filtered(String jarName);
-
- protected void restoreClasspath()
- {
- if(this.origClassLoader !=null)
- {
- Thread.currentThread().setContextClassLoader(this.origClassLoader);
- this.origClassLoader = null;
- System.setProperty("java.class.path", oldCPProp);
- }
- }
-
- protected void readIntegrationStack()
- {
- this.integrationNative = isIntegrationNative();
- this.integrationMetro = isIntegrationMetro();
- this.integrationCXF = isIntegrationCXF();
- }
-
- // JBPAPP-6253 - Implement support for SOAP12 protocol in wsprovide - in JBossWS 2.x - CXF / Metro stacks don't exist
- private boolean isIntegrationMetro()
- {
- return false;
- }
- private boolean isIntegrationCXF()
- {
- return false;
- }
-}
Deleted: framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/StackConfigurable.java
===================================================================
--- framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/StackConfigurable.java 2011-05-18 12:24:24 UTC (rev 14402)
+++ framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/StackConfigurable.java 2011-05-18 15:38:51 UTC (rev 14403)
@@ -1,31 +0,0 @@
-/*
- * 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;
-
-public interface StackConfigurable
-{
- public void setIntegrationNative(boolean integrationNative);
-
- public void setIntegrationMetro(boolean integrationMetro);
-
- public void setIntegrationCXF(boolean integrationCXF);
-}
Deleted: framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
===================================================================
--- framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2011-05-18 12:24:24 UTC (rev 14402)
+++ framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2011-05-18 15:38:51 UTC (rev 14403)
@@ -1,370 +0,0 @@
-/*
- * 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.ws.Constants;
-import org.jboss.wsf.common.DOMUtils;
-import org.jboss.wsf.spi.tools.WSContractProvider;
-import org.jboss.wsf.test.JBossWSTest;
-import org.w3c.dom.Element;
-
-import javax.xml.bind.annotation.XmlList;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import java.io.BufferedReader;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileReader;
-import java.io.PrintStream;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class WSProviderPlugin extends JBossWSTest implements WSProviderPluginDelegate
-{
- private static final String FS = System.getProperty("file.separator"); // '/' on unix, '\' on windows
- // tools delegate
- WSContractProvider provider;
-
- // redirect tools message to System.out ?
- boolean toogleMessageOut = Boolean.getBoolean(WSProviderTestCase.class.getName()+".verbose");
-
- // relative to test execution
- File outputDirectory;
-
- public WSProviderPlugin()
- {
- // create a new consumer for every test case
- provider = WSContractProvider.newInstance();
- if(toogleMessageOut) provider.setMessageStream(System.out);
-
- // shared output directory, relative to test execution
- outputDirectory = createResourceFile(".." + FS + "wsprovide" + FS + "java");
- }
-
- private ClassLoader getArtefactClassLoader() throws Exception {
- URLClassLoader loader = new URLClassLoader(
- new URL[] { outputDirectory.toURL() },
- Thread.currentThread().getContextClassLoader()
- );
-
- return loader;
- }
-
- /**
- * Enables/Disables WSDL generation.
- *
- */
- public void testGenerateWsdl() throws Exception
- {
- provider.setGenerateWsdl(true);
- provide();
-
- verifyWSDL(outputDirectory);
- }
-
- /**
- * Enables/Disables WSDL generation.
- *
- */
- public void testGenerateWsdlWithExtension() throws Exception
- {
- provider.setGenerateWsdl(true);
- provider.setExtension(true);
- File outputDir = new File(outputDirectory.getAbsolutePath() + "-soap12");
- provide(outputDir);
-
- verifyWSDL(outputDir, true);
- }
-
- /**
- * Enables/Disables Java source generation.
- *
- */
- public void testGenerateSource() throws Exception
- {
- provider.setGenerateSource(true);
- provide();
-
- verifyJavaSource(outputDirectory);
-
- }
-
- private void verifyJavaSource(File directory) throws Exception
- {
- File javaSource = new File(
- directory.getAbsolutePath()+
- FS + "org" + FS + "jboss" + FS + "test" + FS + "ws" + FS + "jaxws" + FS + "smoke" + FS + "tools" + FS + "jaxws" + FS + "AddResponse.java"
- );
-
- assertTrue("Source not generated", javaSource.exists());
-
- javaSource = new File(directory.getAbsolutePath() + FS + "org" + FS + "jboss" + FS + "test" + FS + "ws" + FS + "jaxws" + FS + "smoke" + FS + "tools" + FS
- + "jaxws" + FS + "GetKeysResponse.java");
- assertTrue("Source not generated", javaSource.exists());
- String contents;
-
- if (isIntegrationCXF())
- {
- System.out.println("FIXME: [JBWS-2507] Support generics in wrapper classes");
- }
- else
- {
- contents = readFile(javaSource);
- //[JBWS-2477] check support for generics
- assertTrue("Didn't found method \"public Set<Integer> getReturn()\"", contents.contains("public Set<Integer> getReturn()"));
- }
-
- javaSource = new File(directory.getAbsolutePath() + FS + "org" + FS + "jboss" + FS + "test" + FS + "ws" + FS + "jaxws" + FS + "smoke" + FS + "tools" + FS
- + "jaxws" + FS + "ProcessListResponse.java");
- assertTrue("Source not generated", javaSource.exists());
- contents = readFile(javaSource);
- assertTrue("@XmlList not found", contents.contains("@XmlList"));
-
- }
-
- private String readFile(File file) throws Exception
- {
- BufferedReader input = new BufferedReader(new FileReader(file));
- StringBuilder sb = new StringBuilder();
- try
- {
- String line = null;
- while ((line = input.readLine()) != null)
- {
- sb.append(line);
- sb.append(System.getProperty("line.separator"));
- }
- }
- finally
- {
- input.close();
- }
- return sb.toString();
- }
-
- /**
- * Sets the main output directory.
- * If the directory does not exist, it will be created.
- */
- public void testOutputDirectory() throws Exception
- {
- provide();
- ClassLoader loader = getArtefactClassLoader();
- Class<?> responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.AddResponse");
- XmlRootElement rootElement = (XmlRootElement) responseWrapper.getAnnotation(XmlRootElement.class);
- assertNotNull("@XmlRootElement missing from response wrapper", rootElement);
- assertEquals("Wrong namespace", rootElement.namespace(), "http://foo.bar.com/calculator");
- responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.ProcessListResponse");
- XmlList xmlList = (XmlList) responseWrapper.getDeclaredField("_return").getAnnotation(XmlList.class);
- assertNotNull("@XmlList missing from response wrapper's _return field", xmlList);
- if (!isIntegrationMetro())
- {
- responseWrapper = loader.loadClass("org.jboss.test.ws.jaxws.smoke.tools.jaxws.ProcessCustomResponse");
- XmlJavaTypeAdapter xmlJavaTypeAdapter = (XmlJavaTypeAdapter) responseWrapper.getDeclaredField("_return").getAnnotation(XmlJavaTypeAdapter.class);
- assertNotNull("@XmlJavaTypeAdapter missing from response wrapper's _return field", xmlJavaTypeAdapter);
- assertEquals("org.jboss.test.ws.jaxws.smoke.tools.CustomAdapter", xmlJavaTypeAdapter.value().getName());
- }
- else
- {
- System.out.println("FIXME: [JBWS-2479] @XmlJavaTypeAdapter on SEI causes exception");
- }
- }
-
- /**
- * Sets the resource directory. This directory will contain any generated
- * WSDL and XSD files. If the directory does not exist, it will be created.
- * If not specified, the output directory will be used instead.
- *
- */
- public void testResourceDirectory() throws Exception
- {
- File directory = createResourceFile("wsprovide" + FS + "resources");
- provider.setResourceDirectory(directory);
- provide();
-
- verifyWSDL(outputDirectory);
- }
-
- private void verifyWSDL(File directory) throws Exception
- {
- this.verifyWSDL(directory, false);
- }
-
- private void verifyWSDL(File directory, boolean soap12) throws Exception
- {
- File wsdl = new File(
- directory.getAbsolutePath()+
- FS + "CalculatorBeanService.wsdl"
- );
-
- assertTrue("WSDL not generated", wsdl.exists());
- Element root = DOMUtils.parse( new FileInputStream(wsdl));
- Element serviceElement = DOMUtils.getFirstChildElement(root, "service");
- assertEquals(serviceElement.getAttribute("name"), "CalculatorBeanService");
- Element bindingElement = DOMUtils.getFirstChildElement(root, "binding");
- Element soapBindingElement = DOMUtils.getFirstChildElement(bindingElement,"binding");
- if (soap12)
- {
- assertEquals("http://schemas.xmlsoap.org/wsdl/soap12/", soapBindingElement.getNamespaceURI());
- }
- else
- {
- assertEquals("http://schemas.xmlsoap.org/wsdl/soap/", soapBindingElement.getNamespaceURI());
- }
- }
-
- /**
- * 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
- {
- File sourceDir = createResourceFile("wsprovide" + FS + "sources");
- provider.setSourceDirectory(sourceDir);
- provider.setGenerateSource(true);
- provide();
-
- verifyJavaSource(sourceDir);
- }
-
- /**
- * Sets the ClassLoader used to discover types.
- * This defaults to the one used in instantiation.
- *
- */
- public void testClassLoader() throws Exception
- {
- // Work around the sure jre settings
- String javaHome = System.getProperty("java.home");
- String jdkHome = javaHome.substring(0, javaHome.indexOf(FS + "jre"));
-
- String targetDir = createResourceFile("").getParent();
- URLClassLoader loader = new URLClassLoader(
- new URL[]
- {
- new URL("file:"+targetDir+FS+"test-libs" + FS + "jaxws-classloading-service.jar"),
- new URL("file:"+targetDir+FS+"test-libs" + FS + "jaxws-classloading-types.jar"),
- new URL("file:"+jdkHome+FS+"lib" + FS + "tools.jar")
- },
- getArtefactClassLoader()
- );
-
- provider.setClassLoader(loader);
- provider.setGenerateWsdl(true);
- provider.setOutputDirectory(outputDirectory);
- provider.provide("org.jboss.test.ws.jaxws.smoke.tools.service.HelloWorld");
-
- File wsdl = new File(outputDirectory.getAbsolutePath() + FS + "HelloWorldService.wsdl");
-
- assertTrue("WSDL not generated", wsdl.exists());
- Element root = DOMUtils.parse( new FileInputStream(wsdl));
- Element serviceElement = DOMUtils.getFirstChildElement(root, "service");
- assertEquals(serviceElement.getAttribute("name"), "HelloWorldService");
- }
-
- /**
- * Sets the PrintStream to use for status feedback. The simplest example
- * would be to use System.out.
- *
- */
- public void testMessageStream() throws Exception
- {
-
-
- if(isIntegrationMetro())
- {
- System.out.println("FIXME: [JBWS-1777] WSProvide output is not correctly redirected");
- return;
- }
- else if(isIntegrationCXF())
- {
- System.out.println("FIXME: [JBWS-2508] Tools output is not correctly redirected");
- return;
- }
-
-
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- PrintStream pout = new PrintStream(bout);
-
- provider.setMessageStream(pout);
- provide();
-
- String messageOut = new String(bout.toByteArray());
-
- System.out.println("-- Begin captured output --");
- System.out.println(messageOut);
- System.out.println("-- End captured output --");
-
- assertTrue("Provider messages not correctly redirected",
- messageOut.replace('\\', '/').indexOf("org/jboss/test/ws/jaxws/smoke/tools/jaxws/Add.class") != -1 );
- }
-
- private void provide() throws Exception
- {
- this.provide(outputDirectory);
- }
-
- private void provide(File outputDirectory)
- {
- provider.setOutputDirectory(outputDirectory);
- //JBWS-2479: using different beans because the whole smoke tools test is supposed to be run for every stack
- //and we can't afford excluding it for Metro just because of JBWS-2479
-
- // JBPAPP-6253 - Metro doesn't exist in JBossWS 2.x
- //provider.provide(!isIntegrationMetro() ? CalculatorBean.class : CalculatorBeanNoAdapter.class);
- provider.provide(CalculatorBean.class);
- }
-
- // JBPAPP-6253 - Implement support for SOAP12 protocol in wsprovide - in JBossWS 2.x - CXF / Metro stacks don't exist
- private boolean isIntegrationCXF()
- {
- return false;
- }
-
- private boolean isIntegrationMetro()
- {
- return false;
- }
-
- private static final String SYSPROP_TEST_RESOURCES_DIRECTORY = "test.resources.directory";
- private static String testResourcesDir;
- public File createResourceFile(String filename)
- {
- File resDir = new File(getTestResourcesDir());
- File file = new File(resDir.getAbsolutePath() + File.separator + filename);
- return file;
- }
- public static String getTestResourcesDir()
- {
- if (testResourcesDir == null)
- testResourcesDir = System.getProperty(SYSPROP_TEST_RESOURCES_DIRECTORY);
-
- return testResourcesDir;
- }
-}
Deleted: framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPluginDelegate.java
===================================================================
--- framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPluginDelegate.java 2011-05-18 12:24:24 UTC (rev 14402)
+++ framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPluginDelegate.java 2011-05-18 15:38:51 UTC (rev 14403)
@@ -1,42 +0,0 @@
-/*
- * 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 WSProviderPluginDelegate
-{
- void testGenerateWsdl() throws Exception;
-
- void testGenerateSource() throws Exception;
-
- void testOutputDirectory() throws Exception;
-
- void testResourceDirectory() throws Exception;
-
- void testSourceDirectory() throws Exception;
-
- void testClassLoader() throws Exception;
-
- void testMessageStream() throws Exception;
-}
Modified: framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.java
===================================================================
--- framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.java 2011-05-18 12:24:24 UTC (rev 14402)
+++ framework/branches/jbossws-framework-2.0.1.GA_CP/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderTestCase.java 2011-05-18 15:38:51 UTC (rev 14403)
@@ -38,7 +38,7 @@
* @author Heiko.Braun(a)jboss.com
* @version $Revision$
*/
-public class WSProviderTestCase extends PluginBase
+public class WSProviderTestCase extends JBossWSTest
{
// tools delegate
WSContractProvider provider;
@@ -58,7 +58,8 @@
if(toogleMessageOut) provider.setMessageStream(System.out);
// shared output directory, relative to test execution
- outputDirectory = new File("wsprovide/java");
+ outputDirectory = new File("wsprovide/java");
+
}
private ClassLoader getArtefactClassLoader() throws Exception {
@@ -83,7 +84,13 @@
public void testGenerateWsdlWithExtension() throws Exception
{
- dispatch("testGenerateWsdlWithExtension");
+ provider.setGenerateWsdl(true);
+ provider.setExtension(true);
+ File outputDir = new File(outputDirectory.getAbsolutePath() + "/soap12");
+ provider.setOutputDirectory(outputDir);
+ provider.provide(CalculatorBean.class);
+
+ verifyWSDL(outputDir, true);
}
/**
@@ -135,20 +142,32 @@
provider.setResourceDirectory(directory);
provide();
- verifyWSDL(directory);
+ verifyWSDL(this.outputDirectory);
}
private void verifyWSDL(File directory) throws Exception
{
- File wsdl = new File(
- outputDirectory.getAbsolutePath()+
- "/CalculatorBeanService.wsdl"
- );
-
+ verifyWSDL(directory, false);
+ }
+
+ private void verifyWSDL(File directory, boolean soap12) throws Exception
+ {
+
+ File wsdl = new File(directory.getAbsolutePath() + "/CalculatorBeanService.wsdl");
assertTrue("WSDL not generated", wsdl.exists());
- Element root = DOMUtils.parse( new FileInputStream(wsdl));
+ Element root = DOMUtils.parse(new FileInputStream(wsdl));
Element serviceElement = DOMUtils.getFirstChildElement(root, "service");
assertEquals(serviceElement.getAttribute("name"), "CalculatorBeanService");
+ Element bindingElement = DOMUtils.getFirstChildElement(root, "binding");
+ Element soapBindingElement = DOMUtils.getFirstChildElement(bindingElement, "binding");
+ if (soap12)
+ {
+ assertEquals("http://schemas.xmlsoap.org/wsdl/soap12/", soapBindingElement.getNamespaceURI());
+ }
+ else
+ {
+ assertEquals("http://schemas.xmlsoap.org/wsdl/soap/", soapBindingElement.getNamespaceURI());
+ }
}
/**
@@ -227,4 +246,4 @@
);
}
-}
+}
\ No newline at end of file
13 years, 10 months
JBossWS SVN: r14402 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-18 08:24:24 -0400 (Wed, 18 May 2011)
New Revision: 14402
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-18 11:14:28 UTC (rev 14401)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-18 12:24:24 UTC (rev 14402)
@@ -998,7 +998,7 @@
<!-- # [JBWS-3225] jbossws console not yet available -->
<exclude>org/jboss/test/ws/console/**</exclude>
- <!-- # [JBAS-9188] jboss-service.xml not matching AS7 format -->
+ <!-- # [JBAS-9188] Implement support for nested EJBs & WARs in .sar archives -->
<exclude>org/jboss/test/ws/jaxws/jbws1854/**</exclude>
<!-- # [JBWS-3257] No class available with name 'org.jboss.security.plugins.JaasSecurityDomain' -->
13 years, 10 months
JBossWS SVN: r14401 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-18 07:14:28 -0400 (Wed, 18 May 2011)
New Revision: 14401
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
Updating exclusions
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-18 11:11:25 UTC (rev 14400)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-18 11:14:28 UTC (rev 14401)
@@ -998,7 +998,7 @@
<!-- # [JBWS-3225] jbossws console not yet available -->
<exclude>org/jboss/test/ws/console/**</exclude>
- <!-- # [JBWS-3226] jboss-service.xml not matching AS7 format -->
+ <!-- # [JBAS-9188] jboss-service.xml not matching AS7 format -->
<exclude>org/jboss/test/ws/jaxws/jbws1854/**</exclude>
<!-- # [JBWS-3257] No class available with name 'org.jboss.security.plugins.JaasSecurityDomain' -->
13 years, 10 months
JBossWS SVN: r14400 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-18 07:11:25 -0400 (Wed, 18 May 2011)
New Revision: 14400
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3257] Updating exclusions
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-18 10:56:36 UTC (rev 14399)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-05-18 11:11:25 UTC (rev 14400)
@@ -1000,9 +1000,11 @@
<!-- # [JBWS-3226] jboss-service.xml not matching AS7 format -->
<exclude>org/jboss/test/ws/jaxws/jbws1854/**</exclude>
+
+ <!-- # [JBWS-3257] No class available with name 'org.jboss.security.plugins.JaasSecurityDomain' -->
<exclude>org/jboss/test/ws/jaxws/samples/wsseDigest/UsernameDigestTestCase*</exclude>
- <!-- # [JBWS-3227] handles config file not found on classpath -->
+ <!-- # [JBWS-3227] handlers config file not found on classpath -->
<exclude>org/jboss/test/ws/jaxws/jbws3034/**</exclude>
<!-- # [JBWS-3232] javax.naming.NameNotFoundException: Name 'service' not found in context 'env' -->
13 years, 10 months
JBossWS SVN: r14398 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-05-18 06:46:46 -0400 (Wed, 18 May 2011)
New Revision: 14398
Modified:
stack/native/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3257] Updating exclusions
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2011-05-18 10:20:03 UTC (rev 14397)
+++ stack/native/trunk/modules/testsuite/pom.xml 2011-05-18 10:46:46 UTC (rev 14398)
@@ -766,9 +766,6 @@
<!-- # [JBAS-9188] Implement support for nested EJBs & WARs in .sar archives -->
<exclude>org/jboss/test/ws/jaxws/jbws1854/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws1988/UsernameAuthTestCase*</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws2116/**</exclude>
- <exclude>org/jboss/test/ws/jaxws/jbws3182/**</exclude>
<exclude>org/jboss/test/ws/jaxws/samples/jmstransport/**</exclude>
<!-- # [JBWS-3252] Investigate WSA interop tests regression -->
@@ -861,6 +858,12 @@
<!-- JAXR not available -->
<exclude>org/jboss/test/ws/jaxws/samples/jaxr/**</exclude>
+
+ <!-- # [JBWS-3257] No class available with name 'org.jboss.security.plugins.JaasSecurityDomain' -->
+ <exclude>org/jboss/test/ws/jaxws/jbws1988/UsernameAuthTestCase*</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws2116/**</exclude>
+ <exclude>org/jboss/test/ws/jaxws/jbws3182/**</exclude>
+
</excludes>
</configuration>
</plugin>
13 years, 10 months