JBossWS SVN: r10783 - in stack/cxf/trunk: modules/client and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2009-09-27 23:08:53 -0400 (Sun, 27 Sep 2009)
New Revision: 10783
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpoint.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpointImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/jbws1666/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/jbws1666/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/jbws1666/WEB-INF/web.xml
Modified:
stack/cxf/trunk/modules/client/pom.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/trunk/pom.xml
Log:
[JBWS-2740]:Added classpath entries in jbossws-cxf-client manifest
Modified: stack/cxf/trunk/modules/client/pom.xml
===================================================================
--- stack/cxf/trunk/modules/client/pom.xml 2009-09-25 12:27:39 UTC (rev 10782)
+++ stack/cxf/trunk/modules/client/pom.xml 2009-09-28 03:08:53 UTC (rev 10783)
@@ -45,8 +45,22 @@
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-bindings-coloc</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jaxws_2.1_spec</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
+
<dependency>
+ <groupId>javax.xml.ws</groupId>
+ <artifactId>jaxws-api</artifactId>
+ <version>2.1</version>
+ </dependency>
+
+
+ <dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-bindings-corba</artifactId>
</dependency>
@@ -162,5 +176,35 @@
<artifactId>log4j</artifactId>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <artifactId>maven-archiver</artifactId>
+ <groupId>org.apache.maven</groupId>
+ <version>2.4</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ <classpathLayoutType>custom</classpathLayoutType>
+ <!--a bug in http://jira.codehaus.org/browse/MJAR-118, this needs to be reviewed(remove one $) when maven jar plugin is updated-->
+ <customClasspathLayout>$${artifact.artifactId}.$${artifact.extension}</customClasspathLayout>
+ </manifest>
+ <manifestEntries>
+ <Class-Path>jbossws-framework.jar jaxws-api.jar stax-api.jar wstx.jar</Class-Path>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
</project>
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2009-09-25 12:27:39 UTC (rev 10782)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2009-09-28 03:08:53 UTC (rev 10783)
@@ -68,6 +68,12 @@
</metainf>
</jar>
+ <!-- jaxws-jbws1666 -->
+ <war destfile="${tests.output.dir}/test-libs/jaxws-jbws1666.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws1666/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws1666/TestEndpointImpl.class"/>
+ </classes>
+ </war>
<!-- Please add alphabetically -->
</target>
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/JBWS1666TestCase.java 2009-09-28 03:08:53 UTC (rev 10783)
@@ -0,0 +1,105 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.jbws1666;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.InputStreamReader;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+import org.jboss.wsf.common.IOUtils;
+
+/**
+ * [JBWS-1666] Simplify JBossWS jar dependencies
+ *
+ * http://jira.jboss.org/jira/browse/JBWS-1666
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 14-Jun-2007
+ */
+public class JBWS1666TestCase extends JBossWSTest
+{
+
+ private static final String FS = System.getProperty("file.separator"); // '/' on unix, '\' on windows
+ private static final String PS = System.getProperty("path.separator"); // ':' on unix, ';' on windows
+
+ java.util.Properties props = System.getProperties();
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS1666TestCase.class, "jaxws-jbws1666.war");
+ }
+
+ public void testPortAccess() throws Exception
+ {
+ String resStr = TestClient.testPortAccess(getServerHost());
+ assertEquals(TestClient.REQ_STR, resStr);
+ }
+
+ public void testClientAccess() throws Exception
+ {
+ File javaFile = new File (System.getProperty("java.home") + FS + "bin" + FS + "java");
+ String javaCmd = javaFile.exists() ? javaFile.getCanonicalPath() : "java";
+
+ String jbh = System.getProperty("jboss.home");
+ String jbc = jbh + FS + "client";
+ String jbl = jbh + FS + "lib";
+
+ // Setup the classpath - do not modify this lightheartedly.
+ // Maybe you should extend the Class-Path in the MANIFEST instead.
+ StringBuffer cp = new StringBuffer(System.getProperty("test.classes.directory"));
+ cp.append(PS + jbc + FS + "jbossws-cxf-client.jar");
+ cp.append(PS + jbc + FS + "jboss-common-core.jar");
+ cp.append(PS + jbc + FS + "jboss-logging-spi.jar");
+ cp.append(PS + jbc + FS + "jboss-logging-log4j.jar");
+ cp.append(PS + jbc + FS + "jcl-over-slf4j.jar");
+ cp.append(PS + jbc + FS + "slf4j-api.jar");
+ cp.append(PS + jbc + FS + "slf4j-jboss-logging.jar");
+ cp.append(PS + jbc + FS + "jbosssx-client.jar");
+ cp.append(PS + jbc + FS + "jboss-javaee.jar");
+
+ Runtime rt = Runtime.getRuntime();
+
+ String command = javaCmd + " -Djava.endorsed.dirs=" + jbl + FS + "endorsed -cp " + cp + " " + TestClient.class.getName() + " " + getServerHost();
+ System.out.println("Executing command: " + command);
+ Process proc = rt.exec(command);
+ int status = proc.waitFor();
+ if (status == 0)
+ {
+ BufferedReader br = new BufferedReader(new InputStreamReader(proc.getInputStream()));
+ String resStr = br.readLine();
+ assertEquals(TestClient.REQ_STR, resStr);
+ }
+ else
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ IOUtils.copyStream(baos, proc.getErrorStream());
+ String errStr = new String(baos.toByteArray());
+ fail(errStr);
+ }
+ }
+
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestClient.java 2009-09-28 03:08:53 UTC (rev 10783)
@@ -0,0 +1,51 @@
+/*
+ * 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.jbws1666;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+public class TestClient
+{
+ public static final String REQ_STR = "Hello World!";
+
+ public static String testPortAccess(String serverHost) throws Exception
+ {
+ URL wsdlURL = new URL("http://" + serverHost + ":8080/jaxws-jbws1666?wsdl");
+
+ QName serviceName = new QName("http://org.jboss.ws/jbws1666", "TestEndpointImplService");
+ Service service = Service.create(wsdlURL, serviceName);
+ TestEndpoint port = (TestEndpoint)service.getPort(TestEndpoint.class);
+
+ String resStr = port.echo(REQ_STR);
+ return resStr;
+ }
+
+ public static void main(String[] args) throws Exception
+ {
+ String serverHost = args[0];
+ String resStr = testPortAccess(serverHost);
+ System.out.println(resStr);
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpoint.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpoint.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpoint.java 2009-09-28 03:08:53 UTC (rev 10783)
@@ -0,0 +1,32 @@
+/*
+ * 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.jbws1666;
+
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/jbws1666")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface TestEndpoint
+{
+ String echo(String input);
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpointImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpointImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1666/TestEndpointImpl.java 2009-09-28 03:08:53 UTC (rev 10783)
@@ -0,0 +1,37 @@
+/*
+ * 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.jbws1666;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+@WebService(name = "TestEndpoint", targetNamespace = "http://org.jboss.ws/jbws1666")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public class TestEndpointImpl
+{
+ @WebMethod
+ public String echo(String input)
+ {
+ return input;
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/jbws1666/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/jbws1666/WEB-INF/web.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/jbws1666/WEB-INF/web.xml 2009-09-28 03:08:53 UTC (rev 10783)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws1666.TestEndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2009-09-25 12:27:39 UTC (rev 10782)
+++ stack/cxf/trunk/pom.xml 2009-09-28 03:08:53 UTC (rev 10783)
@@ -78,7 +78,8 @@
<xmlsec.version>1.4.3</xmlsec.version>
<wstx.version>3.2.8</wstx.version>
</properties>
-
+
+
<!-- DependencyManagement -->
<dependencyManagement>
<dependencies>
@@ -414,6 +415,23 @@
<!-- Plugins -->
<build>
+
+ <!-- PluginMangament-->
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <artifactId>maven-archiver</artifactId>
+ <groupId>org.apache.maven</groupId>
+ <version>2.4</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
15 years, 5 months
JBossWS SVN: r10780 - in framework/branches/ropalka/testsuite/test/java/org/jboss/test/ws/jaxws: endpoint and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-09-25 08:25:39 -0400 (Fri, 25 Sep 2009)
New Revision: 10780
Added:
framework/branches/ropalka/testsuite/test/java/org/jboss/test/ws/jaxws/endpoint/
framework/branches/ropalka/testsuite/test/java/org/jboss/test/ws/jaxws/endpoint/jse/
framework/branches/ropalka/testsuite/test/java/org/jboss/test/ws/jaxws/endpoint/jse/EndpointBean.java
framework/branches/ropalka/testsuite/test/java/org/jboss/test/ws/jaxws/endpoint/jse/EndpointInterface.java
framework/branches/ropalka/testsuite/test/java/org/jboss/test/ws/jaxws/endpoint/jse/EndpointTestCase.java
Log:
[JBWS-2674][JBWS-2754] creating common dynamic endpoint test case
Added: framework/branches/ropalka/testsuite/test/java/org/jboss/test/ws/jaxws/endpoint/jse/EndpointBean.java
===================================================================
--- framework/branches/ropalka/testsuite/test/java/org/jboss/test/ws/jaxws/endpoint/jse/EndpointBean.java (rev 0)
+++ framework/branches/ropalka/testsuite/test/java/org/jboss/test/ws/jaxws/endpoint/jse/EndpointBean.java 2009-09-25 12:25:39 UTC (rev 10780)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.endpoint.jse;
+
+import javax.jws.WebService;
+
+/**
+ * Endpoint implementation.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@WebService
+(
+ serviceName = "EndpointService",
+ endpointInterface = "org.jboss.test.ws.jaxws.endpoint.jse.EndpointInterface",
+ targetNamespace = "http://org.jboss.ws/jaxws/endpoint/jse/"
+)
+public class EndpointBean implements EndpointInterface
+{
+
+ private int count;
+
+ public String echo(String input)
+ {
+ count++;
+ return input;
+ }
+
+ public int getCount()
+ {
+ return count;
+ }
+
+}
Added: framework/branches/ropalka/testsuite/test/java/org/jboss/test/ws/jaxws/endpoint/jse/EndpointInterface.java
===================================================================
--- framework/branches/ropalka/testsuite/test/java/org/jboss/test/ws/jaxws/endpoint/jse/EndpointInterface.java (rev 0)
+++ framework/branches/ropalka/testsuite/test/java/org/jboss/test/ws/jaxws/endpoint/jse/EndpointInterface.java 2009-09-25 12:25:39 UTC (rev 10780)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.endpoint.jse;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ * Endpoint interface.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@WebService(targetNamespace = "http://org.jboss.ws/jaxws/endpoint/jse/")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface EndpointInterface extends Remote
+{
+
+ String echo(String input) throws RemoteException;
+
+ public int getCount();
+
+}
Added: framework/branches/ropalka/testsuite/test/java/org/jboss/test/ws/jaxws/endpoint/jse/EndpointTestCase.java
===================================================================
--- framework/branches/ropalka/testsuite/test/java/org/jboss/test/ws/jaxws/endpoint/jse/EndpointTestCase.java (rev 0)
+++ framework/branches/ropalka/testsuite/test/java/org/jboss/test/ws/jaxws/endpoint/jse/EndpointTestCase.java 2009-09-25 12:25:39 UTC (rev 10780)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.endpoint.jse;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.Service;
+import javax.xml.ws.soap.SOAPBinding;
+
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * Tests JAXWS dynamic endpoint deployment in an JSE environment.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public class EndpointTestCase extends JBossWSTest
+{
+ private static final int port = 8878;
+
+ public void test() throws Exception
+ {
+ String publishURL1 = "http://" + getServerHost() + ":" + port + "/jaxws-endpoint1";
+ Endpoint endpoint1 = publishEndpoint(new EndpointBean(), publishURL1);
+
+ String publishURL2 = "http://" + getServerHost() + ":" + port + "/jaxws-endpoint2";
+ Endpoint endpoint2 = publishEndpoint(new EndpointBean(), publishURL2);
+
+ invokeEndpoint(publishURL1);
+ invokeEndpoint(publishURL2);
+
+ endpoint1.stop();
+ endpoint2.stop();
+ }
+
+ private Endpoint publishEndpoint(EndpointBean epImpl, String publishURL)
+ {
+ Endpoint endpoint = Endpoint.create(SOAPBinding.SOAP11HTTP_BINDING, epImpl);
+ endpoint.publish(publishURL);
+ return endpoint;
+ }
+
+ private void invokeEndpoint(String publishURL) throws Exception
+ {
+ URL wsdlURL = new URL(publishURL + "?wsdl");
+ QName qname = new QName("http://org.jboss.ws/jaxws/endpoint/jse/", "EndpointService");
+ Service service = Service.create(wsdlURL, qname);
+ EndpointInterface port = (EndpointInterface)service.getPort(EndpointInterface.class);
+
+ // Invoke the endpoint
+ String helloWorld = "Hello world!";
+ assertEquals(0, port.getCount());
+ Object retObj = port.echo(helloWorld);
+ assertEquals(helloWorld, retObj);
+ assertEquals(1, port.getCount());
+ port.echo(helloWorld);
+ assertEquals(2, port.getCount());
+ }
+}
15 years, 5 months
JBossWS SVN: r10779 - stack/native/branches/ropalka/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-09-25 05:57:30 -0400 (Fri, 25 Sep 2009)
New Revision: 10779
Modified:
stack/native/branches/ropalka/modules/testsuite/pom.xml
Log:
[JBWS-2773] removing AS IL dependency in our tests
Modified: stack/native/branches/ropalka/modules/testsuite/pom.xml
===================================================================
--- stack/native/branches/ropalka/modules/testsuite/pom.xml 2009-09-25 09:56:32 UTC (rev 10778)
+++ stack/native/branches/ropalka/modules/testsuite/pom.xml 2009-09-25 09:57:30 UTC (rev 10779)
@@ -327,16 +327,6 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-jboss500</artifactId>
- <exclusions>
- <exclusion> <!-- Exclude old jaxws impl transitive dependency brought in by jboss-metadata -->
- <groupId>jboss.jbossws</groupId>
- <artifactId>jboss-jaxws</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>${hibernate.version}</version>
@@ -399,16 +389,6 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-jboss501</artifactId>
- <exclusions>
- <exclusion> <!-- Exclude old jaxws impl transitive dependency brought in by jboss-metadata -->
- <groupId>jboss.jbossws</groupId>
- <artifactId>jboss-jaxws</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>${hibernate.version}</version>
@@ -471,16 +451,6 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-jboss510</artifactId>
- <exclusions>
- <exclusion>
- <groupId>jboss.jbossws</groupId>
- <artifactId>jboss-jaxws</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>${hibernate.version}</version>
@@ -531,27 +501,7 @@
<jbossws.integration.target>jboss520</jbossws.integration.target>
</properties>
<dependencies>
- <!-- [JBWS-2505] -->
- <!-- START -->
- <!--
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-jboss520x</artifactId>
- <exclusions>
- <exclusion>
- <groupId>jboss.jbossws</groupId>
- <artifactId>jboss-jaxws</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- -->
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-webservices</artifactId>
- <version>${jboss.version}</version>
- </dependency>
- <!-- END -->
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>${hibernate.version}</version>
@@ -602,27 +552,7 @@
<jbossws.integration.target>jboss600</jbossws.integration.target>
</properties>
<dependencies>
- <!-- [JBWS-2505] -->
- <!-- START -->
- <!--
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-jboss600x</artifactId>
- <exclusions>
- <exclusion>
- <groupId>jboss.jbossws</groupId>
- <artifactId>jboss-jaxws</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- -->
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-webservices</artifactId>
- <version>${jboss.version}</version>
- </dependency>
- <!-- END -->
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>${hibernate.version}</version>
15 years, 5 months
JBossWS SVN: r10778 - in stack/metro/branches/ropalka: modules/testsuite and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-09-25 05:56:32 -0400 (Fri, 25 Sep 2009)
New Revision: 10778
Modified:
stack/metro/branches/ropalka/modules/testsuite/pom.xml
stack/metro/branches/ropalka/pom.xml
Log:
[JBWS-2773] removing AS IL dependency in our tests
Modified: stack/metro/branches/ropalka/modules/testsuite/pom.xml
===================================================================
--- stack/metro/branches/ropalka/modules/testsuite/pom.xml 2009-09-25 09:56:08 UTC (rev 10777)
+++ stack/metro/branches/ropalka/modules/testsuite/pom.xml 2009-09-25 09:56:32 UTC (rev 10778)
@@ -335,10 +335,6 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-jboss500</artifactId>
- </dependency>
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>${hibernate.version}</version>
@@ -396,10 +392,6 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-jboss501</artifactId>
- </dependency>
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>${hibernate.version}</version>
@@ -461,10 +453,6 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-jboss510</artifactId>
- </dependency>
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>${hibernate.version}</version>
@@ -525,27 +513,7 @@
<jbossws.integration.target>jboss520</jbossws.integration.target>
</properties>
<dependencies>
- <!-- JBWS-2505 -->
- <!-- START -->
- <!--
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-jboss520x</artifactId>
- </dependency>
- -->
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-webservices</artifactId>
- <version>${jboss.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <!-- END -->
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>${hibernate.version}</version>
@@ -606,27 +574,7 @@
<jbossws.integration.target>jboss600</jbossws.integration.target>
</properties>
<dependencies>
- <!-- JBWS-2505 -->
- <!-- START -->
- <!--
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-jboss600x</artifactId>
- </dependency>
- -->
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-webservices</artifactId>
- <version>${jboss.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <!-- END -->
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>${hibernate.version}</version>
Modified: stack/metro/branches/ropalka/pom.xml
===================================================================
--- stack/metro/branches/ropalka/pom.xml 2009-09-25 09:56:08 UTC (rev 10777)
+++ stack/metro/branches/ropalka/pom.xml 2009-09-25 09:56:32 UTC (rev 10778)
@@ -47,9 +47,9 @@
<jbossws.common.version>1.2.1-SNAPSHOT</jbossws.common.version>
<jbossws.framework.version>3.2.1-SNAPSHOT</jbossws.framework.version>
<jbossws.spi.version>1.2.1-SNAPSHOT</jbossws.spi.version>
- <jbossws.jboss500.version>3.2.0.GA</jbossws.jboss500.version>
- <jbossws.jboss501.version>3.2.0.GA</jbossws.jboss501.version>
- <jbossws.jboss510.version>3.2.0.GA</jbossws.jboss510.version>
+ <jbossws.jboss500.version>3.2.1-SNAPSHOT</jbossws.jboss500.version>
+ <jbossws.jboss501.version>3.2.1-SNAPSHOT</jbossws.jboss501.version>
+ <jbossws.jboss510.version>3.2.1-SNAPSHOT</jbossws.jboss510.version>
<!-- JBWS-2505 -->
<!-- START -->
<!--
15 years, 5 months
JBossWS SVN: r10777 - in stack/cxf/branches/ropalka: modules/resources/src/main/resources/resources and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-09-25 05:56:08 -0400 (Fri, 25 Sep 2009)
New Revision: 10777
Modified:
stack/cxf/branches/ropalka/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/cxf/branches/ropalka/modules/testsuite/pom.xml
stack/cxf/branches/ropalka/pom.xml
Log:
[JBWS-2773] removing AS IL dependency in our tests
Modified: stack/cxf/branches/ropalka/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/cxf/branches/ropalka/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2009-09-25 09:54:36 UTC (rev 10776)
+++ stack/cxf/branches/ropalka/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2009-09-25 09:56:08 UTC (rev 10777)
@@ -67,6 +67,7 @@
<patternset id="jbossws.server.lib.patternset">
<include name="**/jaxws-api.jar"/>
+ <include name="**/geronimo-ws-metadata*.jar"/>
<include name="**/jbossws-common.jar"/>
<include name="**/jbossws-framework.jar"/>
<include name="**/jbossws-spi.jar"/>
Modified: stack/cxf/branches/ropalka/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/branches/ropalka/modules/testsuite/pom.xml 2009-09-25 09:54:36 UTC (rev 10776)
+++ stack/cxf/branches/ropalka/modules/testsuite/pom.xml 2009-09-25 09:56:08 UTC (rev 10777)
@@ -324,10 +324,6 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-jboss500</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-ejb3</artifactId>
<version>${jboss.version}</version>
@@ -380,10 +376,6 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-jboss501</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-ejb3</artifactId>
<version>${jboss.version}</version>
@@ -440,10 +432,6 @@
</properties>
<dependencies>
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-jboss510</artifactId>
- </dependency>
- <dependency>
<groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-ejb3</artifactId>
<version>${jboss.version}</version>
@@ -484,22 +472,8 @@
<jbossws.integration.target>jboss520</jbossws.integration.target>
</properties>
<dependencies>
- <!-- [JBWS-2505] -->
- <!-- START -->
- <!--
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-jboss520x</artifactId>
- </dependency>
- -->
- <dependency>
<groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-webservices</artifactId>
- <version>${jboss.version}</version>
- </dependency>
- <!-- END -->
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-ejb3</artifactId>
<version>${jboss.version}</version>
</dependency>
@@ -539,22 +513,8 @@
<jbossws.integration.target>jboss600</jbossws.integration.target>
</properties>
<dependencies>
- <!-- [JBWS-2505] -->
- <!-- START -->
- <!--
<dependency>
- <groupId>org.jboss.ws</groupId>
- <artifactId>jbossws-jboss600x</artifactId>
- </dependency>
- -->
- <dependency>
<groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-webservices</artifactId>
- <version>${jboss.version}</version>
- </dependency>
- <!-- END -->
- <dependency>
- <groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-as-ejb3</artifactId>
<version>${jboss.version}</version>
</dependency>
Modified: stack/cxf/branches/ropalka/pom.xml
===================================================================
--- stack/cxf/branches/ropalka/pom.xml 2009-09-25 09:54:36 UTC (rev 10776)
+++ stack/cxf/branches/ropalka/pom.xml 2009-09-25 09:56:08 UTC (rev 10777)
@@ -46,9 +46,9 @@
<jbossws.common.version>1.2.1-SNAPSHOT</jbossws.common.version>
<jbossws.framework.version>3.2.1-SNAPSHOT</jbossws.framework.version>
<jbossws.spi.version>1.2.1-SNAPSHOT</jbossws.spi.version>
- <jbossws.jboss500.version>3.2.0.GA</jbossws.jboss500.version>
- <jbossws.jboss501.version>3.2.0.GA</jbossws.jboss501.version>
- <jbossws.jboss510.version>3.2.0.GA</jbossws.jboss510.version>
+ <jbossws.jboss500.version>3.2.1-SNAPSHOT</jbossws.jboss500.version>
+ <jbossws.jboss501.version>3.2.1-SNAPSHOT</jbossws.jboss501.version>
+ <jbossws.jboss510.version>3.2.1-SNAPSHOT</jbossws.jboss510.version>
<!-- JBWS-2505 -->
<!-- START -->
<!--
15 years, 5 months
JBossWS SVN: r10776 - in framework/branches/ropalka/src/main/java/org/jboss/wsf/framework: security and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-09-25 05:54:36 -0400 (Fri, 25 Sep 2009)
New Revision: 10776
Added:
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/security/
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/security/DefaultSecurityAdapterFactory.java
Modified:
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java
framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java
Log:
[JBWS-2773] providing default SecurityAdaptorFactory
Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java 2009-09-25 09:52:25 UTC (rev 10775)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java 2009-09-25 09:54:36 UTC (rev 10776)
@@ -28,6 +28,7 @@
import org.jboss.wsf.framework.http.DefaultHttpServerFactory;
import org.jboss.wsf.framework.invocation.DefaultResourceInjectorFactory;
import org.jboss.wsf.framework.management.DefaultEndpointMetricsFactory;
+import org.jboss.wsf.framework.security.DefaultSecurityAdapterFactory;
import org.jboss.wsf.framework.serviceref.DefaultServiceRefHandlerFactory;
import org.jboss.wsf.framework.serviceref.DefaultServiceRefMetaDataParserFactory;
import org.jboss.wsf.spi.SPIProvider;
@@ -37,24 +38,16 @@
import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
import org.jboss.wsf.spi.http.HttpContextFactory;
import org.jboss.wsf.spi.http.HttpServerFactory;
-import org.jboss.wsf.spi.invocation.InvocationHandlerFactory;
-import org.jboss.wsf.spi.invocation.RequestHandlerFactory;
import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
-import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
-import org.jboss.wsf.spi.ioc.IoCContainerProxyFactory;
import org.jboss.wsf.spi.management.EndpointMetricsFactory;
-import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.management.StackConfigFactory;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.ServiceRefMetaDataParserFactory;
-import org.jboss.wsf.spi.serviceref.ServiceRefBinderFactory;
import org.jboss.wsf.spi.serviceref.ServiceRefHandlerFactory;
import org.jboss.wsf.spi.util.ServiceLoader;
/**
- * @author Thomas.Diesler(a)jboss.com
- * @since 13-Aug-2007
+ * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
class DefaultSPIProvider extends SPIProvider
{
@@ -66,83 +59,52 @@
{
T returnType = null;
- // SPI provided by framework, default that can be overridden
-
+ // SPIs provided by framework, defaults can be overridden
if (DeploymentAspectManagerFactory.class.equals(spiType))
{
- returnType = (T)loadService(spiType, DefaultDeploymentAspectManagerFactory.class.getName());
+ returnType = loadService(spiType, DefaultDeploymentAspectManagerFactory.class);
}
if (DeploymentModelFactory.class.equals(spiType))
{
- returnType = (T)loadService(spiType, DefaultDeploymentModelFactory.class.getName());
+ returnType = loadService(spiType, DefaultDeploymentModelFactory.class);
}
else if (EndpointMetricsFactory.class.equals(spiType))
{
- returnType = (T)loadService(spiType, DefaultEndpointMetricsFactory.class.getName());
+ returnType = loadService(spiType, DefaultEndpointMetricsFactory.class);
}
else if (HttpContextFactory.class.equals(spiType))
{
- returnType = (T)loadService(spiType, DefaultHttpContextFactory.class.getName());
+ returnType = loadService(spiType, DefaultHttpContextFactory.class);
}
else if (HttpServerFactory.class.equals(spiType))
{
- returnType = (T)loadService(spiType, DefaultHttpServerFactory.class.getName());
+ returnType = loadService(spiType, DefaultHttpServerFactory.class);
}
else if (LifecycleHandlerFactory.class.equals(spiType))
{
- returnType = (T)loadService(spiType, DefaultLifecycleHandlerFactory.class.getName());
+ returnType = loadService(spiType, DefaultLifecycleHandlerFactory.class);
}
else if (ResourceInjectorFactory.class.equals(spiType))
{
- returnType = (T)loadService(spiType, DefaultResourceInjectorFactory.class.getName());
+ returnType = loadService(spiType, DefaultResourceInjectorFactory.class);
}
else if (ServiceRefHandlerFactory.class.equals(spiType))
{
- returnType = (T)loadService(spiType, DefaultServiceRefHandlerFactory.class.getName());
+ returnType = loadService(spiType, DefaultServiceRefHandlerFactory.class);
}
else if (ServiceRefMetaDataParserFactory.class.equals(spiType))
{
- returnType = (T)loadService(spiType, DefaultServiceRefMetaDataParserFactory.class.getName());
+ returnType = loadService(spiType, DefaultServiceRefMetaDataParserFactory.class);
}
-
- // SPI provided by either container or stack integration
-
- else if (StackConfigFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (ServerConfigFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (EndpointRegistryFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (InvocationHandlerFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (RequestHandlerFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
else if (SecurityAdaptorFactory.class.equals(spiType))
{
- returnType = (T)loadService(spiType, null);
+ returnType = loadService(spiType, DefaultSecurityAdapterFactory.class);
}
- else if (ServiceRefBinderFactory.class.equals(spiType))
+ else
{
+ // SPI provided by either container or stack integration that has no default implementation
returnType = (T)loadService(spiType, null);
}
- else if (WebServiceContextFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
- else if (IoCContainerProxyFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, null);
- }
if (returnType == null)
throw new WSFException("Failed to provide SPI '" + spiType + "'");
@@ -151,8 +113,11 @@
}
// Load SPI implementation through ServiceLoader
- private <T> T loadService(Class<T> spiType, String defaultImpl)
+ @SuppressWarnings("unchecked")
+ private <T> T loadService(Class<T> spiType, Class<?> defaultImpl)
{
- return (T)ServiceLoader.loadService(spiType.getName(), defaultImpl);
+ final String defaultImplName = defaultImpl != null ? defaultImpl.getName() : null;
+ return (T)ServiceLoader.loadService(spiType.getName(), defaultImplName);
}
+
}
Modified: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java 2009-09-25 09:52:25 UTC (rev 10775)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/DefaultSPIProviderResolver.java 2009-09-25 09:54:36 UTC (rev 10776)
@@ -25,13 +25,24 @@
import org.jboss.wsf.spi.SPIProviderResolver;
/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 18, 2007
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:hbraun@redhat.com">Heiko Braun</a>
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
-public class DefaultSPIProviderResolver extends SPIProviderResolver
+public final class DefaultSPIProviderResolver extends SPIProviderResolver
{
+
+ private static final SPIProvider SPI_PROVIDER = new DefaultSPIProvider();
+
+ public DefaultSPIProviderResolver()
+ {
+ super();
+ }
+
public SPIProvider getProvider()
{
- return new DefaultSPIProvider();
+ return DefaultSPIProviderResolver.SPI_PROVIDER;
}
+
}
Added: framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/security/DefaultSecurityAdapterFactory.java
===================================================================
--- framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/security/DefaultSecurityAdapterFactory.java (rev 0)
+++ framework/branches/ropalka/src/main/java/org/jboss/wsf/framework/security/DefaultSecurityAdapterFactory.java 2009-09-25 09:54:36 UTC (rev 10776)
@@ -0,0 +1,92 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.wsf.framework.security;
+
+import java.security.Principal;
+
+import javax.security.auth.Subject;
+
+import org.jboss.wsf.spi.invocation.SecurityAdaptor;
+import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
+
+/**
+ * TODO: javadoc
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class DefaultSecurityAdapterFactory extends SecurityAdaptorFactory
+{
+
+ private static SecurityAdaptor SECURITY_ADAPTOR = new DefaultSecurityAdaptor();
+
+ /**
+ * Constructor.
+ */
+ public DefaultSecurityAdapterFactory()
+ {
+ super();
+ }
+
+ /**
+ * Creates new security adapter instance.
+ *
+ * @return security adapter
+ */
+ public SecurityAdaptor newSecurityAdapter()
+ {
+ return DefaultSecurityAdapterFactory.SECURITY_ADAPTOR;
+ }
+
+ private static class DefaultSecurityAdaptor implements SecurityAdaptor
+ {
+
+ private static ThreadLocal<Principal> principal = new ThreadLocal<Principal>();
+ private static ThreadLocal<Object> credential = new ThreadLocal<Object>();
+
+ public Object getCredential()
+ {
+ return DefaultSecurityAdaptor.credential.get();
+ }
+
+ public Principal getPrincipal()
+ {
+ return DefaultSecurityAdaptor.principal.get();
+ }
+
+ public void pushSubjectContext(Subject subject, Principal principal, Object credential)
+ {
+ // does nothing
+ }
+
+ public void setCredential(Object credential)
+ {
+ DefaultSecurityAdaptor.credential.set(credential);
+ }
+
+ public void setPrincipal(Principal principal)
+ {
+ DefaultSecurityAdaptor.principal.set(principal);
+ }
+
+ }
+
+}
15 years, 5 months
JBossWS SVN: r10775 - common/branches/ropalka/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-09-25 05:52:25 -0400 (Fri, 25 Sep 2009)
New Revision: 10775
Modified:
common/branches/ropalka/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java
Log:
[JBWS-2773] lookup SPI only if credentials are provided
Modified: common/branches/ropalka/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java
===================================================================
--- common/branches/ropalka/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java 2009-09-24 13:12:32 UTC (rev 10774)
+++ common/branches/ropalka/src/main/java/org/jboss/wsf/test/TestDeployerJBoss.java 2009-09-25 09:52:25 UTC (rev 10775)
@@ -75,10 +75,12 @@
Principal prevUsername = null;
Object prevPassword = null;
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- SecurityAdaptor securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).newSecurityAdapter();
+ SecurityAdaptor securityAdaptor = null;
if (username != null || password != null)
{
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ securityAdaptor = spiProvider.getSPI(SecurityAdaptorFactory.class).newSecurityAdapter();
+
prevUsername = securityAdaptor.getPrincipal();
prevPassword = securityAdaptor.getCredential();
securityAdaptor.setPrincipal(new SimplePrincipal(username));
15 years, 5 months