JBossWS SVN: r16772 - in shared-testsuite/trunk/testsuite/src/test: java/org/jboss/test/ws/jaxws and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-26 06:04:11 -0400 (Wed, 26 Sep 2012)
New Revision: 16772
Added:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EJB3EndpointImpl.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EJBInterceptor.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EJBInterceptorImpl.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EndpointIface.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/JBWS3441TestCase.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/POJOEndpointImpl.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/POJOInterceptor.java
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/POJOInterceptorImpl.java
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3441/
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3441/WEB-INF/
shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3441/WEB-INF/beans.xml
Modified:
shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-3441] providing test case
Modified: shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml 2012-09-26 05:08:14 UTC (rev 16771)
+++ shared-testsuite/trunk/testsuite/src/test/ant-import/build-jars-jaxws.xml 2012-09-26 10:04:11 UTC (rev 16772)
@@ -1246,6 +1246,17 @@
</classes>
</war>
+ <!-- jaxws-jbws3441 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws3441.war" needxmlfile="false">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws3441/*.class" />
+ <exclude name="org/jboss/test/ws/jaxws/jbws3441/*TestCase.class" />
+ </classes>
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbws3441/WEB-INF">
+ <include name="beans.xml" />
+ </webinf>
+ </war>
+
<!-- jaxws-jbws3477-custom-provider -->
<war warfile="${tests.output.dir}/test-libs/jaxws-jbws3477-custom-provider.war" needxmlfile="false">
<classes dir="${tests.output.dir}/test-classes">
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EJB3EndpointImpl.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EJB3EndpointImpl.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EJB3EndpointImpl.java 2012-09-26 10:04:11 UTC (rev 16772)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.jbws3441;
+
+import javax.ejb.Stateless;
+import javax.jws.WebService;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@WebService(name = "EJB3Endpoint", serviceName="EJB3EndpointService", targetNamespace = "http://org.jboss.test.ws/jbws3441")
+@Stateless
+public class EJB3EndpointImpl implements EndpointIface
+{
+ static boolean interceptorCalled;
+
+ @EJBInterceptor
+ public String echo(final String message)
+ {
+ return interceptorCalled ? message + " (including EJB interceptor)" : message;
+ }
+}
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EJBInterceptor.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EJBInterceptor.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EJBInterceptor.java 2012-09-26 10:04:11 UTC (rev 16772)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.jbws3441;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import javax.interceptor.InterceptorBinding;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+@InterceptorBinding
+@Retention(RUNTIME)
+@Target({METHOD, TYPE})
+public @interface EJBInterceptor {}
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EJBInterceptorImpl.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EJBInterceptorImpl.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EJBInterceptorImpl.java 2012-09-26 10:04:11 UTC (rev 16772)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.jbws3441;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@EJBInterceptor
+@Interceptor
+public class EJBInterceptorImpl
+{
+ public EJBInterceptorImpl()
+ {
+ System.out.println("EJB interceptor initialized");
+ }
+
+ @AroundInvoke
+ public Object intercept(final InvocationContext ic) throws Exception
+ {
+ EJB3EndpointImpl.interceptorCalled = true;
+ return ic.proceed();
+ }
+}
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EndpointIface.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EndpointIface.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/EndpointIface.java 2012-09-26 10:04:11 UTC (rev 16772)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.jbws3441;
+
+import javax.jws.WebService;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@WebService(name = "EndpointIface", targetNamespace = "http://org.jboss.test.ws/jbws3441")
+public interface EndpointIface
+{
+ public String echo(final String message);
+}
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/JBWS3441TestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/JBWS3441TestCase.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/JBWS3441TestCase.java 2012-09-26 10:04:11 UTC (rev 16772)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.jbws3441;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-3441] Support CDI interceptors for POJO JAX-WS services
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public class JBWS3441TestCase extends JBossWSTest
+{
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBWS3441TestCase.class, "jaxws-jbws3441.war");
+ }
+
+ private EndpointIface getPojo() throws Exception
+ {
+ final URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws3441/POJOEndpointService?wsdl");
+ final QName serviceName = new QName("http://org.jboss.test.ws/jbws3441", "POJOEndpointService");
+ final Service service = Service.create(wsdlURL, serviceName);
+ return service.getPort(EndpointIface.class);
+ }
+
+ private EndpointIface getEjb3() throws Exception
+ {
+ final URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbws3441/EJB3EndpointService/EJB3Endpoint?wsdl");
+ final QName serviceName = new QName("http://org.jboss.test.ws/jbws3441", "EJB3EndpointService");
+ final Service service = Service.create(wsdlURL, serviceName);
+ return service.getPort(EndpointIface.class);
+ }
+
+ public void testPojoCall() throws Exception
+ {
+ String message = "Hi";
+ String response = getPojo().echo(message);
+ assertEquals("Hi (including POJO interceptor)", response);
+ }
+
+ public void testEjb3Call() throws Exception
+ {
+ String message = "Hi";
+ String response = getEjb3().echo(message);
+ assertEquals("Hi (including EJB interceptor)", response);
+ }
+}
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/POJOEndpointImpl.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/POJOEndpointImpl.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/POJOEndpointImpl.java 2012-09-26 10:04:11 UTC (rev 16772)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.jbws3441;
+
+import javax.jws.WebService;
+
+/**
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+@WebService(name = "POJOEndpoint", serviceName="POJOEndpointService", targetNamespace = "http://org.jboss.test.ws/jbws3441")
+public class POJOEndpointImpl implements EndpointIface
+{
+ static boolean interceptorCalled;
+
+ @POJOInterceptor
+ public String echo(final String message)
+ {
+ return interceptorCalled ? message + " (including POJO interceptor)" : message;
+ }
+}
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/POJOInterceptor.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/POJOInterceptor.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/POJOInterceptor.java 2012-09-26 10:04:11 UTC (rev 16772)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.jbws3441;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import javax.interceptor.InterceptorBinding;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+@InterceptorBinding
+@Retention(RUNTIME)
+@Target({METHOD, TYPE})
+public @interface POJOInterceptor {}
Added: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/POJOInterceptorImpl.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/POJOInterceptorImpl.java (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws3441/POJOInterceptorImpl.java 2012-09-26 10:04:11 UTC (rev 16772)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.jbws3441;
+
+import javax.interceptor.AroundInvoke;
+import javax.interceptor.Interceptor;
+import javax.interceptor.InvocationContext;
+
+@POJOInterceptor
+@Interceptor
+public class POJOInterceptorImpl
+{
+ public POJOInterceptorImpl()
+ {
+ System.out.println("POJO interceptor initialized");
+ }
+
+ @AroundInvoke
+ public Object intercept(final InvocationContext ic) throws Exception
+ {
+ POJOEndpointImpl.interceptorCalled = true;
+ return ic.proceed();
+ }
+}
Added: shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3441/WEB-INF/beans.xml
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3441/WEB-INF/beans.xml (rev 0)
+++ shared-testsuite/trunk/testsuite/src/test/resources/jaxws/jbws3441/WEB-INF/beans.xml 2012-09-26 10:04:11 UTC (rev 16772)
@@ -0,0 +1,6 @@
+<beans>
+ <interceptors>
+ <class>org.jboss.test.ws.jaxws.jbws3441.POJOInterceptorImpl</class>
+ <class>org.jboss.test.ws.jaxws.jbws3441.EJBInterceptorImpl</class>
+ </interceptors>
+</beans>
\ No newline at end of file
12 years, 3 months
JBossWS SVN: r16771 - stack/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-26 01:08:14 -0400 (Wed, 26 Sep 2012)
New Revision: 16771
Removed:
stack/cxf/branches/ropalka_JBWS-3550/
Log:
removing obsolete branch
12 years, 3 months
JBossWS SVN: r16770 - in stack/cxf/trunk: modules/dist and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-26 01:07:55 -0400 (Wed, 26 Sep 2012)
New Revision: 16770
Added:
stack/cxf/trunk/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java
Removed:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java
stack/cxf/trunk/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java
Modified:
stack/cxf/trunk/
stack/cxf/trunk/modules/dist/pom.xml
stack/cxf/trunk/modules/dist/src/main/distro/build-deploy.xml
stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml
stack/cxf/trunk/pom.xml
Log:
[JBWS-3550] switch to new JAXWS POJO invocation process - svn merge -r 16746:16757 https://svn.jboss.org/repos/jbossws/stack/cxf/branches/ropalka_JBWS-3550
Property changes on: stack/cxf/trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/branches/ropalka:16301-16305
+ /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/branches/ropalka:16301-16305
/stack/cxf/branches/ropalka_JBWS-3550:16747-16757
Modified: stack/cxf/trunk/modules/dist/pom.xml
===================================================================
--- stack/cxf/trunk/modules/dist/pom.xml 2012-09-26 05:01:12 UTC (rev 16769)
+++ stack/cxf/trunk/modules/dist/pom.xml 2012-09-26 05:07:55 UTC (rev 16770)
@@ -146,6 +146,10 @@
<artifactId>jbossws-jboss712-server-integration</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jandex</artifactId>
+ </dependency>
<!--junit-->
<dependency>
<groupId>junit</groupId>
Modified: stack/cxf/trunk/modules/dist/src/main/distro/build-deploy.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/distro/build-deploy.xml 2012-09-26 05:01:12 UTC (rev 16769)
+++ stack/cxf/trunk/modules/dist/src/main/distro/build-deploy.xml 2012-09-26 05:07:55 UTC (rev 16770)
@@ -31,13 +31,20 @@
<target name="deploy-structure-jboss71x" depends="prepare-deploy">
<delete dir="${deploy.structure}"/>
- <path id="jbossws-common.path">
+ <path id="jboss.ant.tasks.classpath">
<fileset dir="${deploy.artifacts.dir}">
<include name="**/jbossws-common-tools.jar"/>
+ <include name="**/jandex.jar"/>
</fileset>
</path>
- <taskdef name="installModules" classname="org.jboss.ws.tools.ant.InstallModulesTask" classpathref="jbossws-common.path"/>
+ <taskdef name="installModules" classname="org.jboss.ws.tools.ant.InstallModulesTask" classpathref="jboss.ant.tasks.classpath"/>
+ <taskdef name="jandex" classname="org.jboss.jandex.JandexAntTask" classpathref="jboss.ant.tasks.classpath"/>
+ <jandex run="true" verbose="false" newJar="true">
+ <fileset dir="${deploy.artifacts.dir}/lib">
+ <include name="cxf*security.jar"/>
+ </fileset>
+ </jandex>
<antcall target="deploy-jbossws-cxf-modules" inheritall="false">
<param name="installserver" value="${deploy.structure}"/>
<param name="thirdpartydir" value="${deploy.artifacts.dir}"/>
@@ -140,13 +147,20 @@
<target name="deploy-structure-jboss72x" depends="prepare-deploy">
<delete dir="${deploy.structure}"/>
- <path id="jbossws-common.path">
+ <path id="jboss.ant.tasks.classpath">
<fileset dir="${deploy.artifacts.dir}">
<include name="**/jbossws-common-tools.jar"/>
+ <include name="**/jandex.jar"/>
</fileset>
</path>
- <taskdef name="installModules" classname="org.jboss.ws.tools.ant.InstallModulesTask" classpathref="jbossws-common.path"/>
+ <taskdef name="installModules" classname="org.jboss.ws.tools.ant.InstallModulesTask" classpathref="jboss.ant.tasks.classpath"/>
+ <taskdef name="jandex" classname="org.jboss.jandex.JandexAntTask" classpathref="jboss.ant.tasks.classpath"/>
+ <jandex run="true" verbose="false" newJar="true">
+ <fileset dir="${deploy.artifacts.dir}/lib">
+ <include name="cxf*security.jar"/>
+ </fileset>
+ </jandex>
<antcall target="deploy-jbossws-cxf-modules" inheritall="false">
<param name="installserver" value="${deploy.structure}"/>
<param name="thirdpartydir" value="${deploy.artifacts.dir}"/>
Modified: stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-09-26 05:01:12 UTC (rev 16769)
+++ stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2012-09-26 05:07:55 UTC (rev 16770)
@@ -42,6 +42,7 @@
<include>org.apache.cxf.xjcplugins:cxf-*</include>
<include>com.sun.xml.bind:jaxb-impl:jar</include>
<include>com.sun.xml.bind:jaxb-xjc:jar</include>
+ <include>org.jboss:jandex:jar</include>
<include>org.jboss.ws:jbossws-api:jar</include>
<include>org.jboss.ws:jbossws-common:jar</include>
<include>org.jboss.ws:jbossws-spi:jar</include>
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java 2012-09-26 05:01:12 UTC (rev 16769)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/JBossWSInvoker.java 2012-09-26 05:07:55 UTC (rev 16770)
@@ -43,12 +43,12 @@
import java.util.List;
import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.helpers.CastUtils;
import org.apache.cxf.jaxws.JAXWSMethodInvoker;
+import org.apache.cxf.jaxws.context.WebServiceContextImpl;
import org.apache.cxf.message.Exchange;
import org.apache.cxf.message.MessageContentsList;
import org.apache.cxf.service.Service;
@@ -57,15 +57,12 @@
import org.apache.cxf.service.invoker.MethodDispatcher;
import org.apache.cxf.service.model.BindingOperationInfo;
import org.jboss.ws.api.util.ServiceLoader;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.NamespaceContextSelectorWrapperFactory;
-import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
/**
* A JBossWS extension of the Apache CXF JAXWSMethodInvoker invoker.
@@ -101,7 +98,6 @@
public class JBossWSInvoker extends JAXWSMethodInvoker implements Invoker
{
private Object targetBean;
- private WebServiceContextFactory contextFactory;
private NamespaceContextSelectorWrapperFactory nsCtxSelectorFactory;
public JBossWSInvoker() {
@@ -155,9 +151,6 @@
} finally {
//make sure the right bus is restored after coming back from the endpoint method
BusFactory.setThreadDefaultBus(threadBus);
- if (ep.getAttachment(Object.class) == null) { //JBWS-2486
- ep.addAttachment(Object.class, inv.getInvocationContext().getTargetBean());
- }
clearNamespaceContextSelector(exchange);
}
}
@@ -165,20 +158,14 @@
private Invocation createInvocation(InvocationHandler invHandler, Endpoint ep, Method m, Object[] paramArray) {
Invocation inv = invHandler.createInvocation();
InvocationContext invContext = inv.getInvocationContext();
- WebServiceContext wsCtx = getWebServiceContext(null);
+ WebServiceContext wsCtx = new WebServiceContextImpl(null);
invContext.addAttachment(WebServiceContext.class, wsCtx);
- invContext.addAttachment(MessageContext.class, wsCtx.getMessageContext());
- invContext.setTargetBean(targetBean != null ? targetBean : ep.getAttachment(Object.class)); //JBWS-2486 - JBWS-3002
+ invContext.setTargetBean(targetBean);
inv.setJavaMethod(m);
inv.setArgs(paramArray);
return inv;
}
- protected WebServiceContext getWebServiceContext(MessageContext msgCtx)
- {
- return getWebServiceContextFactory().newWebServiceContext(msgCtx);
- }
-
protected void setNamespaceContextSelector(Exchange exchange)
{
if (exchange.isOneWay() && nsCtxSelectorFactory != null)
@@ -194,15 +181,4 @@
nsCtxSelectorFactory.getWrapper().clearCurrentThreadSelector(exchange);
}
}
-
- protected synchronized WebServiceContextFactory getWebServiceContextFactory()
- {
- if (contextFactory == null)
- {
- ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
- SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
- contextFactory = spiProvider.getSPI(WebServiceContextFactory.class, cl);
- }
- return contextFactory;
- }
}
Deleted: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java 2012-09-26 05:01:12 UTC (rev 16769)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/WebServiceContextFactoryImpl.java 2012-09-26 05:07:55 UTC (rev 16770)
@@ -1,44 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2012, 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.stack.cxf;
-
-import javax.xml.ws.handler.MessageContext;
-
-import org.apache.cxf.jaxws.context.WebServiceContextImpl;
-import org.jboss.wsf.spi.invocation.ExtensibleWebServiceContext;
-import org.jboss.wsf.spi.invocation.WebServiceContextDelegate;
-import org.jboss.wsf.spi.invocation.WebServiceContextFactory;
-
-/**
- * WebServiceContext factory for CXF integration.
- *
- * @author alessio.soldano(a)jboss.com
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public class WebServiceContextFactoryImpl extends WebServiceContextFactory
-{
- @Override
- public ExtensibleWebServiceContext newWebServiceContext(MessageContext messageContext)
- {
- return new WebServiceContextDelegate(new WebServiceContextImpl(messageContext));
- }
-}
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2012-09-26 05:01:12 UTC (rev 16769)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2012-09-26 05:07:55 UTC (rev 16770)
@@ -115,8 +115,6 @@
private static void injectServiceAndHandlerResources(Endpoint endpoint)
{
ServerFactoryBean factory = endpoint.getAttachment(ServerFactoryBean.class);
- // ping endpoint to force injection
- endpoint.getInstanceProvider().getInstance(endpoint.getTargetBeanName());
if (factory != null)
{
List<Handler> chain = ((JaxWsEndpointImpl) factory.getServer().getEndpoint()).getJaxwsBinding()
Deleted: stack/cxf/trunk/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java
===================================================================
--- stack/cxf/trunk/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java 2012-09-26 05:01:12 UTC (rev 16769)
+++ stack/cxf/trunk/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java 2012-09-26 05:07:55 UTC (rev 16770)
@@ -1,105 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2012, 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.stack.cxf;
-
-import java.lang.reflect.Method;
-import java.util.List;
-
-import javax.xml.ws.WebServiceContext;
-
-import junit.framework.TestCase;
-
-import org.apache.cxf.endpoint.Endpoint;
-import org.apache.cxf.message.Exchange;
-import org.apache.cxf.message.ExchangeImpl;
-import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageImpl;
-import org.apache.cxf.service.Service;
-import org.apache.cxf.service.ServiceImpl;
-import org.apache.cxf.service.invoker.MethodDispatcher;
-import org.apache.cxf.service.model.BindingOperationInfo;
-import org.apache.cxf.service.model.OperationInfo;
-
-
-/**
- * A test case for CXF Invoker integration
- *
- * @author alessio.soldano(a)jboss.com
- * @since 20-Jun-2012
- *
- */
-public class JBossWSInvokerTest extends TestCase
-{
- /**
- * The JBossWSInvoker internals rely on the Apache CXF side of the Invoker abstraction to properly
- * set the generated WrappedMessageContext into the WebServiceContextImpl's threadlocal. As a consequence,
- * the JBossWSInvoker::performInvocation method can build up the JBoss integration WebServiceContext without
- * needing to pass in a MessageContext, as the properly created one is automatically retrieved internally
- * using the Apache CXF thread local. This all however assumes the Invoker inheritance tree is not erroneously
- * changed or the integration is not inadvertently broken in some way.
- * This test hence verifies the MessageContext instance is available inside the performInvocation method.
- */
- public void testMessageContextThreadLocal()
- {
- TestInvoker invoker = new TestInvoker();
- Exchange exchange = getTestExchange();
- Object obj = invoker.invoke(exchange, null);
- String res = obj instanceof List<?> ? ((List<?>)obj).get(0).toString() : obj.toString();
- assertEquals("OK", res);
- }
-
- private static class TestInvoker extends JBossWSInvoker
- {
- @Override
- protected Object performInvocation(Exchange exchange, final Object serviceObject, Method m, Object[] paramArray)
- throws Exception
- {
- WebServiceContext wsCtx = getWebServiceContext(null);
- return wsCtx.getMessageContext() != null ? "OK" : "FAIL";
- }
- }
-
- //build up a fake exchange instance, the minimum required to let the flow proceed till the JBossWSInvoker
- private Exchange getTestExchange() {
- Exchange exchange = new ExchangeImpl();
- Message message = new MessageImpl();
- message.setExchange(exchange);
- exchange.setInMessage(message);
- Service service = new ServiceImpl();
- MethodDispatcher md = new MethodDispatcher() {
- @Override
- public Method getMethod(BindingOperationInfo op) {
- return this.getClass().getMethods()[0];
- }
- @Override
- public BindingOperationInfo getBindingOperation(Method m, Endpoint endpoint) {
- return null;
- }
- @Override
- public void bind(OperationInfo o, Method... methods) {
- }
- };
- service.put(MethodDispatcher.class.getName(), md);
- exchange.put(Service.class, service);
- return exchange;
- }
-}
Copied: stack/cxf/trunk/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java (from rev 16757, stack/cxf/branches/ropalka_JBWS-3550/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java)
===================================================================
--- stack/cxf/trunk/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/test/java/org/jboss/wsf/stack/cxf/JBossWSInvokerTest.java 2012-09-26 05:07:55 UTC (rev 16770)
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.stack.cxf;
+
+import java.lang.reflect.Method;
+import java.util.List;
+
+import javax.xml.ws.WebServiceContext;
+import junit.framework.TestCase;
+import org.apache.cxf.jaxws.context.WebServiceContextImpl;
+import org.apache.cxf.endpoint.Endpoint;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.ExchangeImpl;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
+import org.apache.cxf.service.Service;
+import org.apache.cxf.service.ServiceImpl;
+import org.apache.cxf.service.invoker.MethodDispatcher;
+import org.apache.cxf.service.model.BindingOperationInfo;
+import org.apache.cxf.service.model.OperationInfo;
+
+
+/**
+ * A test case for CXF Invoker integration
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 20-Jun-2012
+ *
+ */
+public class JBossWSInvokerTest extends TestCase
+{
+ /**
+ * The JBossWSInvoker internals rely on the Apache CXF side of the Invoker abstraction to properly
+ * set the generated WrappedMessageContext into the WebServiceContextImpl's threadlocal. As a consequence,
+ * the JBossWSInvoker::performInvocation method can build up the JBoss integration WebServiceContext without
+ * needing to pass in a MessageContext, as the properly created one is automatically retrieved internally
+ * using the Apache CXF thread local. This all however assumes the Invoker inheritance tree is not erroneously
+ * changed or the integration is not inadvertently broken in some way.
+ * This test hence verifies the MessageContext instance is available inside the performInvocation method.
+ */
+ public void testMessageContextThreadLocal()
+ {
+ TestInvoker invoker = new TestInvoker();
+ Exchange exchange = getTestExchange();
+ Object obj = invoker.invoke(exchange, null);
+ String res = obj instanceof List<?> ? ((List<?>)obj).get(0).toString() : obj.toString();
+ assertEquals("OK", res);
+ }
+
+ private static class TestInvoker extends JBossWSInvoker
+ {
+ @Override
+ protected Object performInvocation(Exchange exchange, final Object serviceObject, Method m, Object[] paramArray)
+ throws Exception
+ {
+ WebServiceContext wsCtx = new WebServiceContextImpl(null);
+ return wsCtx.getMessageContext() != null ? "OK" : "FAIL";
+ }
+ }
+
+ //build up a fake exchange instance, the minimum required to let the flow proceed till the JBossWSInvoker
+ private Exchange getTestExchange() {
+ Exchange exchange = new ExchangeImpl();
+ Message message = new MessageImpl();
+ message.setExchange(exchange);
+ exchange.setInMessage(message);
+ Service service = new ServiceImpl();
+ MethodDispatcher md = new MethodDispatcher() {
+ @Override
+ public Method getMethod(BindingOperationInfo op) {
+ return this.getClass().getMethods()[0];
+ }
+ @Override
+ public BindingOperationInfo getBindingOperation(Method m, Endpoint endpoint) {
+ return null;
+ }
+ @Override
+ public void bind(OperationInfo o, Method... methods) {
+ }
+ };
+ service.put(MethodDispatcher.class.getName(), md);
+ exchange.put(Service.class, service);
+ return exchange;
+ }
+}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2012-09-26 05:01:12 UTC (rev 16769)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-samples-jars-jaxws.xml 2012-09-26 05:07:55 UTC (rev 16770)
@@ -394,7 +394,7 @@
<include name="stsKeystore.properties" />
</zipfileset>
<manifest>
- <attribute name="Dependencies" value="org.apache.ws.security,org.apache.cxf.impl"/> <!-- cxf impl required to extend STS impl -->
+ <attribute name="Dependencies" value="org.apache.ws.security,org.apache.cxf.impl annotations"/> <!-- cxf impl required to extend STS impl -->
</manifest>
</war>
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2012-09-26 05:01:12 UTC (rev 16769)
+++ stack/cxf/trunk/pom.xml 2012-09-26 05:07:55 UTC (rev 16770)
@@ -67,7 +67,7 @@
<jbossws.jboss710.version>4.1.0-SNAPSHOT</jbossws.jboss710.version>
<jbossws.jboss711.version>4.1.0-SNAPSHOT</jbossws.jboss711.version>
<jbossws.jboss712.version>4.1.0-SNAPSHOT</jbossws.jboss712.version>
- <jbossws.native.version>4.1.0.Beta2</jbossws.native.version>
+ <jbossws.native.version>4.1.0-SNAPSHOT</jbossws.native.version>
<jboss710.version>7.1.0.Final</jboss710.version>
<jboss711.version>7.1.1.Final</jboss711.version>
<jboss712.version>7.1.2.Final</jboss712.version>
@@ -80,6 +80,7 @@
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
<jboss-logging.version>3.1.2.GA</jboss-logging.version>
<jboss-logging-processor.version>1.0.3.Final</jboss-logging-processor.version>
+ <jboss.jandex.version>1.0.3.Final</jboss.jandex.version>
<jboss.xb.version>2.0.3.GA</jboss.xb.version>
<picketbox.version>4.0.9.Final</picketbox.version>
<picketlink.version>2.1.4.Final</picketlink.version>
@@ -1224,6 +1225,11 @@
<version>${commons.logging.version}</version>
</dependency>
<dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jandex</artifactId>
+ <version>${jboss.jandex.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>${jboss-logging.version}</version>
12 years, 3 months
JBossWS SVN: r16769 - shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2278.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-26 01:01:12 -0400 (Wed, 26 Sep 2012)
New Revision: 16769
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java
Log:
enhancing test case
Modified: shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java
===================================================================
--- shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java 2012-09-26 05:00:01 UTC (rev 16768)
+++ shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2278/JBWS2278TestCase.java 2012-09-26 05:01:12 UTC (rev 16769)
@@ -101,7 +101,7 @@
}
catch (Exception e)
{
- assertEquals("Simulated failure", e.getMessage());
+ assertTrue(e.getMessage().startsWith("Simulated failure"));
}
}
@@ -134,7 +134,7 @@
}
catch (Exception e)
{
- assertEquals("Simulated failure", e.getMessage());
+ assertTrue(e.getMessage().startsWith("Simulated failure"));
}
}
12 years, 3 months
JBossWS SVN: r16768 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-26 01:00:01 -0400 (Wed, 26 Sep 2012)
New Revision: 16768
Removed:
stack/native/branches/ropalka_JBWS-3550/
Log:
removing obsolete branch
12 years, 3 months
JBossWS SVN: r16767 - in stack/native/trunk: modules/core/src/main/java/org/jboss/ws/core/server and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-26 00:58:36 -0400 (Wed, 26 Sep 2012)
New Revision: 16767
Added:
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/AbstractEndpointServlet.java
Removed:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/HandlerMetaDataJAXWS.java
Modified:
stack/native/trunk/
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties
stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
Log:
[JBWS-3550] removing useless classes - svn merge -r 16745:16753 https://svn.jboss.org/repos/jbossws/stack/native/branches/ropalka_JBWS-3550
Property changes on: stack/native/trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
+ /stack/native/branches/asoldano:14057,14069
/stack/native/branches/ropalka:13836-13879
/stack/native/branches/ropalka_JBWS-3550:16746-16753
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2012-09-26 04:53:20 UTC (rev 16766)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2012-09-26 04:58:36 UTC (rev 16767)
@@ -282,23 +282,15 @@
{
synchronized(endpoint)
{
- Object endpointImpl = endpoint.getAttachment(Object.class);
- if (endpointImpl == null)
- {
- try
- {
- // create endpoint instance
- final Class<?> endpointImplClass = endpoint.getTargetBeanClass();
- endpointImpl = endpoint.getInstanceProvider().getInstance(endpointImplClass.getName()).getValue();
- endpoint.addAttachment(Object.class, endpointImpl);
- }
- catch (Exception ex)
- {
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_CREATE_ENDPOINT_INSTANCE"), ex);
- }
- }
-
- return endpointImpl;
+ try
+ {
+ final String endpointClassName = endpoint.getTargetBeanName();
+ return endpoint.getInstanceProvider().getInstance(endpointClassName).getValue();
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException(BundleUtils.getMessage(bundle, "CANNOT_CREATE_ENDPOINT_INSTANCE"), ex);
+ }
}
}
Deleted: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/HandlerMetaDataJAXWS.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/HandlerMetaDataJAXWS.java 2012-09-26 04:53:20 UTC (rev 16766)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/HandlerMetaDataJAXWS.java 2012-09-26 04:58:36 UTC (rev 16767)
@@ -1,111 +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.ws.metadata.umdm;
-
-import javax.xml.namespace.QName;
-
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
-
-/**
- * The JAXWS metdata data for a handler element
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class HandlerMetaDataJAXWS extends HandlerMetaData
-{
- private static final long serialVersionUID = 7631133188974299826L;
-
- // The JAXWS service name pattern
- private QName serviceNamePattern;
- // The JAXWS port name pattern
- private QName portNamePattern;
- // The JAXWS protocol bindings
- private String protocolBindings;
-
- public static HandlerMetaDataJAXWS newInstance(UnifiedHandlerMetaData uhmd, HandlerType type)
- {
- HandlerMetaDataJAXWS hmd = new HandlerMetaDataJAXWS(type);
- hmd.setHandlerName(uhmd.getHandlerName());
- hmd.setHandlerClassName(uhmd.getHandlerClass());
- hmd.setInitParams(uhmd.getInitParams());
- UnifiedHandlerChainMetaData handlerChain = uhmd.getHandlerChain();
- if (handlerChain != null)
- {
- hmd.setProtocolBindings(handlerChain.getProtocolBindings());
- hmd.setServiceNamePattern(handlerChain.getServiceNamePattern());
- hmd.setPortNamePattern(handlerChain.getPortNamePattern());
- }
- return hmd;
- }
-
- public HandlerMetaDataJAXWS(HandlerType type)
- {
- super(type);
- }
-
- public QName getPortNamePattern()
- {
- return portNamePattern;
- }
-
- public void setPortNamePattern(QName portNamePattern)
- {
- this.portNamePattern = portNamePattern;
- }
-
- public String getProtocolBindings()
- {
- return protocolBindings;
- }
-
- public void setProtocolBindings(String protocolBindings)
- {
- this.protocolBindings = protocolBindings;
- }
-
- public QName getServiceNamePattern()
- {
- return serviceNamePattern;
- }
-
- public void setServiceNamePattern(QName serviceNamePattern)
- {
- this.serviceNamePattern = serviceNamePattern;
- }
-
- public String toString()
- {
- StringBuilder buffer = new StringBuilder("\nHandlerMetaDataJAXWS:");
- buffer.append("\n type=" + getHandlerType());
- buffer.append("\n name=" + getHandlerName());
- buffer.append("\n class=" + getHandlerClass());
- buffer.append("\n params=" + getInitParams());
- buffer.append("\n protocols=" + getProtocolBindings());
- buffer.append("\n services=" + getServiceNamePattern());
- buffer.append("\n ports=" + getPortNamePattern());
- return buffer.toString();
- }
-
-}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java 2012-09-26 04:53:20 UTC (rev 16766)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/metadata/umdm/ServiceMetaData.java 2012-09-26 04:58:36 UTC (rev 16767)
@@ -78,9 +78,6 @@
private String wsdlFile;
private URL mappingLocation;
private String wsdlPublishLocation;
-
- // The optional service handlers
- private List<HandlerMetaDataJAXWS> handlers = new ArrayList<HandlerMetaDataJAXWS>();
// The type mapping that is maintained by this service
private TypesMetaData types;
@@ -183,16 +180,6 @@
return types;
}
- public void addHandler(HandlerMetaDataJAXWS handler)
- {
- handlers.add(handler);
- }
-
- public List<HandlerMetaDataJAXWS> getHandlerMetaData()
- {
- return Collections.unmodifiableList(handlers);
- }
-
public List<EndpointMetaData> getEndpoints()
{
return new ArrayList<EndpointMetaData>(endpoints.values());
Copied: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/AbstractEndpointServlet.java (from rev 16753, stack/native/branches/ropalka_JBWS-3550/modules/core/src/main/java/org/jboss/wsf/stack/jbws/AbstractEndpointServlet.java)
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/AbstractEndpointServlet.java (rev 0)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/AbstractEndpointServlet.java 2012-09-26 04:58:36 UTC (rev 16767)
@@ -0,0 +1,197 @@
+/*
+ * 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.wsf.stack.jbws;
+
+import static org.jboss.ws.common.integration.WSHelper.isJseDeployment;
+
+import java.io.IOException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ResourceBundle;
+
+import javax.management.ObjectName;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.ws.WSException;
+import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.ObjectNameFactory;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.EndpointAssociation;
+import org.jboss.wsf.spi.invocation.RequestHandler;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.management.EndpointResolver;
+
+/**
+ * A cross stack webservice endpoint servlet.
+ * @author thomas.diesler(a)jboss.org
+ * @author heiko.braun(a)jboss.com
+ * @author richard.opalka(a)jboss.com
+ */
+public abstract class AbstractEndpointServlet extends HttpServlet
+{
+ private static final ResourceBundle bundle = BundleUtils.getBundle(AbstractEndpointServlet.class);
+
+ protected Endpoint endpoint;
+ private EndpointRegistry epRegistry;
+
+ /**
+ * Constructor
+ */
+ protected AbstractEndpointServlet() {}
+
+ /**
+ * Servlet lifecycle init method
+ * @param servletConfig servlet configuration
+ */
+ public final void init(ServletConfig servletConfig) throws ServletException
+ {
+ super.init(servletConfig);
+ this.initRegistry();
+ this.initServiceEndpoint(servletConfig);
+ }
+
+ /**
+ * Serves the requests
+ */
+ public final void service(HttpServletRequest req, HttpServletResponse res)
+ throws ServletException, IOException
+ {
+ try
+ {
+ EndpointAssociation.setEndpoint(endpoint);
+ RequestHandler requestHandler = endpoint.getRequestHandler();
+ requestHandler.handleHttpRequest(endpoint, req, res, getServletContext());
+ }
+ finally
+ {
+ this.postService();
+ EndpointAssociation.removeEndpoint();
+ }
+ }
+
+ /**
+ * Template method
+ */
+ protected void postService()
+ {
+ // does nothing (because of BC)
+ }
+
+ /**
+ * Template method
+ * @param cfg servlet config
+ */
+ protected void postInit(ServletConfig cfg)
+ {
+ // does nothing (because of BC)
+ }
+
+ /**
+ * Abstract method that must be overriden by each stack servlet endpoint
+ * @param servletContext servlet context
+ * @param servletName servlet name
+ * @return new stack specific endpoint resolver
+ */
+ protected abstract EndpointResolver newEndpointResolver(String servletContext, String servletName);
+
+ /**
+ * Initialize the service endpoint
+ */
+ private void initServiceEndpoint(ServletConfig servletConfig)
+ {
+ this.initEndpoint(servletConfig.getServletContext().getContextPath(), getServletName());
+ this.setRuntimeLoader();
+ this.postInit(servletConfig);
+ }
+
+ /**
+ * Initializes endpoint registry
+ */
+ private void initRegistry()
+ {
+ ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
+ epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class, cl).getEndpointRegistry();
+ }
+
+ /**
+ * Initialize the service endpoint
+ * @param contextPath context path
+ * @param servletName servlet name
+ */
+ private void initEndpoint(String contextPath, String servletName)
+ {
+ final EndpointResolver resolver = newEndpointResolver(contextPath, servletName);
+ this.endpoint = epRegistry.resolve(resolver);
+
+ if (this.endpoint == null)
+ {
+ ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN + ":" +
+ Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath + "," +
+ Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName
+ );
+ throw new WSException(BundleUtils.getMessage(bundle, "CANNOT_OBTAIN_ENDPOINT_FOR", oname));
+ }
+ }
+
+ /**
+ * Sets runtime classloader for JSE endpoints
+ */
+ private void setRuntimeLoader()
+ {
+ final Deployment dep = endpoint.getService().getDeployment();
+
+ if (isJseDeployment(dep))
+ {
+ ClassLoader classLoader = getContextClassLoader();
+ dep.setRuntimeClassLoader(classLoader);
+ }
+ }
+
+ private static ClassLoader getContextClassLoader()
+ {
+ SecurityManager sm = System.getSecurityManager();
+ if (sm == null)
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ else
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
+ public ClassLoader run()
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+ });
+ }
+ }
+
+}
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2012-09-26 04:53:20 UTC (rev 16766)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/EndpointServlet.java 2012-09-26 04:58:36 UTC (rev 16767)
@@ -31,9 +31,6 @@
import javax.servlet.http.HttpServletResponse;
import org.jboss.logging.Logger;
-import org.jboss.ws.common.injection.InjectionHelper;
-import org.jboss.ws.common.injection.PreDestroyHolder;
-import org.jboss.ws.common.servlet.AbstractEndpointServlet;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.ServletDelegate;
import org.jboss.wsf.spi.management.EndpointResolver;
@@ -46,8 +43,6 @@
*/
public final class EndpointServlet extends AbstractEndpointServlet implements ServletDelegate
{
- private List<PreDestroyHolder> preDestroyRegistry = new LinkedList<PreDestroyHolder>();
- private final Object lock = new Object();
/**
* Provides Native specific endpoint resolver
@@ -62,50 +57,6 @@
}
@Override
- protected final void postService()
- {
- registerForPreDestroy(endpoint);
- }
-
- @Override
- public final void destroy()
- {
- synchronized(this.lock)
- {
- for (final PreDestroyHolder holder : this.preDestroyRegistry)
- {
- try
- {
- final Object targetBean = holder.getObject();
- InjectionHelper.callPreDestroyMethod(targetBean);
- }
- catch (Exception exception)
- {
- Logger.getLogger(EndpointServlet.class).error(exception.getLocalizedMessage(), exception);
- }
- }
- this.preDestroyRegistry.clear();
- }
- super.destroy();
- }
-
- private void registerForPreDestroy(Endpoint ep)
- {
- PreDestroyHolder holder = (PreDestroyHolder)ep.getAttachment(PreDestroyHolder.class);
- if (holder != null)
- {
- synchronized(this.lock)
- {
- if (!this.preDestroyRegistry.contains(holder))
- {
- this.preDestroyRegistry.add(holder);
- }
- }
- ep.removeAttachment(PreDestroyHolder.class);
- }
- }
-
- @Override
public void doHead(HttpServletRequest request, HttpServletResponse response, ServletContext context)
throws ServletException, IOException
{
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties 2012-09-26 04:53:20 UTC (rev 16766)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties 2012-09-26 04:58:36 UTC (rev 16767)
@@ -9,3 +9,4 @@
CANNOT_GET_EPR=Cannot get epr when using the XML/HTTP binding
CANNOT_LOAD_CLASS=Cannot load class: {0}
+CANNOT_OBTAIN_ENDPOINT_FOR=Cannot obtain endpoint for: {0}
\ No newline at end of file
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2012-09-26 04:53:20 UTC (rev 16766)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2012-09-26 04:58:36 UTC (rev 16767)
@@ -23,7 +23,7 @@
import static org.jboss.ws.common.integration.WSHelper.isJaxrpcEjbDeployment;
import static org.jboss.ws.common.integration.WSHelper.isJaxrpcJseDeployment;
-import static org.jboss.ws.common.integration.WSHelper.isJaxwsDeployment;
+import static org.jboss.ws.common.integration.WSHelper.isJaxrpcDeployment;
import java.util.ResourceBundle;
@@ -50,15 +50,16 @@
@Override
public void start(Deployment dep)
{
+ if (!isJaxrpcDeployment(dep)) return;
UnifiedMetaData umd = dep.getAttachment(UnifiedMetaData.class);
if (umd == null)
{
- if (isJaxrpcJseDeployment(dep) && !isJaxwsDeployment(dep))
+ if (isJaxrpcJseDeployment(dep))
{
JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
umd = builder.buildMetaData((ArchiveDeployment)dep);
}
- else if (isJaxrpcEjbDeployment(dep) && !isJaxwsDeployment(dep))
+ else if (isJaxrpcEjbDeployment(dep))
{
JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
umd = builder.buildMetaData((ArchiveDeployment)dep);
12 years, 3 months
JBossWS SVN: r16766 - spi/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-26 00:53:20 -0400 (Wed, 26 Sep 2012)
New Revision: 16766
Removed:
spi/branches/ropalka_JBWS-3550/
Log:
removing obsolete branch
12 years, 3 months
JBossWS SVN: r16765 - common/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-26 00:52:53 -0400 (Wed, 26 Sep 2012)
New Revision: 16765
Removed:
common/branches/ropalka_JBWS-3550/
Log:
removing obsolete branch
12 years, 3 months
JBossWS SVN: r16764 - in common/trunk: src/main/java/org/jboss/ws/common and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-26 00:52:13 -0400 (Wed, 26 Sep 2012)
New Revision: 16764
Removed:
common/trunk/src/main/java/org/jboss/ws/common/invocation/DefaultResourceInjectorFactory.java
common/trunk/src/main/java/org/jboss/ws/common/invocation/WebServiceContextAdapter.java
common/trunk/src/main/java/org/jboss/ws/common/invocation/WebServiceContextInjector.java
common/trunk/src/main/java/org/jboss/ws/common/servlet/
Modified:
common/trunk/
common/trunk/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java
Log:
[JBWS-3550] removing useless classes - svn merge -r 16755:16756 https://svn.jboss.org/repos/jbossws/common/branches/ropalka_JBWS-3550
Property changes on: common/trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /common/branches/asoldano:14028-14056
+ /common/branches/asoldano:14028-14056
/common/branches/ropalka_JBWS-3550:16756
Deleted: common/trunk/src/main/java/org/jboss/ws/common/invocation/DefaultResourceInjectorFactory.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/invocation/DefaultResourceInjectorFactory.java 2012-09-26 04:49:18 UTC (rev 16763)
+++ common/trunk/src/main/java/org/jboss/ws/common/invocation/DefaultResourceInjectorFactory.java 2012-09-26 04:52:13 UTC (rev 16764)
@@ -1,37 +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.ws.common.invocation;
-
-import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
-import org.jboss.wsf.spi.invocation.ResourceInjector;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 19, 2007
- */
-public class DefaultResourceInjectorFactory extends ResourceInjectorFactory
-{
- public ResourceInjector newResourceInjector()
- {
- return new WebServiceContextInjector();
- }
-}
Deleted: common/trunk/src/main/java/org/jboss/ws/common/invocation/WebServiceContextAdapter.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/invocation/WebServiceContextAdapter.java 2012-09-26 04:49:18 UTC (rev 16763)
+++ common/trunk/src/main/java/org/jboss/ws/common/invocation/WebServiceContextAdapter.java 2012-09-26 04:52:13 UTC (rev 16764)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.ws.common.invocation;
-
-import java.security.Principal;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
-
-import org.jboss.wsf.spi.invocation.WebServiceContextDelegate;
-
-/**
- * Web service context which security related methods delegate to servlet container.
- *
- * @author alessio.soldano(a)jboss.com
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class WebServiceContextAdapter extends WebServiceContextDelegate
-{
-
- private final HttpServletRequest httpRequest;
-
- public WebServiceContextAdapter(final WebServiceContext ctx)
- {
- super(ctx);
- httpRequest = (HttpServletRequest)ctx.getMessageContext().get(MessageContext.SERVLET_REQUEST);
- }
-
- @Override
- public Principal getUserPrincipal()
- {
- return httpRequest.getUserPrincipal();
- }
-
- @Override
- public boolean isUserInRole(String role)
- {
- return httpRequest.isUserInRole(role);
- }
-
-}
Deleted: common/trunk/src/main/java/org/jboss/ws/common/invocation/WebServiceContextInjector.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/invocation/WebServiceContextInjector.java 2012-09-26 04:49:18 UTC (rev 16763)
+++ common/trunk/src/main/java/org/jboss/ws/common/invocation/WebServiceContextInjector.java 2012-09-26 04:52:13 UTC (rev 16764)
@@ -1,41 +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.ws.common.invocation;
-
-import javax.xml.ws.WebServiceContext;
-
-import org.jboss.ws.common.injection.InjectionHelper;
-import org.jboss.wsf.spi.invocation.ResourceInjector;
-
-/**
- * Inject the JAXWS WebServiceContext
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author ropalka(a)redhat.com
- */
-public class WebServiceContextInjector extends ResourceInjector
-{
- public void inject(Object instance, WebServiceContext context)
- {
- InjectionHelper.injectWebServiceContext(instance, context);
- }
-}
Modified: common/trunk/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java 2012-09-26 04:49:18 UTC (rev 16763)
+++ common/trunk/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java 2012-09-26 04:52:13 UTC (rev 16764)
@@ -25,7 +25,6 @@
import org.jboss.ws.common.Messages;
import org.jboss.ws.common.deployment.DefaultDeploymentModelFactory;
import org.jboss.ws.common.deployment.DefaultLifecycleHandlerFactory;
-import org.jboss.ws.common.invocation.DefaultResourceInjectorFactory;
import org.jboss.ws.common.management.DefaultEndpointMetricsFactory;
import org.jboss.ws.common.management.DefaultEndpointRegistryFactory;
import org.jboss.ws.common.management.DefaultJMSEndpointResolver;
@@ -34,7 +33,6 @@
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
-import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
import org.jboss.wsf.spi.management.EndpointMetricsFactory;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
@@ -68,10 +66,6 @@
{
returnType = loadService(spiType, DefaultLifecycleHandlerFactory.class, loader);
}
- else if (ResourceInjectorFactory.class.equals(spiType))
- {
- returnType = loadService(spiType, DefaultResourceInjectorFactory.class, loader);
- }
else if (ServiceRefHandlerFactory.class.equals(spiType))
{
returnType = loadService(spiType, DefaultServiceRefHandlerFactory.class, loader);
12 years, 3 months
JBossWS SVN: r16763 - in spi/trunk: src/main/java/org/jboss/wsf/spi/invocation and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2012-09-26 00:49:18 -0400 (Wed, 26 Sep 2012)
New Revision: 16763
Removed:
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ExtensibleWebServiceContext.java
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjector.java
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjectorFactory.java
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextDelegate.java
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java
Modified:
spi/trunk/
Log:
[JBWS-3550] removing useless classes - svn merge -r 16741:16742 https://svn.jboss.org/repos/jbossws/spi/branches/ropalka_JBWS-3550
Property changes on: spi/trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /spi/branches/JBWS-3286:14506
/spi/branches/asoldano:14017-14042
+ /spi/branches/JBWS-3286:14506
/spi/branches/asoldano:14017-14042
/spi/branches/ropalka_JBWS-3550:16742
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ExtensibleWebServiceContext.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ExtensibleWebServiceContext.java 2012-09-25 17:02:14 UTC (rev 16762)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ExtensibleWebServiceContext.java 2012-09-26 04:49:18 UTC (rev 16763)
@@ -1,64 +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.wsf.spi.invocation;
-
-import java.security.Principal;
-
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
-
-import org.jboss.wsf.spi.deployment.AbstractExtensible;
-import org.w3c.dom.Element;
-
-/**
- * A WebServiceContext makes it possible for a web service endpoint implementation
- * class to access message context and security information relative to a request
- * being served. Typically a WebServiceContext is injected into an endpoint implementation
- * class using the Resource annotation.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @author alessio.soldano(a)jboss.com
- * @since 03-May-2006
- */
-public abstract class ExtensibleWebServiceContext extends AbstractExtensible implements WebServiceContext
-{
- private MessageContext messageContext;
-
- public ExtensibleWebServiceContext(MessageContext messageContext)
- {
- this.messageContext = messageContext;
- }
-
- public MessageContext getMessageContext()
- {
- return messageContext;
- }
-
- public abstract Principal getUserPrincipal();
-
- public abstract boolean isUserInRole(String role);
-
- public abstract EndpointReference getEndpointReference(Element... arg0);
-
- public abstract <T extends EndpointReference> T getEndpointReference(Class<T> arg0, Element... arg1);
-}
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjector.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjector.java 2012-09-25 17:02:14 UTC (rev 16762)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjector.java 2012-09-26 04:49:18 UTC (rev 16763)
@@ -1,33 +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.wsf.spi.invocation;
-
-import javax.xml.ws.WebServiceContext;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 19, 2007
- */
-public abstract class ResourceInjector
-{
- public abstract void inject(Object instance, WebServiceContext context);
-}
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjectorFactory.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjectorFactory.java 2012-09-25 17:02:14 UTC (rev 16762)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/ResourceInjectorFactory.java 2012-09-26 04:49:18 UTC (rev 16763)
@@ -1,33 +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.wsf.spi.invocation;
-
-import org.jboss.wsf.spi.SPIView;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 19, 2007
- */
-public abstract class ResourceInjectorFactory implements SPIView
-{
- public abstract ResourceInjector newResourceInjector();
-}
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextDelegate.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextDelegate.java 2012-09-25 17:02:14 UTC (rev 16762)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextDelegate.java 2012-09-26 04:49:18 UTC (rev 16763)
@@ -1,77 +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.wsf.spi.invocation;
-
-import java.security.Principal;
-
-import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceContext;
-
-import org.w3c.dom.Element;
-
-/**
- * A ExtensibleWebServiceContext implementation that delegates
- * to a given WebServiceContext instance.
- *
- * @author alessio.soldano(a)jboss.com
- * @since 28-Nov-2008
- */
-public class WebServiceContextDelegate extends ExtensibleWebServiceContext
-{
- private WebServiceContext ctx;
-
- public WebServiceContextDelegate(WebServiceContext ctx)
- {
- super(ctx.getMessageContext());
- this.ctx = ctx;
- }
-
- @Override
- public Principal getUserPrincipal()
- {
- return ctx.getUserPrincipal();
- }
-
- @Override
- public boolean isUserInRole(String s)
- {
- return ctx.isUserInRole(s);
- }
-
- @Override
- public javax.xml.ws.handler.MessageContext getMessageContext()
- {
- return ctx.getMessageContext();
- }
-
- @Override
- public EndpointReference getEndpointReference(Element... arg0)
- {
- return ctx.getEndpointReference(arg0);
- }
-
- @Override
- public <T extends EndpointReference> T getEndpointReference(Class<T> arg0, Element... arg1)
- {
- return ctx.getEndpointReference(arg0, arg1);
- }
-}
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java 2012-09-25 17:02:14 UTC (rev 16762)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/WebServiceContextFactory.java 2012-09-26 04:49:18 UTC (rev 16763)
@@ -1,35 +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.wsf.spi.invocation;
-
-import org.jboss.wsf.spi.SPIView;
-
-import javax.xml.ws.handler.MessageContext;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 25, 2007
- */
-public abstract class WebServiceContextFactory implements SPIView
-{
- public abstract ExtensibleWebServiceContext newWebServiceContext(MessageContext messageContext);
-}
12 years, 3 months