Author: asoldano
Date: 2014-08-27 13:00:38 -0400 (Wed, 27 Aug 2014)
New Revision: 18870
Added:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3809/
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet2.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet3.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/DeploymentArchives.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/HelloServiceJAXWS22.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/WebServiceRefMTOMTestCase.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/MultipleEndpointService.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws2307/WEB-INF-client/web2.xml
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws2307/WEB-INF-client/web3.xml
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/samples/webserviceref/META-INF/wsdl/MultipleEndpoint.wsdl
Removed:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/AbstractServiceObjectFactoryJAXWS.java
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/
stack/cxf/branches/jbossws-cxf-4.3.x/build.xml
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Messages.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ClientBusSelector.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/injection/JBossWSResourceInjectionResolver.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefStubPropertyConfigurer.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/pom.xml
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/Install.txt
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/ant.properties.example
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build-deploy.xml
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build-setup.xml
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build-testsuite.xml
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build.xml
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/cxf/branches/jbossws-cxf-4.3.x/modules/resources/pom.xml
stack/cxf/branches/jbossws-cxf-4.3.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/HandlerAuthInterceptor.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/server/src/main/scripts/antrun-beans-config.xml
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/PolicyAttachmentTestCase.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/BasicEjb.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbPortComponentUri.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebContext.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceDupServicename.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceNoServicename.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceProvider.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceServicename.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/JBWS3809TestCase.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/dups/EjbWebServiceNoServicename.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/CryptoHelper.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService.wsdl
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/pom.xml
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/ant-import/build-samples-jaxws.xml
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/LogicalSimpleHandler.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpoint.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl2.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/CryptoCheckMain.java
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
stack/cxf/branches/jbossws-cxf-4.3.x/pom.xml
Log:
Merged revisions
18609,18616,18619,18629,18695,18710,18715,18798,18814,18816,18847,18852,18856,18860-18864,18866
via svnmerge from
https://svn.jboss.org/repos/jbossws/stack/cxf/trunk
.......
r18609 | asoldano | 2014-05-05 10:38:18 +0200 (Mon, 05 May 2014) | 2 lines
Wildfly 8.0.1 -> 8.1.0
.......
r18616 | asoldano | 2014-05-06 15:46:44 +0200 (Tue, 06 May 2014) | 2 lines
[JBWS-3786] Also ignore IllegalArgumentException in
JBossWSResourceInjectionResolver#resolve, as that's thrown during AS shutdown
.......
r18619 | asoldano | 2014-05-06 17:03:45 +0200 (Tue, 06 May 2014) | 2 lines
Set receive timeout to cope with Hudson QA machine slowness
.......
r18629 | asoldano | 2014-05-09 10:56:49 +0200 (Fri, 09 May 2014) | 2 lines
Make CXFServiceRefStubPropertyConfigurer fields final
.......
r18695 | asoldano | 2014-05-26 17:50:31 +0200 (Mon, 26 May 2014) | 2 lines
[JBWS-3796] Perform injections once on handlers and prevent concurrency issues
.......
r18710 | asoldano | 2014-06-03 11:12:40 +0200 (Tue, 03 Jun 2014) | 2 lines
More on JBWS-3378
.......
r18715 | asoldano | 2014-06-04 18:20:34 +0200 (Wed, 04 Jun 2014) | 2 lines
[JBWS-3798] @WebEndpoint name not considered when building up webservicerefs
.......
r18798 | asoldano | 2014-07-11 17:19:43 +0200 (Fri, 11 Jul 2014) | 2 lines
Avoid runtime dependency on CXF internal API, as that can mask errors with NCDFE
.......
r18814 | asoldano | 2014-07-24 00:03:45 +0200 (Thu, 24 Jul 2014) | 2 lines
Print BC version and jar location
.......
r18816 | rsearls | 2014-07-25 23:10:45 +0200 (Fri, 25 Jul 2014) | 1 line
[JBWS-3809] added tests to testsuite
.......
r18847 | asoldano | 2014-08-18 17:41:42 +0200 (Mon, 18 Aug 2014) | 2 lines
Fixing comment
.......
r18852 | asoldano | 2014-08-20 18:15:57 +0200 (Wed, 20 Aug 2014) | 2 lines
Catch specific exceptions only to avoid swallowing errors that should result in
deployment failures instead
.......
r18856 | asoldano | 2014-08-22 09:56:34 +0200 (Fri, 22 Aug 2014) | 2 lines
[JBWS-3809] Adding missing source headers
.......
r18860 | asoldano | 2014-08-25 12:35:56 +0200 (Mon, 25 Aug 2014) | 2 lines
[JBWS-3820] Throw meaningfull exception when JAX-WS 2.2 Service constructors are
required
.......
r18861 | asoldano | 2014-08-25 12:37:34 +0200 (Mon, 25 Aug 2014) | 2 lines
[JBWS-3820] Adding testcase
.......
r18862 | asoldano | 2014-08-25 13:15:01 +0200 (Mon, 25 Aug 2014) | 2 lines
Adding comment
.......
r18863 | asoldano | 2014-08-25 14:43:15 +0200 (Mon, 25 Aug 2014) | 2 lines
Removing service object factory type hierarchy which is not needed anymore (and we can
get rid of the thread local to store the bus)
.......
r18864 | asoldano | 2014-08-25 17:02:32 +0200 (Mon, 25 Aug 2014) | 2 lines
[JBWS-3821] Ensure WebServiceRef injection is not affected by system bus selection
strategy
.......
r18866 | asoldano | 2014-08-25 17:39:48 +0200 (Mon, 25 Aug 2014) | 2 lines
[JBWS-3821] Use equals for comparing strings...
.......
Property changes on: stack/cxf/branches/jbossws-cxf-4.3.x
___________________________________________________________________
Modified: svnmerge-integrated
- /stack/cxf/trunk:1-18594
+
/stack/cxf/trunk:1-18594,18609-18612,18616-18619,18621,18625-18652,18656-18658,18661,18663,18665-18668,18671-18683,18685-18687,18689-18693,18695,18698,18701,18703-18704,18706-18710,18712-18713,18715,18717-18721,18726-18730,18732,18735-18737,18742,18745-18746,18750-18752,18755-18759,18762,18770,18777-18779,18781-18787,18796,18798,18805-18808,18811-18814,18816,18822-18824,18832-18835,18837,18839-18840,18842-18843,18845,18847-18848,18852,18856-18857,18859-18864,18866
Modified: svn:mergeinfo
- /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/branches/jaspi:18054-18409
/stack/cxf/branches/ropalka:16301-16305,16966-17008
/stack/cxf/branches/ropalka_JBWS-3550:16747-16757
+ /stack/cxf/branches/asoldano:14032-14050,14068
/stack/cxf/branches/jaspi:18054-18409
/stack/cxf/branches/ropalka:16301-16305,16966-17008
/stack/cxf/branches/ropalka_JBWS-3550:16747-16757
/stack/cxf/trunk:18609,18616-18619,18629,18695,18710,18715,18798,18814,18816,18847,18852,18856,18860-18864,18866
Modified: stack/cxf/branches/jbossws-cxf-4.3.x/build.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.3.x/build.xml 2014-08-26 01:47:00 UTC (rev 18869)
+++ stack/cxf/branches/jbossws-cxf-4.3.x/build.xml 2014-08-27 17:00:38 UTC (rev 18870)
@@ -74,12 +74,12 @@
<condition property="wildfly800.home"
value="${profiles.profile.properties.wildfly800.home}">
<isset property="profiles.profile.properties.wildfly800.home"/>
</condition>
- <condition property="wildfly801.home"
value="${profiles.profile.properties.wildfly801.home}">
- <isset property="profiles.profile.properties.wildfly801.home"/>
+ <condition property="wildfly810.home"
value="${profiles.profile.properties.wildfly810.home}">
+ <isset property="profiles.profile.properties.wildfly810.home"/>
</condition>
- <fail message="Application server home not set, jboss720.home=value,
wildfly800.home=value or wildfly801.home=value to set">
+ <fail message="Application server home not set, jboss720.home=value,
wildfly800.home=value or wildfly810.home=value to set">
<condition>
<and>
<not>
@@ -89,7 +89,7 @@
<isset property="wildfly800.home"/>
</not>
<not>
- <isset property="wildfly801.home"/>
+ <isset property="wildfly810.home"/>
</not>
</and>
</condition>
@@ -98,7 +98,7 @@
<echo/>
<echo message="jboss720.home=${jboss720.home}"/>
<echo message="wildfly800.home=${wildfly800.home}"/>
- <echo message="wildfly801.home=${wildfly801.home}"/>
+ <echo message="wildfly810.home=${wildfly810.home}"/>
</target>
<target name="init" depends="mvn-settings,prepare,os-init">
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Messages.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Messages.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/Messages.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -33,6 +33,7 @@
import org.jboss.logging.Cause;
import org.jboss.logging.Message;
import org.jboss.logging.MessageBundle;
+import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.WSFDeploymentException;
@@ -225,4 +226,6 @@
@Message(id = 24101, value = "Could not find endpoint config name: %s")
WSFDeploymentException couldNotFindEndpointConfigName(String name);
+ @Message(id = 24104, value = "Service class %s is missing required JAX-WS 2.2
additional constructors")
+ WSFException missingJAXWS22ServiceConstructor(String className, @Cause Throwable
cause);
}
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ClientBusSelector.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ClientBusSelector.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ClientBusSelector.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -102,4 +102,8 @@
}
return featureStrategy != null ? featureStrategy : sysPropStrategy;
}
+
+ public static String getDefaultStrategy() {
+ return sysPropStrategy;
+ }
}
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/injection/JBossWSResourceInjectionResolver.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/injection/JBossWSResourceInjectionResolver.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/injection/JBossWSResourceInjectionResolver.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -54,6 +54,8 @@
return (T)new InitialContext().lookup("java:comp/env/" +
resourceName);
} catch (NamingException ne) {
return null;
+ } catch (IllegalArgumentException iae) {
+ return null;
}
}
Deleted:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/AbstractServiceObjectFactoryJAXWS.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/AbstractServiceObjectFactoryJAXWS.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/AbstractServiceObjectFactoryJAXWS.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -1,506 +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.wsf.stack.cxf.client.serviceref;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.BindingProvider;
-import javax.xml.ws.RespectBindingFeature;
-import javax.xml.ws.Service;
-import javax.xml.ws.WebServiceClient;
-import javax.xml.ws.WebServiceFeature;
-import javax.xml.ws.soap.AddressingFeature;
-import javax.xml.ws.soap.MTOMFeature;
-
-import org.jboss.ws.common.Messages;
-import org.jboss.wsf.spi.WSFException;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
-
-/**
- * This ServiceObjectFactory reconstructs a javax.xml.ws.Service
- * for a given WSDL when the webservice client does a JNDI lookup.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public abstract class AbstractServiceObjectFactoryJAXWS
-{
- public final Object getObjectInstance(UnifiedServiceRefMetaData serviceRef)
- {
- try
- {
- // class names
- final String serviceImplClass = this.getServiceClassName(serviceRef);
- final String targetClassName = this.getTargetClassName(serviceRef);
- // class instances
- final Class<?> serviceClass = this.getClass(serviceImplClass);
- final Class<?> targetClass = this.getClass(targetClassName);
- final Service serviceInstance;
-
- this.init(serviceRef);
- try
- {
- serviceInstance = this.instantiateService(serviceRef, serviceClass);
- this.configure(serviceRef, serviceInstance);
-
- // construct port
- final boolean instantiatePort = targetClassName != null &&
!Service.class.isAssignableFrom(targetClass);
- if (instantiatePort)
- {
- final QName portQName = this.getPortQName(targetClassName,
serviceImplClass, serviceRef);
- final WebServiceFeature[] portFeatures = this.getFeatures(targetClassName,
serviceImplClass, serviceRef);
- String forcedAddress = null;
- //if there is no wsdlLocation, always use the local deployed endpoint
address to initialize port
- URL wsdlURL = this.getWsdlURL(serviceRef, serviceClass);
- final QName serviceQName = this.getServiceQName(serviceRef,
serviceClass);
- if (wsdlURL == null &&
serviceRef.getDeployedServiceAddresses().get(serviceQName) != null)
- {
- forcedAddress =
serviceRef.getDeployedServiceAddresses().get(serviceQName);
- }
- return instantiatePort(serviceClass, targetClass, serviceInstance,
portQName, portFeatures,
- forcedAddress);
- }
- }
- finally
- {
- this.destroy(serviceRef);
- }
-
- return serviceInstance;
- }
- catch (Exception ex)
- {
- WSFException.rethrow("Cannot create service", ex);
- }
-
- return null;
- }
-
- /**
- * Lifecycle template method called before javax.xml.ws.Service object instantiation.
- *
- * @param serviceRefUMDM service reference meta data
- */
- protected abstract void init(final UnifiedServiceRefMetaData serviceRefUMDM);
-
- /**
- * Lifecycle template method called after javax.xml.ws.Service object was created
- * and before port is instantiated. It allows stack to configure service before
- * creating ports.
- *
- * @param serviceRefUMDM service reference meta data
- * @param service service instance
- */
- protected abstract void configure(final UnifiedServiceRefMetaData serviceRefUMDM,
final Service service);
-
- /**
- * Lifecycle template method called after javax.xml.ws.Service object and after port
instantiation.
- *
- * @param serviceRefUMDM
- */
- protected abstract void destroy(final UnifiedServiceRefMetaData serviceRefUMDM);
-
- private Class<?> getClass(final String className) throws ClassNotFoundException
- {
- if (className != null)
- {
- return getContextClassLoader().loadClass(className);
- }
-
- return null;
- }
-
- 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();
- }
- });
- }
- }
-
- private String getServiceClassName(final UnifiedServiceRefMetaData serviceRefMD)
- {
- final String serviceImplClassName = serviceRefMD.getServiceImplClass();
- if (serviceImplClassName != null)
- return serviceImplClassName;
-
- final String serviceInterfaceName = serviceRefMD.getServiceInterface();
- if (serviceInterfaceName != null)
- return serviceInterfaceName;
-
- return Service.class.getName(); // fallback
- }
-
- private String getTargetClassName(final UnifiedServiceRefMetaData serviceRefMD)
- {
- return serviceRefMD.getServiceRefType();
- }
-
- private Object instantiatePort(final Class<?> serviceClass, final Class<?>
targetClass, final Service target,
- final QName portQName, final WebServiceFeature[] features, final String
endpointAddress) throws NoSuchMethodException,
- InstantiationException, IllegalAccessException, InvocationTargetException
- {
- Object retVal = null;
-
- Object port = null;
- if (serviceClass != Service.class)
- {
- for (Method method : getDeclaredMethods(serviceClass))
- {
- String methodName = method.getName();
- Class<?> retType = method.getReturnType();
- if (methodName.startsWith("get") &&
targetClass.isAssignableFrom(retType))
- {
- final Method targetMethod = getMethodFor(methodName, features,
serviceClass);
- final Object[] args = getArgumentsFor(features);
- port = targetMethod.invoke(target, args);
- retVal = port;
- break;
- }
- }
- }
-
- if (port == null)
- {
- Method method = getMethodFor("getPort", portQName, features,
serviceClass);
- Object[] args = getArgumentsFor(portQName, features, targetClass);
- port = method.invoke(target, args);
- retVal = port;
- }
- if (endpointAddress != null)
- {
- ((BindingProvider)
retVal).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
endpointAddress);
- }
- return retVal;
- }
-
- private static Method[] getDeclaredMethods(final Class<?> cls) {
- return AccessController.doPrivileged(new PrivilegedAction<Method[]>() {
- public Method[] run() {
- return cls.getDeclaredMethods();
- }
- });
- }
-
- private Service instantiateService(final UnifiedServiceRefMetaData serviceRefMD, final
Class<?> serviceClass)
- throws NoSuchMethodException, InstantiationException, IllegalAccessException,
InvocationTargetException
- {
- final WebServiceFeature[] features = getFeatures(serviceRefMD);
- final QName serviceQName = this.getServiceQName(serviceRefMD, serviceClass);
- URL wsdlURL = this.getWsdlURL(serviceRefMD, serviceClass);
- if (wsdlURL == null &&
serviceRefMD.getDeployedServiceAddresses().get(serviceQName) != null)
- {
- try
- {
- wsdlURL = new
URL(serviceRefMD.getDeployedServiceAddresses().get(serviceQName) + "?wsdl");
- }
- catch (MalformedURLException e)
- {
- //ignore
- }
- }
- Service target = null;
- if (serviceClass == Service.class)
- {
- // Generic javax.xml.ws.Service
- if (wsdlURL != null)
- {
- if (features != null)
- {
- target = Service.create(wsdlURL, serviceQName, features);
- }
- else
- {
- target = Service.create(wsdlURL, serviceQName);
- }
- }
- else
- {
- throw
Messages.MESSAGES.cannotCreateServiceWithoutWsdlLocation(serviceRefMD);
- }
- }
- else
- {
- // Generated javax.xml.ws.Service subclass
- if (wsdlURL != null)
- {
- if (features != null)
- {
- Constructor<?> ctor = serviceClass.getConstructor(new Class[]
- {URL.class, QName.class, WebServiceFeature[].class});
- target = (Service) ctor.newInstance(new Object[]
- {wsdlURL, serviceQName, features});
- }
- else
- {
- Constructor<?> ctor = serviceClass.getConstructor(new Class[]
- {URL.class, QName.class});
- target = (Service) ctor.newInstance(new Object[]
- {wsdlURL, serviceQName});
- }
- }
- else
- {
- if (features != null)
- {
- Constructor<?> ctor = serviceClass.getConstructor(new Class[]
- {WebServiceFeature[].class});
- target = (Service) ctor.newInstance(new Object[]
- {features});
- }
- else
- {
- target = (Service) serviceClass.newInstance();
- }
- }
- }
-
- return target;
- }
-
- private URL getWsdlURL(final UnifiedServiceRefMetaData serviceRefMD, final
Class<?> serviceClass)
- {
- if (serviceRefMD.getWsdlLocation() == null)
- {
- final WebServiceClient webServiceClientAnnotation =
serviceClass.getAnnotation(WebServiceClient.class);
- if (webServiceClientAnnotation != null)
- {
- // use the @WebServiceClien(wsdlLocation=...) if the service ref wsdl
location returned at this time would be null
- if (webServiceClientAnnotation.wsdlLocation().length() > 0)
- {
- serviceRefMD.setWsdlOverride(webServiceClientAnnotation.wsdlLocation());
- }
- }
- }
-
- return serviceRefMD.getWsdlLocation();
- }
-
- private QName getServiceQName(final UnifiedServiceRefMetaData serviceRefMD, final
Class<?> serviceClass)
- {
- QName retVal = serviceRefMD.getServiceQName();
-
- if (retVal == null)
- {
- final WebServiceClient webServiceClientAnnotation =
serviceClass.getAnnotation(WebServiceClient.class);
- if (webServiceClientAnnotation != null)
- {
- retVal = new QName(webServiceClientAnnotation.targetNamespace(),
webServiceClientAnnotation.name());
- }
- }
-
- return retVal;
- }
-
- private WebServiceFeature[] getFeatures(final String targetClassName, final String
serviceClassName,
- final UnifiedServiceRefMetaData serviceRefMD)
- {
- if (targetClassName != null && !targetClassName.equals(serviceClassName))
- {
- final Collection<UnifiedPortComponentRefMetaData> portComponentRefs =
serviceRefMD.getPortComponentRefs();
- for (final UnifiedPortComponentRefMetaData portComponentRefMD :
portComponentRefs)
- {
- if
(targetClassName.equals(portComponentRefMD.getServiceEndpointInterface()))
- {
- return getFeatures(portComponentRefMD);
- }
- }
- }
-
- return null;
- }
-
- private QName getPortQName(final String targetClassName, final String
serviceClassName,
- final UnifiedServiceRefMetaData serviceRefMD)
- {
- if (targetClassName != null && !targetClassName.equals(serviceClassName))
- {
- final Collection<UnifiedPortComponentRefMetaData> portComponentRefs =
serviceRefMD.getPortComponentRefs();
- for (final UnifiedPortComponentRefMetaData portComponentRefMD :
portComponentRefs)
- {
- if
(targetClassName.equals(portComponentRefMD.getServiceEndpointInterface()))
- {
- return portComponentRefMD.getPortQName();
- }
- }
- }
-
- return null;
- }
-
- private Method getMethodFor(final String methodName, final QName portQName, final
WebServiceFeature[] features, final Class<?> serviceClass)
- throws NoSuchMethodException
- {
- if ((portQName == null) && (features == null))
- return serviceClass.getMethod(methodName, new Class[]
- {Class.class});
- if ((portQName != null) && (features == null))
- return serviceClass.getMethod(methodName, new Class[]
- {QName.class, Class.class});
- if ((portQName == null) && (features != null))
- return serviceClass.getMethod(methodName, new Class[]
- {Class.class, WebServiceFeature[].class});
- if ((portQName != null) && (features != null))
- return serviceClass.getMethod(methodName, new Class[]
- {QName.class, Class.class, WebServiceFeature[].class});
-
- throw new IllegalStateException();
- }
-
- private Method getMethodFor(final String methodName, final WebServiceFeature[]
features, final Class<?> serviceClass)
- throws NoSuchMethodException
- {
- if (features == null)
- {
- return serviceClass.getMethod(methodName, new Class[] {});
- }
- else
- {
- return serviceClass.getMethod(methodName, new Class[] {
WebServiceFeature[].class } );
- }
- }
-
- private Object[] getArgumentsFor(final QName portQName, final WebServiceFeature[]
features,
- final Class<?> targetClass) throws NoSuchMethodException
- {
- if ((portQName == null) && (features == null))
- return new Object[]
- {targetClass};
- if ((portQName != null) && (features == null))
- return new Object[]
- {portQName, targetClass};
- if ((portQName == null) && (features != null))
- return new Object[]
- {targetClass, features};
- if ((portQName != null) && (features != null))
- return new Object[]
- {portQName, targetClass, features};
-
- throw new IllegalStateException();
- }
-
- private Object[] getArgumentsFor(final WebServiceFeature[] features) throws
NoSuchMethodException
- {
- if (features == null)
- {
- return new Object[] {};
- }
- else
- {
- return new Object[] {features};
- }
- }
-
- private WebServiceFeature[] getFeatures(final UnifiedServiceRefMetaData serviceRef)
- {
- List<WebServiceFeature> features = new
LinkedList<WebServiceFeature>();
-
- // configure @Addressing feature
- if (serviceRef.isAddressingAnnotationSpecified())
- {
- final boolean enabled = serviceRef.isAddressingEnabled();
- final boolean required = serviceRef.isAddressingRequired();
- final String refResponses = serviceRef.getAddressingResponses();
- AddressingFeature.Responses responses = AddressingFeature.Responses.ALL;
- if ("ANONYMOUS".equals(refResponses))
- responses = AddressingFeature.Responses.ANONYMOUS;
- if ("NON_ANONYMOUS".equals(refResponses))
- responses = AddressingFeature.Responses.NON_ANONYMOUS;
-
- features.add(new AddressingFeature(enabled, required, responses));
- }
-
- // configure @MTOM feature
- if (serviceRef.isMtomAnnotationSpecified())
- {
- final boolean enabled = serviceRef.isMtomEnabled();
- final int threshold = serviceRef.getMtomThreshold();
- features.add(new MTOMFeature(enabled, threshold));
- }
-
- // configure @RespectBinding feature
- if (serviceRef.isRespectBindingAnnotationSpecified())
- {
- final boolean enabled = serviceRef.isRespectBindingEnabled();
- features.add(new RespectBindingFeature(enabled));
- }
-
- return features.size() == 0 ? null : features.toArray(new WebServiceFeature[]
- {});
- }
-
- private WebServiceFeature[] getFeatures(final UnifiedPortComponentRefMetaData
portComponentRefMD)
- {
- List<WebServiceFeature> features = new
LinkedList<WebServiceFeature>();
- // configure @Addressing feature
- if (portComponentRefMD.isAddressingAnnotationSpecified())
- {
- final boolean enabled = portComponentRefMD.isAddressingEnabled();
- final boolean required = portComponentRefMD.isAddressingRequired();
- final String refResponses = portComponentRefMD.getAddressingResponses();
- AddressingFeature.Responses responses = AddressingFeature.Responses.ALL;
- if ("ANONYMOUS".equals(refResponses))
- responses = AddressingFeature.Responses.ANONYMOUS;
- if ("NON_ANONYMOUS".equals(refResponses))
- responses = AddressingFeature.Responses.NON_ANONYMOUS;
-
- features.add(new AddressingFeature(enabled, required, responses));
- }
-
- // configure @MTOM feature
- if (portComponentRefMD.isMtomEnabled())
- {
- features.add(new MTOMFeature(true, portComponentRefMD.getMtomThreshold()));
- }
-
- // configure @RespectBinding feature
- if (portComponentRefMD.isRespectBindingAnnotationSpecified())
- {
- final boolean enabled = portComponentRefMD.isRespectBindingEnabled();
- features.add(new RespectBindingFeature(enabled));
- }
-
- return features.size() == 0 ? null : features.toArray(new WebServiceFeature[]
- {});
- }
-}
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -102,20 +102,22 @@
@SuppressWarnings("rawtypes")
public List<Handler> getHandlerChain(PortInfo portInfo)
{
- List<Handler> handlerChain = handlerMap.get(portInfo);
- if (handlerChain == null) {
- QName portQName = portInfo.getPortName();
- QName serviceQName = portInfo.getServiceName();
- String bindingId = portInfo.getBindingID();
- handlerChain = createHandlerChain(portInfo, portQName, serviceQName,
bindingId);
- handlerMap.put(portInfo, handlerChain);
+ synchronized (handlerMap)
+ {
+ List<Handler> handlerChain = handlerMap.get(portInfo);
+ if (handlerChain == null) {
+ QName portQName = portInfo.getPortName();
+ QName serviceQName = portInfo.getServiceName();
+ String bindingId = portInfo.getBindingID();
+ handlerChain = createHandlerChain(portInfo, portQName, serviceQName,
bindingId);
+ handlerMap.put(portInfo, handlerChain);
+
+ for (Handler h : handlerChain) {
+ configHandler(h);
+ }
+ }
+ return handlerChain;
}
-
- for (Handler h : handlerChain) {
- configHandler(h);
- }
-
- return handlerChain;
}
/**
@@ -142,7 +144,7 @@
}
@SuppressWarnings("rawtypes")
- public List<Handler> createHandlerChain(PortInfo portInfo, QName portQName,
QName serviceQName, String bindingID) {
+ protected List<Handler> createHandlerChain(PortInfo portInfo, QName portQName,
QName serviceQName, String bindingID) {
List<Handler> chain = new ArrayList<Handler>();
InputStream is = getInputStream();
try {
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, 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.
*
@@ -21,54 +21,513 @@
*/
package org.jboss.wsf.stack.cxf.client.serviceref;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.RespectBindingFeature;
import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.soap.AddressingFeature;
+import javax.xml.ws.soap.MTOMFeature;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.configuration.Configurer;
+import org.jboss.ws.common.Messages;
+import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedPortComponentRefMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.wsf.stack.cxf.client.ClientBusSelector;
import org.jboss.wsf.stack.cxf.client.Constants;
+import org.jboss.wsf.stack.cxf.client.UseThreadBusFeature;
import org.jboss.wsf.stack.cxf.client.configuration.JBossWSSpringBusFactory;
/**
- * {@inheritDoc}
+ * This ServiceObjectFactory reconstructs a javax.xml.ws.Service
+ * for a given WSDL when the webservice client does a JNDI lookup.
*
* @author Thomas.Diesler(a)jboss.com
* @author Richard.Opalka(a)jboss.com
* @author alessio.soldano(a)jboss.com
*/
-public final class CXFServiceObjectFactoryJAXWS extends
AbstractServiceObjectFactoryJAXWS
+public final class CXFServiceObjectFactoryJAXWS
{
- private static final ThreadLocal<Bus> busAssociation = new
ThreadLocal<Bus>();
+ private static enum PortMatch {YES, NO, MAYBE};
+
+ public final Object getObjectInstance(UnifiedServiceRefMetaData serviceRef)
+ {
+ try
+ {
+ // class names
+ final String serviceImplClass = this.getServiceClassName(serviceRef);
+ final String targetClassName = this.getTargetClassName(serviceRef);
+ // class instances
+ final Class<?> serviceClass = this.getClass(serviceImplClass);
+ final Class<?> targetClass = this.getClass(targetClassName);
+ final Service serviceInstance;
- @Override
- protected void init(final UnifiedServiceRefMetaData serviceRefUMDM)
+ BusFactory.setThreadDefaultBus(null);
+ final Bus bus = this.createNewBus(serviceRef);
+ try
+ {
+ serviceInstance = this.instantiateService(serviceRef, serviceClass);
+ if (serviceRef.getHandlerChain() != null)
+ {
+ serviceInstance.setHandlerResolver(new CXFHandlerResolverImpl(bus,
serviceRef.getHandlerChain(),
+ serviceInstance.getClass()));
+ }
+
+ // construct port
+ final boolean instantiatePort = targetClassName != null &&
!Service.class.isAssignableFrom(targetClass);
+ if (instantiatePort)
+ {
+ final QName portQName = this.getPortQName(targetClassName,
serviceImplClass, serviceRef);
+ final WebServiceFeature[] portFeatures = this.getFeatures(targetClassName,
serviceImplClass, serviceRef);
+ String forcedAddress = null;
+ //if there is no wsdlLocation, always use the local deployed endpoint
address to initialize port
+ URL wsdlURL = this.getWsdlURL(serviceRef, serviceClass);
+ final QName serviceQName = this.getServiceQName(serviceRef,
serviceClass);
+ if (wsdlURL == null &&
serviceRef.getDeployedServiceAddresses().get(serviceQName) != null)
+ {
+ forcedAddress =
serviceRef.getDeployedServiceAddresses().get(serviceQName);
+ }
+ return instantiatePort(serviceClass, targetClass, serviceInstance,
portQName, portFeatures,
+ forcedAddress);
+ }
+ }
+ finally
+ {
+ BusFactory.setThreadDefaultBus(null);
+ }
+
+ return serviceInstance;
+ }
+ catch (Exception ex)
+ {
+ WSFException.rethrow("Cannot create service", ex);
+ }
+
+ return null;
+ }
+
+ private Class<?> getClass(final String className) throws ClassNotFoundException
{
- BusFactory.setThreadDefaultBus(null);
- busAssociation.set(this.createNewBus(serviceRefUMDM));
+ if (className != null)
+ {
+ return getContextClassLoader().loadClass(className);
+ }
+
+ return null;
}
+
+ 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();
+ }
+ });
+ }
+ }
- @Override
- protected void configure(final UnifiedServiceRefMetaData serviceRefUMDM, final Service
service)
+ private String getServiceClassName(final UnifiedServiceRefMetaData serviceRefMD)
{
- if (serviceRefUMDM.getHandlerChain() != null)
+ final String serviceImplClassName = serviceRefMD.getServiceImplClass();
+ if (serviceImplClassName != null)
+ return serviceImplClassName;
+
+ final String serviceInterfaceName = serviceRefMD.getServiceInterface();
+ if (serviceInterfaceName != null)
+ return serviceInterfaceName;
+
+ return Service.class.getName(); // fallback
+ }
+
+ private String getTargetClassName(final UnifiedServiceRefMetaData serviceRefMD)
+ {
+ return serviceRefMD.getServiceRefType();
+ }
+
+ private Object instantiatePort(final Class<?> serviceClass, final Class<?>
targetClass, final Service target,
+ final QName portQName, final WebServiceFeature[] features, final String
endpointAddress) throws NoSuchMethodException,
+ InstantiationException, IllegalAccessException, InvocationTargetException
+ {
+ Object port = null;
+ Object candidatePort = null;
+ if (serviceClass != Service.class)
{
- service.setHandlerResolver(new CXFHandlerResolverImpl(busAssociation.get(),
serviceRefUMDM.getHandlerChain(),
- service.getClass()));
+ final Set<Method> signatureMatchingMethods = new HashSet<Method>();
+ for (Method method : getDeclaredMethods(serviceClass))
+ {
+ String methodName = method.getName();
+ Class<?> retType = method.getReturnType();
+ if (methodName.startsWith("get") &&
targetClass.isAssignableFrom(retType))
+ {
+ final Method targetMethod = getMethodFor(methodName, features,
serviceClass);
+ signatureMatchingMethods.add(targetMethod);
+ }
+ }
+ for (Method method : signatureMatchingMethods)
+ {
+ PortMatch matchResult = portNameMatches(portQName, method);
+ if (matchResult.equals(PortMatch.YES)) {
+ final Object[] args = getArgumentsFor(features);
+ port = method.invoke(target, args);
+ break;
+ } else if (matchResult.equals(PortMatch.MAYBE)) {
+ final Object[] args = getArgumentsFor(features);
+ candidatePort = method.invoke(target, args);
+ }
+ }
}
+ if (port == null)
+ {
+ port = candidatePort;
+ }
+ if (port == null)
+ {
+ Method method = getMethodFor("getPort", portQName, features,
serviceClass);
+ Object[] args = getArgumentsFor(portQName, features, targetClass);
+ port = method.invoke(target, args);
+ }
+ if (endpointAddress != null)
+ {
+ ((BindingProvider)
port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
endpointAddress);
+ }
+ return port;
}
+
+ private static PortMatch portNameMatches(final QName portQName, final Method
targetMethod) {
+ final String portName = portQName != null ? portQName.getLocalPart() : null;
+ if (portName == null) { //no port specified, so we *might* have a valid match...
+ return PortMatch.MAYBE;
+ }
+ WebEndpoint webEndpointAnnotation = targetMethod.getAnnotation(WebEndpoint.class);
+ if (webEndpointAnnotation == null || webEndpointAnnotation.name() == null ||
webEndpointAnnotation.name().isEmpty()) {
+ return PortMatch.MAYBE; // no way to match, no port specified using
@WebEndpoint
+ }
+ return webEndpointAnnotation.name().equals(portName) ? PortMatch.YES :
PortMatch.NO;
+ }
+
+ private static Method[] getDeclaredMethods(final Class<?> cls) {
+ return AccessController.doPrivileged(new PrivilegedAction<Method[]>() {
+ public Method[] run() {
+ return cls.getDeclaredMethods();
+ }
+ });
+ }
- @Override
- protected void destroy(final UnifiedServiceRefMetaData serviceRefUMDM)
+ private Service instantiateService(final UnifiedServiceRefMetaData serviceRefMD, final
Class<?> serviceClass)
+ throws NoSuchMethodException, InstantiationException, IllegalAccessException,
InvocationTargetException
{
- busAssociation.set(null);
- BusFactory.setThreadDefaultBus(null);
+ final List<WebServiceFeature> featuresList = getFeatures(serviceRefMD);
+ //force THREAD_BUS strategy so that the bus created before for this specific ref is
used
+ if (ClientBusSelector.getDefaultStrategy() != Constants.THREAD_BUS_STRATEGY) {
+ featuresList.add(new UseThreadBusFeature());
+ }
+ final WebServiceFeature[] features = featuresList.size() == 0 ? null :
featuresList.toArray(new WebServiceFeature[]{});
+ final QName serviceQName = this.getServiceQName(serviceRefMD, serviceClass);
+ URL wsdlURL = this.getWsdlURL(serviceRefMD, serviceClass);
+ if (wsdlURL == null &&
serviceRefMD.getDeployedServiceAddresses().get(serviceQName) != null)
+ {
+ try
+ {
+ wsdlURL = new
URL(serviceRefMD.getDeployedServiceAddresses().get(serviceQName) + "?wsdl");
+ }
+ catch (MalformedURLException e)
+ {
+ //ignore
+ }
+ }
+ Service target = null;
+ if (serviceClass == Service.class)
+ {
+ // Generic javax.xml.ws.Service
+ if (wsdlURL != null)
+ {
+ if (features != null)
+ {
+ target = Service.create(wsdlURL, serviceQName, features);
+ }
+ else
+ {
+ target = Service.create(wsdlURL, serviceQName);
+ }
+ }
+ else
+ {
+ throw
Messages.MESSAGES.cannotCreateServiceWithoutWsdlLocation(serviceRefMD);
+ }
+ }
+ else
+ {
+ // Generated javax.xml.ws.Service subclass
+ if (wsdlURL != null)
+ {
+ if (features != null)
+ {
+ Constructor<?> ctor = serviceClass.getConstructor(new Class[]
+ {URL.class, QName.class, WebServiceFeature[].class});
+ target = (Service) ctor.newInstance(new Object[]
+ {wsdlURL, serviceQName, features});
+ }
+ else
+ {
+ Constructor<?> ctor = serviceClass.getConstructor(new Class[]
+ {URL.class, QName.class});
+ target = (Service) ctor.newInstance(new Object[]
+ {wsdlURL, serviceQName});
+ }
+ }
+ else
+ {
+ if (features != null)
+ {
+ Constructor<?> ctor = serviceClass.getConstructor(new Class[]
+ {WebServiceFeature[].class});
+ target = (Service) ctor.newInstance(new Object[]
+ {features});
+ }
+ else
+ {
+ target = (Service) serviceClass.newInstance();
+ }
+ }
+ }
+
+ return target;
}
+ private URL getWsdlURL(final UnifiedServiceRefMetaData serviceRefMD, final
Class<?> serviceClass)
+ {
+ if (serviceRefMD.getWsdlLocation() == null)
+ {
+ final WebServiceClient webServiceClientAnnotation =
serviceClass.getAnnotation(WebServiceClient.class);
+ if (webServiceClientAnnotation != null)
+ {
+ // use the @WebServiceClien(wsdlLocation=...) if the service ref wsdl
location returned at this time would be null
+ if (webServiceClientAnnotation.wsdlLocation().length() > 0)
+ {
+ serviceRefMD.setWsdlOverride(webServiceClientAnnotation.wsdlLocation());
+ }
+ }
+ }
+
+ return serviceRefMD.getWsdlLocation();
+ }
+
+ private QName getServiceQName(final UnifiedServiceRefMetaData serviceRefMD, final
Class<?> serviceClass)
+ {
+ QName retVal = serviceRefMD.getServiceQName();
+
+ if (retVal == null)
+ {
+ final WebServiceClient webServiceClientAnnotation =
serviceClass.getAnnotation(WebServiceClient.class);
+ if (webServiceClientAnnotation != null)
+ {
+ retVal = new QName(webServiceClientAnnotation.targetNamespace(),
webServiceClientAnnotation.name());
+ }
+ }
+
+ return retVal;
+ }
+
+ private WebServiceFeature[] getFeatures(final String targetClassName, final String
serviceClassName,
+ final UnifiedServiceRefMetaData serviceRefMD)
+ {
+ if (targetClassName != null && !targetClassName.equals(serviceClassName))
+ {
+ final Collection<UnifiedPortComponentRefMetaData> portComponentRefs =
serviceRefMD.getPortComponentRefs();
+ for (final UnifiedPortComponentRefMetaData portComponentRefMD :
portComponentRefs)
+ {
+ if
(targetClassName.equals(portComponentRefMD.getServiceEndpointInterface()))
+ {
+ return getFeatures(portComponentRefMD);
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private QName getPortQName(final String targetClassName, final String
serviceClassName,
+ final UnifiedServiceRefMetaData serviceRefMD)
+ {
+ if (targetClassName != null && !targetClassName.equals(serviceClassName))
+ {
+ final Collection<UnifiedPortComponentRefMetaData> portComponentRefs =
serviceRefMD.getPortComponentRefs();
+ for (final UnifiedPortComponentRefMetaData portComponentRefMD :
portComponentRefs)
+ {
+ if
(targetClassName.equals(portComponentRefMD.getServiceEndpointInterface()))
+ {
+ return portComponentRefMD.getPortQName();
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private Method getMethodFor(final String methodName, final QName portQName, final
WebServiceFeature[] features, final Class<?> serviceClass)
+ throws NoSuchMethodException
+ {
+ if ((portQName == null) && (features == null))
+ return serviceClass.getMethod(methodName, new Class[]
+ {Class.class});
+ if ((portQName != null) && (features == null))
+ return serviceClass.getMethod(methodName, new Class[]
+ {QName.class, Class.class});
+ if ((portQName == null) && (features != null))
+ return serviceClass.getMethod(methodName, new Class[]
+ {Class.class, WebServiceFeature[].class});
+ if ((portQName != null) && (features != null))
+ return serviceClass.getMethod(methodName, new Class[]
+ {QName.class, Class.class, WebServiceFeature[].class});
+
+ throw new IllegalStateException();
+ }
+
+ private Method getMethodFor(final String methodName, final WebServiceFeature[]
features, final Class<?> serviceClass)
+ throws NoSuchMethodException
+ {
+ if (features == null)
+ {
+ return serviceClass.getMethod(methodName, new Class[] {});
+ }
+ else
+ {
+ return serviceClass.getMethod(methodName, new Class[] {
WebServiceFeature[].class } );
+ }
+ }
+
+ private Object[] getArgumentsFor(final QName portQName, final WebServiceFeature[]
features,
+ final Class<?> targetClass) throws NoSuchMethodException
+ {
+ if ((portQName == null) && (features == null))
+ return new Object[]
+ {targetClass};
+ if ((portQName != null) && (features == null))
+ return new Object[]
+ {portQName, targetClass};
+ if ((portQName == null) && (features != null))
+ return new Object[]
+ {targetClass, features};
+ if ((portQName != null) && (features != null))
+ return new Object[]
+ {portQName, targetClass, features};
+
+ throw new IllegalStateException();
+ }
+
+ private Object[] getArgumentsFor(final WebServiceFeature[] features) throws
NoSuchMethodException
+ {
+ if (features == null)
+ {
+ return new Object[] {};
+ }
+ else
+ {
+ return new Object[] {features};
+ }
+ }
+
+ private List<WebServiceFeature> getFeatures(final UnifiedServiceRefMetaData
serviceRef)
+ {
+ List<WebServiceFeature> features = new
LinkedList<WebServiceFeature>();
+
+ // configure @Addressing feature
+ if (serviceRef.isAddressingAnnotationSpecified())
+ {
+ final boolean enabled = serviceRef.isAddressingEnabled();
+ final boolean required = serviceRef.isAddressingRequired();
+ final String refResponses = serviceRef.getAddressingResponses();
+ AddressingFeature.Responses responses = AddressingFeature.Responses.ALL;
+ if ("ANONYMOUS".equals(refResponses))
+ responses = AddressingFeature.Responses.ANONYMOUS;
+ if ("NON_ANONYMOUS".equals(refResponses))
+ responses = AddressingFeature.Responses.NON_ANONYMOUS;
+
+ features.add(new AddressingFeature(enabled, required, responses));
+ }
+
+ // configure @MTOM feature
+ if (serviceRef.isMtomAnnotationSpecified())
+ {
+ final boolean enabled = serviceRef.isMtomEnabled();
+ final int threshold = serviceRef.getMtomThreshold();
+ features.add(new MTOMFeature(enabled, threshold));
+ }
+
+ // configure @RespectBinding feature
+ if (serviceRef.isRespectBindingAnnotationSpecified())
+ {
+ final boolean enabled = serviceRef.isRespectBindingEnabled();
+ features.add(new RespectBindingFeature(enabled));
+ }
+
+ return features;
+ }
+
+ private WebServiceFeature[] getFeatures(final UnifiedPortComponentRefMetaData
portComponentRefMD)
+ {
+ List<WebServiceFeature> features = new
LinkedList<WebServiceFeature>();
+ // configure @Addressing feature
+ if (portComponentRefMD.isAddressingAnnotationSpecified())
+ {
+ final boolean enabled = portComponentRefMD.isAddressingEnabled();
+ final boolean required = portComponentRefMD.isAddressingRequired();
+ final String refResponses = portComponentRefMD.getAddressingResponses();
+ AddressingFeature.Responses responses = AddressingFeature.Responses.ALL;
+ if ("ANONYMOUS".equals(refResponses))
+ responses = AddressingFeature.Responses.ANONYMOUS;
+ if ("NON_ANONYMOUS".equals(refResponses))
+ responses = AddressingFeature.Responses.NON_ANONYMOUS;
+
+ features.add(new AddressingFeature(enabled, required, responses));
+ }
+
+ // configure @MTOM feature
+ if (portComponentRefMD.isMtomEnabled())
+ {
+ features.add(new MTOMFeature(true, portComponentRefMD.getMtomThreshold()));
+ }
+
+ // configure @RespectBinding feature
+ if (portComponentRefMD.isRespectBindingAnnotationSpecified())
+ {
+ final boolean enabled = portComponentRefMD.isRespectBindingEnabled();
+ features.add(new RespectBindingFeature(enabled));
+ }
+
+ return features.size() == 0 ? null : features.toArray(new WebServiceFeature[]
+ {});
+ }
+
private Bus createNewBus(final UnifiedServiceRefMetaData serviceRefMD)
{
final Bus bus;
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefStubPropertyConfigurer.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefStubPropertyConfigurer.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceRefStubPropertyConfigurer.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -47,8 +47,8 @@
*/
final class CXFServiceRefStubPropertyConfigurer implements Configurer
{
- private UnifiedServiceRefMetaData serviceRefMD;
- private Configurer delegate;
+ private final UnifiedServiceRefMetaData serviceRefMD;
+ private final Configurer delegate;
public CXFServiceRefStubPropertyConfigurer(UnifiedServiceRefMetaData serviceRefMD,
Configurer delegate)
{
Modified: stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/pom.xml 2014-08-26 01:47:00 UTC (rev
18869)
+++ stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/pom.xml 2014-08-27 17:00:38 UTC (rev
18870)
@@ -64,7 +64,7 @@
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-resources</artifactId>
<version>${project.version}</version>
- <classifier>wildfly801</classifier>
+ <classifier>wildfly810</classifier>
</dependency>
<dependency>
@@ -204,8 +204,8 @@
<xslt
style="${basedir}/src/main/distro/test-exclude.xsl"
in="../testsuite/pom.xml"
out="${basedir}/target/exclude-file/test-excludes-wildfly800.txt">
<param name="targetName"
expression="wildfly800" />
</xslt>
- <xslt
style="${basedir}/src/main/distro/test-exclude.xsl"
in="../testsuite/pom.xml"
out="${basedir}/target/exclude-file/test-excludes-wildfly801.txt">
- <param name="targetName"
expression="wildfly801" />
+ <xslt
style="${basedir}/src/main/distro/test-exclude.xsl"
in="../testsuite/pom.xml"
out="${basedir}/target/exclude-file/test-excludes-wildfly810.txt">
+ <param name="targetName"
expression="wildfly810" />
</xslt>
</target>
</configuration>
Modified: stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/Install.txt
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/Install.txt 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/Install.txt 2014-08-27
17:00:38 UTC (rev 18870)
@@ -15,7 +15,7 @@
ant deploy-jboss720
ant deploy-wildfly800
- ant deploy-wildfly801
+ ant deploy-wildfly810
By default Spring Framework libraries are not installed to application
server. In order to do that, please add the -Dspring=true property option when
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/ant.properties.example
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/ant.properties.example 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/ant.properties.example 2014-08-27
17:00:38 UTC (rev 18870)
@@ -5,9 +5,9 @@
# Optional JBoss Home
jboss720.home=(a)jboss720.home@
wildfly800.home=(a)wildfly800.home@
-wildfly801.home=(a)wildfly801.home@
+wildfly810.home=(a)wildfly810.home@
-# The JBoss server under test. This can be [jboss720|wildfly800|wildfly801]
+# The JBoss server under test. This can be [jboss720|wildfly800|wildfly810]
jbossws.integration.target=jboss720
# The JBoss settings
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build-deploy.xml
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build-deploy.xml 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build-deploy.xml 2014-08-27
17:00:38 UTC (rev 18870)
@@ -152,32 +152,32 @@
</target>
<!-- ================================================================== -->
- <!-- Deployment wildfly801 -->
+ <!-- Deployment wildfly810 -->
<!-- ================================================================== -->
- <target name="target-wildfly801">
- <property name="jbossws.integration.target"
value="wildfly801"/>
+ <target name="target-wildfly810">
+ <property name="jbossws.integration.target"
value="wildfly810"/>
<echo message="jbossws.integration.target=${jbossws.integration.target}"
file="${target.properties.file}"/>
</target>
- <target name="deploy-wildfly801"
depends="undeploy-wildfly801,deploy-structure-wildfly80x,check-spring,install-spring-module80x"
description="Deploy jbossws to wildfly801">
- <fail message="Not available: ${wildfly801.available.file}"
unless="wildfly801.available"/>
- <copy todir="${wildfly801.home}" overwrite="true"
verbose="true">
+ <target name="deploy-wildfly810"
depends="undeploy-wildfly810,deploy-structure-wildfly80x,check-spring,install-spring-module80x"
description="Deploy jbossws to wildfly810">
+ <fail message="Not available: ${wildfly810.available.file}"
unless="wildfly810.available"/>
+ <copy todir="${wildfly810.home}" overwrite="true"
verbose="true">
<fileset dir="${deploy.structure}">
<exclude name="**/jboss/as/webservices/**/module.xml"/>
</fileset>
</copy>
<!-- Install org/jboss/as/webservices module.xml separately since it needs to
reference libs already on the AS -->
- <installModules
targetDir="${wildfly801.home}/modules/system/layers/base/">
+ <installModules
targetDir="${wildfly810.home}/modules/system/layers/base/">
<fileset dir="${deploy.structure}/modules/system/layers/base">
<include name="**/jboss/as/webservices/**/module.xml"/>
</fileset>
</installModules>
</target>
- <target name="undeploy-wildfly801"
depends="target-wildfly801,init" description="Remove jbossws from
wildfly801">
- <fail message="Not available: ${wildfly801.available.file}"
unless="wildfly801.available"/>
- <macro-undeploy-jbossws-modules
targetdir="${wildfly801.home}/modules/system/layers/base"
defaultmodulesconf="${jbossws.default.modules.conf}"
modifyjbossintegration="false"/>
+ <target name="undeploy-wildfly810"
depends="target-wildfly810,init" description="Remove jbossws from
wildfly810">
+ <fail message="Not available: ${wildfly810.available.file}"
unless="wildfly810.available"/>
+ <macro-undeploy-jbossws-modules
targetdir="${wildfly810.home}/modules/system/layers/base"
defaultmodulesconf="${jbossws.default.modules.conf}"
modifyjbossintegration="false"/>
</target>
<!-- ================================================================== -->
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build-setup.xml
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build-setup.xml 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build-setup.xml 2014-08-27
17:00:38 UTC (rev 18870)
@@ -35,11 +35,11 @@
<property name="jboss720.available.file"
value="${jboss720.home}/jboss-modules.jar"/>
<property name="wildfly800.available.file"
value="${wildfly800.home}/jboss-modules.jar"/>
- <property name="wildfly801.available.file"
value="${wildfly801.home}/jboss-modules.jar"/>
+ <property name="wildfly810.available.file"
value="${wildfly810.home}/jboss-modules.jar"/>
<available property="jboss720.available"
file="${jboss720.available.file}"/>
<available property="wildfly800.available"
file="${wildfly800.available.file}"/>
- <available property="wildfly801.available"
file="${wildfly801.available.file}"/>
+ <available property="wildfly810.available"
file="${wildfly810.available.file}"/>
<tstamp>
<format property="build.id" pattern="yyyyMMddHHmm"/>
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build-testsuite.xml
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build-testsuite.xml 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build-testsuite.xml 2014-08-27
17:00:38 UTC (rev 18870)
@@ -37,8 +37,8 @@
<condition property="jboss.home"
value="${wildfly800.home}">
<equals arg1="${jbossws.integration.target}"
arg2="wildfly800"/>
</condition>
- <condition property="jboss.home"
value="${wildfly801.home}">
- <equals arg1="${jbossws.integration.target}"
arg2="wildfly801"/>
+ <condition property="jboss.home"
value="${wildfly810.home}">
+ <equals arg1="${jbossws.integration.target}"
arg2="wildfly810"/>
</condition>
<!-- Verify required properties that must be set before this file is imported
-->
Modified: stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build.xml 2014-08-26
01:47:00 UTC (rev 18869)
+++ stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/distro/build.xml 2014-08-27
17:00:38 UTC (rev 18870)
@@ -66,7 +66,7 @@
<condition property="jbossws.integration.wildfly80x"
value="true">
<or>
<equals arg1="${jbossws.integration.target}"
arg2="wildfly800"/>
- <equals arg1="${jbossws.integration.target}"
arg2="wildfly801"/>
+ <equals arg1="${jbossws.integration.target}"
arg2="wildfly810"/>
</or>
</condition>
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2014-08-27
17:00:38 UTC (rev 18870)
@@ -112,7 +112,7 @@
<includes>
<include>org.wildfly:wildfly-webservices-tests-integration:jar</include>
</includes>
-
<outputFileNameMapping>jbossws-wildfly801-tests-integration.jar</outputFileNameMapping>
+
<outputFileNameMapping>jbossws-wildfly810-tests-integration.jar</outputFileNameMapping>
<scope>provided</scope>
<useProjectArtifact>false</useProjectArtifact>
</dependencySet>
Modified: stack/cxf/branches/jbossws-cxf-4.3.x/modules/resources/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.3.x/modules/resources/pom.xml 2014-08-26 01:47:00 UTC
(rev 18869)
+++ stack/cxf/branches/jbossws-cxf-4.3.x/modules/resources/pom.xml 2014-08-27 17:00:38 UTC
(rev 18870)
@@ -69,12 +69,12 @@
</configuration>
</execution>
<execution>
- <id>wildfly801</id>
+ <id>wildfly810</id>
<goals><goal>jar</goal></goals>
<phase>package</phase>
<configuration>
- <classifier>wildfly801</classifier>
-
<classesDirectory>${project.build.directory}/classes/resources/jbossws-wildfly801/jbossws.beans</classesDirectory>
+ <classifier>wildfly810</classifier>
+
<classesDirectory>${project.build.directory}/classes/resources/jbossws-wildfly810/jbossws.beans</classesDirectory>
</configuration>
</execution>
</executions>
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -23,7 +23,9 @@
import static org.jboss.wsf.stack.cxf.Loggers.ADDRESS_REWRITE_LOGGER;
+import java.net.MalformedURLException;
import java.net.URI;
+import java.net.URISyntaxException;
import java.net.URL;
import org.jboss.wsf.spi.management.ServerConfig;
@@ -102,7 +104,7 @@
{
new URL(s);
}
- catch (Exception e)
+ catch (MalformedURLException e)
{
return true;
}
@@ -146,7 +148,7 @@
ADDRESS_REWRITE_LOGGER.addressRewritten(origAddress, urlStr);
return urlStr;
}
- catch (Exception e)
+ catch (MalformedURLException e)
{
ADDRESS_REWRITE_LOGGER.invalidAddressProvidedUseItWithoutRewriting(newAddress,
origAddress);
return origAddress;
@@ -161,7 +163,7 @@
String scheme = addrURI.getScheme();
return scheme != null ? scheme : HTTP;
}
- catch (Exception e)
+ catch (URISyntaxException e)
{
return HTTP;
}
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/HandlerAuthInterceptor.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/HandlerAuthInterceptor.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/server/src/main/java/org/jboss/wsf/stack/cxf/interceptor/HandlerAuthInterceptor.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2012, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, 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.
*
@@ -58,6 +58,8 @@
*/
public class HandlerAuthInterceptor extends AbstractPhaseInterceptor<Message>
{
+ private static final String KEY = HandlerAuthInterceptor.class.getName() +
".SECURITY_EXCEPTION";
+
public HandlerAuthInterceptor()
{
super(Phase.PRE_PROTOCOL_FRONTEND);
@@ -111,7 +113,25 @@
checkAuthorization(context);
return super.invokeProtocolHandlers(requestor, context);
}
+
+ @Override
+ public boolean invokeLogicalHandlersHandleFault(boolean requestor,
LogicalMessageContext context)
+ {
+ if (context.containsKey(KEY)) {
+ return true;
+ }
+ return super.invokeLogicalHandlersHandleFault(requestor, context);
+ }
+ @Override
+ public boolean invokeProtocolHandlersHandleFault(boolean requestor, MessageContext
context)
+ {
+ if (context.containsKey(KEY)) {
+ return true;
+ }
+ return super.invokeProtocolHandlersHandleFault(requestor, context);
+ }
+
protected void checkAuthorization(MessageContext ctx)
{
if ((Boolean) ctx.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY))
@@ -149,6 +169,7 @@
}
}
final Principal p = secCtx.getUserPrincipal();
+ ctx.put(KEY, true);
throw MESSAGES.authorizationFailed(p != null ? p.getName() : null);
}
}
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/server/src/main/scripts/antrun-beans-config.xml
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/server/src/main/scripts/antrun-beans-config.xml 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/server/src/main/scripts/antrun-beans-config.xml 2014-08-27
17:00:38 UTC (rev 18870)
@@ -45,7 +45,7 @@
<copy
file="${src.dir}/jbossws-cxf-config-as8.xml"
-
tofile="${dest.dir}/jbossws-wildfly801/jbossws.beans/META-INF/stack-specific-deployment-aspects.xml"
+
tofile="${dest.dir}/jbossws-wildfly810/jbossws.beans/META-INF/stack-specific-deployment-aspects.xml"
/>
</target>
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/PolicyAttachmentTestCase.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/PolicyAttachmentTestCase.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3648/PolicyAttachmentTestCase.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -34,6 +34,7 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.interceptor.LoggingInInterceptor;
+import org.apache.cxf.message.Message;
import org.apache.cxf.ws.security.SecurityConstants;
import org.jboss.wsf.stack.cxf.client.UseThreadBusFeature;
import org.jboss.wsf.test.CryptoHelper;
@@ -114,5 +115,6 @@
proxy.getRequestContext().put(SecurityConstants.ENCRYPT_PROPERTIES,
Thread.currentThread().getContextClassLoader().getResource("META-INF/alice.properties"));
proxy.getRequestContext().put(SecurityConstants.SIGNATURE_USERNAME,
"alice");
proxy.getRequestContext().put(SecurityConstants.ENCRYPT_USERNAME,
"bob");
+ proxy.getRequestContext().put(Message.RECEIVE_TIMEOUT, 120000);
}
}
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/BasicEjb.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/BasicEjb.java 2014-07-25
21:10:45 UTC (rev 18816)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/BasicEjb.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -1,6 +1,26 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.cxf.jbws3809;
-import javax.jws.WebParam;
import javax.jws.WebService;
/**
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbPortComponentUri.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbPortComponentUri.java 2014-07-25
21:10:45 UTC (rev 18816)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbPortComponentUri.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.cxf.jbws3809;
import javax.jws.WebMethod;
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebContext.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebContext.java 2014-07-25
21:10:45 UTC (rev 18816)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebContext.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.cxf.jbws3809;
import org.jboss.ws.api.annotation.WebContext;
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceDupServicename.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceDupServicename.java 2014-07-25
21:10:45 UTC (rev 18816)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceDupServicename.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.cxf.jbws3809;
import javax.jws.WebMethod;
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceNoServicename.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceNoServicename.java 2014-07-25
21:10:45 UTC (rev 18816)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceNoServicename.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.cxf.jbws3809;
import javax.jws.WebMethod;
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceProvider.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceProvider.java 2014-07-25
21:10:45 UTC (rev 18816)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceProvider.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.cxf.jbws3809;
import javax.jws.WebMethod;
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceServicename.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceServicename.java 2014-07-25
21:10:45 UTC (rev 18816)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/EjbWebServiceServicename.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.cxf.jbws3809;
import javax.jws.WebMethod;
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/JBWS3809TestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/JBWS3809TestCase.java 2014-07-25
21:10:45 UTC (rev 18816)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/JBWS3809TestCase.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.cxf.jbws3809;
import junit.framework.Test;
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/dups/EjbWebServiceNoServicename.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/dups/EjbWebServiceNoServicename.java 2014-07-25
21:10:45 UTC (rev 18816)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3809/dups/EjbWebServiceNoServicename.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -1,3 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.cxf.jbws3809.dups;
import org.jboss.test.ws.jaxws.cxf.jbws3809.BasicEjb;
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/CryptoHelper.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/CryptoHelper.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/CryptoHelper.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -23,8 +23,6 @@
import java.security.NoSuchAlgorithmException;
-import org.apache.cxf.binding.soap.SoapFault;
-
public final class CryptoHelper
{
public static Exception checkAndWrapException(Exception e) throws Exception {
@@ -34,7 +32,7 @@
} else if(!isUnlimitedStrengthCryptographyAvailable()) {
return new Exception("JCE unlimited strength cryptography extension does
not seem to be properly installed; either install it " +
"or run the testuite with
'-Dexclude-integration-tests-unlimited-strength-related=true' to exclude this
test.", e);
- } else if (e.getCause() != null && e.getCause() instanceof SoapFault
&& e.getMessage() != null &&
e.getMessage().contains("algorithm")) {
+ } else if (e.getCause() != null &&
e.getCause().getClass().getName().contains("SoapFault") &&
e.getMessage() != null && e.getMessage().contains("algorithm")) {
return new Exception("Please check for Bouncy Castle JCE provider and JCE
unlimited strenght cryptography extension availability on server side.", e);
} else {
return e;
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService.wsdl
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService.wsdl 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsse/policy/oasis/WEB-INF/wsdl/SecurityService.wsdl 2014-08-27
17:00:38 UTC (rev 18870)
@@ -101,7 +101,7 @@
<soap:address
location="http://@jboss.bind.address@:8080/jaxws-samples-wsse-policy-oasis/SecurityService224"/>
</wsdl:port>
</wsdl:service>
- <!-- 2.2.1 (WSS 1.0) UsernameToken with Mutual X.509v3 Authentication, Sign, Encrypt
-->
+ <!-- 2.2.1 (WSS1.0) X.509 Certificates, Sign, Encrypt -->
<wsp:Policy wsu:Id="SecurityService221_policy">
<wsp:ExactlyOne>
<wsp:All>
Modified: stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/pom.xml 2014-08-26 01:47:00 UTC
(rev 18869)
+++ stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/pom.xml 2014-08-27 17:00:38 UTC
(rev 18870)
@@ -808,14 +808,14 @@
</profile>
<!--
- Name: wildfly801
- Descr: WildFly-8.0.1 specific options
+ Name: wildfly810
+ Descr: WildFly-8.1.0 specific options
-->
<profile>
- <id>wildfly801</id>
+ <id>wildfly810</id>
<properties>
- <jboss.version>${wildfly801.version}</jboss.version>
- <jbossws.integration.target>wildfly801</jbossws.integration.target>
+ <jboss.version>${wildfly810.version}</jboss.version>
+ <jbossws.integration.target>wildfly810</jbossws.integration.target>
<remote.port>8080</remote.port>
<remote.protocol>http-remoting</remote.protocol>
</properties>
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/ant-import/build-samples-jaxws.xml
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/ant-import/build-samples-jaxws.xml 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/ant-import/build-samples-jaxws.xml 2014-08-27
17:00:38 UTC (rev 18870)
@@ -497,6 +497,7 @@
<classes dir="${tests.output.dir}/test-classes">
<include
name="org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/webserviceref/EndpointService.class"/>
+ <include
name="org/jboss/test/ws/jaxws/samples/webserviceref/MultipleEndpointService.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/webserviceref/Endpoint.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/webserviceref/EchoResponse.class"/>
<include
name="org/jboss/test/ws/jaxws/samples/webserviceref/Echo.class"/>
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -74,31 +74,43 @@
SecureEndpoint port = service.getPort(new QName("http://ws/",
"SecureEndpoint3Port"), SecureEndpoint.class);
setUser((BindingProvider)port, "John", "foo");
int count = port.getHandlerCounter();
+ int countOut = port.getHandlerCounterOutbound();
int newCount;
+ int newCountOut;
assertEquals("Hello, Mr. John", port.sayHello("John"));
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(++count, newCount);
+ assertEquals(++countOut, newCountOut);
assertEquals("Bye, Mr. John", port.sayBye("John"));
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(++count, newCount);
+ assertEquals(++countOut, newCountOut);
try {
port.deniedMethod();
fail("Exception expected!");
} catch (Exception e) {
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(++count, newCount); //verify count is increased
+ assertEquals(++countOut, newCountOut); //verify countOut is increased
}
port.ping();
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(++count, newCount);
+ assertEquals(countOut, newCountOut); //verify countOut is not increased (oneway)
assertEquals("foo", port.echo("foo"));
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(++count, newCount);
+ assertEquals(++countOut, newCountOut);
//Change user...
@@ -106,14 +118,18 @@
assertEquals("Hello, Mr. Bob", port.sayHello("Bob"));
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(++count, newCount);
+ assertEquals(++countOut, newCountOut);
try {
port.sayBye("Bob");
fail("Exception expected!");
} catch (Exception e) {
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(++count, newCount); //verify count is increased
+ assertEquals(++countOut, newCountOut); //verify countOut is increased
}
try {
@@ -121,27 +137,37 @@
fail("Exception expected!");
} catch (Exception e) {
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(++count, newCount); //verify count is increased
+ assertEquals(++countOut, newCountOut); //verify countOut is increased
}
assertEquals("foo2", port.echo("foo2"));
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(++count, newCount);
+ assertEquals(++countOut, newCountOut);
}
private void testAuth(final SecureEndpoint port) throws Exception
{
setUser((BindingProvider)port, "John", "foo");
int count = port.getHandlerCounter();
+ int countOut = port.getHandlerCounterOutbound();
int newCount;
+ int newCountOut;
assertEquals("Hello, Mr. John", port.sayHello("John"));
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(++count, newCount);
+ assertEquals(++countOut, newCountOut);
assertEquals("Bye, Mr. John", port.sayBye("John"));
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(++count, newCount);
+ assertEquals(++countOut, newCountOut);
try {
port.deniedMethod();
@@ -149,16 +175,22 @@
} catch (Exception e) {
assertTrue(e.getMessage().contains("JBWS024094"));
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(count, newCount); //verify count is *not* increased
+ assertEquals(countOut, newCountOut); //verify countOut is *not* increased
}
port.ping();
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(++count, newCount);
+ assertEquals(countOut, newCountOut); //verify countOut is *not* increased (oneway)
assertEquals("foo", port.echo("foo"));
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(++count, newCount);
+ assertEquals(++countOut, newCountOut);
//Change user...
@@ -166,7 +198,9 @@
assertEquals("Hello, Mr. Bob", port.sayHello("Bob"));
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(++count, newCount);
+ assertEquals(++countOut, newCountOut);
try {
port.sayBye("Bob");
@@ -174,7 +208,9 @@
} catch (Exception e) {
assertTrue(e.getMessage().contains("JBWS024094"));
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(count, newCount); //verify count is *not* increased
+ assertEquals(countOut, newCountOut); //verify countOut is *not* increased
}
try {
@@ -183,7 +219,9 @@
} catch (Exception e) {
assertTrue(e.getMessage().contains("JBWS024094"));
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(count, newCount); //verify count is *not* increased
+ assertEquals(countOut, newCountOut); //verify countOut is *not* increased
}
try {
@@ -191,12 +229,16 @@
} catch (Exception e) {
assertTrue(e.getMessage().contains("JBWS024094"));
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(count, newCount); //verify count is *not* increased
+ assertEquals(countOut, newCountOut); //verify countOut is *not* increased
(it's oneway anyway)
}
assertEquals("foo2", port.echo("foo2"));
newCount = port.getHandlerCounter();
+ newCountOut = port.getHandlerCounterOutbound();
assertEquals(++count, newCount);
+ assertEquals(++countOut, newCountOut);
}
private static void setUser(BindingProvider bp, String username, String password) {
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/LogicalSimpleHandler.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/LogicalSimpleHandler.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/LogicalSimpleHandler.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -31,14 +31,17 @@
public class LogicalSimpleHandler implements LogicalHandler<LogicalMessageContext>
{
public static AtomicInteger counter = new AtomicInteger(0);
+ public static AtomicInteger outboundCounter = new AtomicInteger(0);
@Override
public boolean handleMessage(LogicalMessageContext context)
{
Boolean isOutbound = (Boolean)
context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
String operation = ((QName)
context.get(MessageContext.WSDL_OPERATION)).getLocalPart();
- if (!isOutbound && !operation.equals("getHandlerCounter")) {
+ if (!isOutbound && !operation.startsWith("getHandlerCounter")) {
counter.incrementAndGet();
+ } else if (isOutbound &&
!operation.startsWith("getHandlerCounter")) {
+ outboundCounter.incrementAndGet();
}
return true;
}
@@ -46,6 +49,10 @@
@Override
public boolean handleFault(LogicalMessageContext context)
{
+ String operation = ((QName)
context.get(MessageContext.WSDL_OPERATION)).getLocalPart();
+ if (!operation.startsWith("getHandlerCounter")) {
+ outboundCounter.incrementAndGet();
+ }
return true;
}
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpoint.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpoint.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpoint.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -33,6 +33,8 @@
int getHandlerCounter();
+ int getHandlerCounterOutbound();
+
@Oneway
void ping();
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -77,8 +77,11 @@
public int getHandlerCounter() {
return SimpleHandler.counter.get();
}
+
+ public int getHandlerCounterOutbound() {
+ return SimpleHandler.outboundCounter.get();
+ }
-
@Oneway
@RolesAllowed("friend")
public void ping() {
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl2.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl2.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl2.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -78,6 +78,9 @@
return LogicalSimpleHandler.counter.get();
}
+ public int getHandlerCounterOutbound() {
+ return LogicalSimpleHandler.outboundCounter.get();
+ }
@Oneway
@RolesAllowed("friend")
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -78,6 +78,9 @@
return SimpleHandler.counter.get();
}
+ public int getHandlerCounterOutbound() {
+ return SimpleHandler.outboundCounter.get();
+ }
@Oneway
@RolesAllowed("friend")
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -32,14 +32,17 @@
public class SimpleHandler implements SOAPHandler<SOAPMessageContext>
{
public static AtomicInteger counter = new AtomicInteger(0);
+ public static AtomicInteger outboundCounter = new AtomicInteger(0);
@Override
public boolean handleMessage(SOAPMessageContext context)
{
Boolean isOutbound = (Boolean)
context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
String operation = ((QName)
context.get(MessageContext.WSDL_OPERATION)).getLocalPart();
- if (!isOutbound && !operation.equals("getHandlerCounter")) {
+ if (!isOutbound && !operation.startsWith("getHandlerCounter")) {
counter.incrementAndGet();
+ } else if (isOutbound &&
!operation.startsWith("getHandlerCounter")) {
+ outboundCounter.incrementAndGet();
}
return true;
}
@@ -47,6 +50,10 @@
@Override
public boolean handleFault(SOAPMessageContext context)
{
+ String operation = ((QName)
context.get(MessageContext.WSDL_OPERATION)).getLocalPart();
+ if (!operation.startsWith("getHandlerCounter")) {
+ outboundCounter.incrementAndGet();
+ }
return true;
}
Copied:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet2.java
(from rev 18864,
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet2.java)
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet2.java
(rev 0)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet2.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.jbws2307;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.soap.MTOM;
+
+/**
+ * Client servlet with injected JAX-WS 2.0 service
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+public class ClientServlet2 extends HttpServlet
+{
+ private static final long serialVersionUID = 323764398209417743L;
+
+ @WebServiceRef(name="service/jbws2307service")
+ @MTOM
+ HelloService service;
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, IOException
+ {
+ Hello hello = service.getHelloPort();
+ hello.hello("Foo");
+ resp.getWriter().print(true);
+ }
+
+}
Copied:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet3.java
(from rev 18864,
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet3.java)
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet3.java
(rev 0)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet3.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.jbws2307;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.WebServiceRef;
+import javax.xml.ws.soap.MTOM;
+import javax.xml.ws.soap.SOAPBinding;
+
+import org.jboss.logging.Logger;
+
+/**
+ * Client servlet using the injected JAXWS 2.2 service
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+public class ClientServlet3 extends HttpServlet
+{
+
+ private static final long serialVersionUID = 323764398209417744L;
+
+ private final Logger log = Logger.getLogger(ClientServlet3.class);
+
+ @WebServiceRef(name="service/jbws2307service")
+ @MTOM
+ HelloServiceJAXWS22 service;
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws
ServletException, IOException
+ {
+ boolean result = false;
+ try
+ {
+ log.info("service = "+service);
+ Hello hello = service.getHelloPort();
+ SOAPBinding binding = (SOAPBinding)((BindingProvider)hello).getBinding();
+ if ("true".equals(req.getParameter("mtom")))
+ {
+ log.info("mtom enabled = " + binding.isMTOMEnabled());
+ if (!binding.isMTOMEnabled())
+ {
+ throw new Exception("Expected mtom enabled because of @MTOM
annotation");
+ }
+ }
+ result = hello.getMessageContextTest();
+ log.info("result = " + result);
+ }
+ catch (Exception e)
+ {
+ log.error("Error while invoking service!", e);
+ throw new ServletException(e);
+ }
+ resp.getWriter().print(result);
+ }
+
+}
Copied:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/DeploymentArchives.java
(from rev 18864,
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/DeploymentArchives.java)
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/DeploymentArchives.java
(rev 0)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/DeploymentArchives.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.jbws2307;
+
+import java.io.File;
+
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.wsf.test.JBossWSTestHelper;
+
+public final class DeploymentArchives
+{
+ public static final String SERVER = JBossWSTestHelper.writeToFile(new
JBossWSTestHelper.WarDeployment("jaxws-jbws2307-service.war") { {
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.jbws2307.Hello.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws2307.HelloImpl.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws2307.HelloService.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-service/jboss-web.xml"), "jboss-web.xml")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-service/web.xml"), "web.xml")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-service/wsdl/HelloService.wsdl"),
"wsdl/HelloService.wsdl")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-service/web.xml"));
+ }
+ });
+
+ public static final String CLIENT_2 = JBossWSTestHelper.writeToFile(new
JBossWSTestHelper.WarDeployment("jaxws-jbws2307-client-2.war") { {
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.jbws2307.ClientServlet2.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws2307.Hello.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws2307.HelloService.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-client/jboss-web.xml"), "jboss-web.xml")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-client/web2.xml"), "web.xml")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-client/wsdl/HelloService.wsdl"),
"wsdl/HelloService.wsdl")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-client/web2.xml"));
+ }
+ });
+
+ public static final String CLIENT_3 = JBossWSTestHelper.writeToFile(new
JBossWSTestHelper.WarDeployment("jaxws-jbws2307-client-3.war") { {
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.jbws2307.ClientServlet3.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws2307.Hello.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws2307.HelloServiceJAXWS22.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-client/jboss-web.xml"), "jboss-web.xml")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-client/web3.xml"), "web.xml")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-client/wsdl/HelloService.wsdl"),
"wsdl/HelloService.wsdl")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-client/web3.xml"));
+ }
+ });
+
+ public static final String CLIENT = JBossWSTestHelper.writeToFile(new
JBossWSTestHelper.WarDeployment("jaxws-jbws2307-client.war") { {
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.jbws2307.ClientServlet.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws2307.Hello.class)
+ .addClass(org.jboss.test.ws.jaxws.jbws2307.HelloService.class)
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-client/jboss-web.xml"), "jboss-web.xml")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-client/web.xml"), "web.xml")
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-client/wsdl/HelloService.wsdl"),
"wsdl/HelloService.wsdl")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() +
"/jaxws/jbws2307/WEB-INF-client/web.xml"));
+ }
+ });
+
+ private DeploymentArchives() {
+ //NOOP
+ }
+}
Copied:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/HelloServiceJAXWS22.java
(from rev 18864,
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/HelloServiceJAXWS22.java)
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/HelloServiceJAXWS22.java
(rev 0)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/HelloServiceJAXWS22.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.jbws2307;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
+
+@WebServiceClient(name = "HelloService", targetNamespace =
"http://helloservice.org/wsdl", wsdlLocation =
"WEB-INF/wsdl/HelloService.wsdl")
+public class HelloServiceJAXWS22 extends Service
+{
+ private static final URL HELLOSERVICE_WSDL_LOCATION;
+
+ public HelloServiceJAXWS22(URL wsdlLocation, QName serviceName)
+ {
+ super(wsdlLocation, serviceName);
+ }
+
+ public HelloServiceJAXWS22()
+ {
+ super(HELLOSERVICE_WSDL_LOCATION, new
QName("http://helloservice.org/wsdl", "HelloService"));
+ }
+
+ public HelloServiceJAXWS22(URL wsdlLocation, QName serviceName, WebServiceFeature...
features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
+ @WebEndpoint(name = "HelloPort")
+ public Hello getHelloPort()
+ {
+ return ((Hello)super.getPort(new
QName("http://helloservice.org/wsdl",
"HelloPort"), Hello.class));
+ }
+
+ static
+ {
+ URL url = null;
+ try
+ {
+ url = new
URL("http://files1/releng/cts_5.x/cts-5.0c-temp/bin/WEB-INF/wsdl/HelloService.wsdl");
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ HELLOSERVICE_WSDL_LOCATION = url;
+ }
+}
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/JBWS2307MTOMTestCase.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -21,6 +21,9 @@
*/
package org.jboss.test.ws.jaxws.jbws2307;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
import java.net.URL;
import junit.framework.Test;
@@ -38,11 +41,18 @@
{
public static Test suite()
{
- return new JBossWSTestSetup(JBWS2307MTOMTestCase.class,
"jaxws-jbws2307-client.war, jaxws-jbws2307-service.war", true);
+ return new JBossWSTestSetup(JBWS2307MTOMTestCase.class, DeploymentArchives.SERVER +
" " + DeploymentArchives.CLIENT, true);
}
public void testMTOM() throws Exception
{
assertEquals("true", IOUtils.readAndCloseStream(new
URL("http://" + getServerHost() +
":8080/jaxws-jbws2307-client/jbws2307?mtom=true").openStream()));
}
+
+ public void testClient() throws Exception
+ {
+ HttpURLConnection con = (HttpURLConnection)new URL("http://" +
getServerHost() + ":8080/jaxws-jbws2307-client/jbws2307").openConnection();
+ BufferedReader isr = new BufferedReader(new
InputStreamReader(con.getInputStream()));
+ assertEquals("true", isr.readLine());
+ }
}
Copied:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/WebServiceRefMTOMTestCase.java
(from rev 18864,
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/WebServiceRefMTOMTestCase.java)
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/WebServiceRefMTOMTestCase.java
(rev 0)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/WebServiceRefMTOMTestCase.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.jbws2307;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.jboss.ws.common.IOUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-3820] JAXWS 2.1 / 2.0 clients and WebServiceRef using JAXWS features cause
NoSuchMethodException
+ *
+ * @author alessio.soldano(a)jboss.com
+ */
+public class WebServiceRefMTOMTestCase extends JBossWSTest
+{
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(WebServiceRefMTOMTestCase.class,
DeploymentArchives.SERVER, true);
+ }
+
+ public void testUsingClientArchive3() throws Exception
+ {
+ try {
+ JBossWSTestHelper.deploy(DeploymentArchives.CLIENT_3);
+ assertEquals("true", IOUtils.readAndCloseStream(new
URL("http://" + getServerHost() +
":8080/jaxws-jbws2307-client-3/jbws2307?mtom=true").openStream()));
+ HttpURLConnection con = (HttpURLConnection)new URL("http://" +
getServerHost() + ":8080/jaxws-jbws2307-client-3/jbws2307").openConnection();
+ BufferedReader isr = new BufferedReader(new
InputStreamReader(con.getInputStream()));
+ assertEquals("true", isr.readLine());
+ } finally {
+ JBossWSTestHelper.undeploy(DeploymentArchives.CLIENT_3);
+ }
+ }
+
+ public void testUsingClientArchive2() throws Exception
+ {
+ try {
+ JBossWSTestHelper.deploy(DeploymentArchives.CLIENT_2);
+ URL url = new URL("http://" + getServerHost() +
":8080/jaxws-jbws2307-client-2/jbws2307?mtom=true");
+ final HttpURLConnection c = (HttpURLConnection)url.openConnection();
+ c.connect();
+ assertEquals(500, c.getResponseCode());
+ String error = IOUtils.readAndCloseStream(c.getErrorStream());
+ c.disconnect();
+ assertTrue(error.contains("Could not instantiate ClientServlet2"));
+ } finally {
+ JBossWSTestHelper.undeploy(DeploymentArchives.CLIENT_2);
+ }
+ }
+}
Copied:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/MultipleEndpointService.java
(from rev 18715,
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/MultipleEndpointService.java)
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/MultipleEndpointService.java
(rev 0)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/MultipleEndpointService.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -0,0 +1,114 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.samples.webserviceref;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+
+@WebServiceClient(name = "EndpointService", targetNamespace =
"http://org.jboss.ws/wsref", wsdlLocation =
"META-INF/wsdl/MultipleEndpoint.wsdl")
+public class MultipleEndpointService extends Service
+{
+
+ private final static URL ENDPOINTSERVICE_WSDL_LOCATION;
+ private final static WebServiceException ENDPOINTSERVICE_EXCEPTION;
+ private final static QName ENDPOINTSERVICE_QNAME = new
QName("http://org.jboss.ws/wsref", "EndpointService");
+
+ static
+ {
+ URL url = null;
+ WebServiceException e = null;
+ url = MultipleEndpointService.class.getResource("bogusAddress");
//invalid address on purpose, to test JBWS-3015 via service7 in EJB3Client
+ if (url == null)
+ {
+ e = new WebServiceException("Cannot find wsdl, please put in
classpath");
+ }
+ ENDPOINTSERVICE_WSDL_LOCATION = url;
+ ENDPOINTSERVICE_EXCEPTION = e;
+ }
+
+ public MultipleEndpointService()
+ {
+ super(__getWsdlLocation(), ENDPOINTSERVICE_QNAME);
+ }
+
+ public MultipleEndpointService(URL wsdlLocation)
+ {
+ super(wsdlLocation, ENDPOINTSERVICE_QNAME);
+ }
+
+ public MultipleEndpointService(URL wsdlLocation, QName serviceName)
+ {
+ super(wsdlLocation, serviceName);
+ }
+
+ /**
+ *
+ * @return
+ * returns Endpoint
+ */
+ @WebEndpoint(name = "EndpointPort")
+ public Endpoint getEndpointPort()
+ {
+ return super.getPort(new QName("http://org.jboss.ws/wsref",
"EndpointPort"), Endpoint.class);
+ }
+
+ @WebEndpoint(name = "EndpointPort2")
+ public Endpoint getEndpointPort2()
+ {
+ return super.getPort(new QName("http://org.jboss.ws/wsref",
"EndpointPort2"), Endpoint.class);
+ }
+
+ /**
+ *
+ * @param features
+ * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.
Supported features not in the <code>features</code> parameter will have their
default values.
+ * @return
+ * returns Endpoint
+ */
+ @WebEndpoint(name = "EndpointPort")
+ public Endpoint getEndpointPort(WebServiceFeature... features)
+ {
+ return super.getPort(new QName("http://org.jboss.ws/wsref",
"EndpointPort"), Endpoint.class, features);
+ }
+
+ @WebEndpoint(name = "EndpointPort2")
+ public Endpoint getEndpointPort2(WebServiceFeature... features)
+ {
+ return super.getPort(new QName("http://org.jboss.ws/wsref",
"EndpointPort2"), Endpoint.class, features);
+ }
+
+ private static URL __getWsdlLocation()
+ {
+ if (ENDPOINTSERVICE_EXCEPTION != null)
+ {
+ throw ENDPOINTSERVICE_EXCEPTION;
+ }
+ return ENDPOINTSERVICE_WSDL_LOCATION;
+ }
+
+}
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/ServletClient.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -32,6 +32,7 @@
import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceRef;
import javax.xml.ws.WebServiceRefs;
+import javax.xml.ws.soap.SOAPFaultException;
import org.jboss.logging.Logger;
@@ -85,6 +86,12 @@
// Test on field with value
@WebServiceRef(value = EndpointService.class)
public Endpoint port3;
+
+ @WebServiceRef(value = MultipleEndpointService.class)
+ public Endpoint port7;
+
+ @WebServiceRef(value = MultipleEndpointService.class)
+ public Endpoint port8;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException
@@ -111,6 +118,7 @@
ports.add((Endpoint)iniCtx.lookup("java:comp/env/Port2"));
ports.add(port3);
ports.add((Endpoint)iniCtx.lookup("java:comp/env/" +
getClass().getName() + "/port3"));
+ ports.add(port8);
}
catch (Exception ex)
{
@@ -124,6 +132,14 @@
if (inStr.equals(outStr) == false)
throw new WebServiceException("Invalid echo return: " + inStr);
}
+ try {
+ port7.echo("Foo");
+ throw new WebServiceException("Expected exception due to SOAP 1.2 message
sent to a SOAP 1.1 endpoint");
+ } catch (SOAPFaultException sfe) {
+ if (!sfe.getMessage().contains("SOAP 1.2")) {
+ throw new WebServiceException("Expected reference to SOAP version
mismatch in error message, but got: " + sfe.getMessage());
+ }
+ }
res.getWriter().print(inStr);
}
Copied:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws2307/WEB-INF-client/web2.xml
(from rev 18864,
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws2307/WEB-INF-client/web2.xml)
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws2307/WEB-INF-client/web2.xml
(rev 0)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws2307/WEB-INF-client/web2.xml 2014-08-27
17:00:38 UTC (rev 18870)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <display-name>jbws2307_testcase_client</display-name>
+ <servlet>
+ <servlet-name>ClientServlet2</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2307.ClientServlet2</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>ClientServlet2</servlet-name>
+ <url-pattern>/jbws2307</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+ <service-ref>
+ <service-ref-name>service/jbws2307service</service-ref-name>
+ <service-interface>javax.xml.ws.Service</service-interface>
+ <wsdl-file>WEB-INF/wsdl/HelloService.wsdl</wsdl-file>
+ <port-component-ref>
+
<service-endpoint-interface>org.jboss.test.ws.jaxws.jbws2307.Hello</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+</web-app>
\ No newline at end of file
Copied:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws2307/WEB-INF-client/web3.xml
(from rev 18864,
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws2307/WEB-INF-client/web3.xml)
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws2307/WEB-INF-client/web3.xml
(rev 0)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/jbws2307/WEB-INF-client/web3.xml 2014-08-27
17:00:38 UTC (rev 18870)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <display-name>jbws2307_testcase_client</display-name>
+ <servlet>
+ <servlet-name>ClientServlet3</servlet-name>
+
<servlet-class>org.jboss.test.ws.jaxws.jbws2307.ClientServlet3</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>ClientServlet3</servlet-name>
+ <url-pattern>/jbws2307</url-pattern>
+ </servlet-mapping>
+ <session-config>
+ <session-timeout>54</session-timeout>
+ </session-config>
+ <service-ref>
+ <service-ref-name>service/jbws2307service</service-ref-name>
+ <service-interface>javax.xml.ws.Service</service-interface>
+ <wsdl-file>WEB-INF/wsdl/HelloService.wsdl</wsdl-file>
+ <port-component-ref>
+
<service-endpoint-interface>org.jboss.test.ws.jaxws.jbws2307.Hello</service-endpoint-interface>
+ </port-component-ref>
+ </service-ref>
+</web-app>
\ No newline at end of file
Copied:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/samples/webserviceref/META-INF/wsdl/MultipleEndpoint.wsdl
(from rev 18715,
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/samples/webserviceref/META-INF/wsdl/MultipleEndpoint.wsdl)
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/samples/webserviceref/META-INF/wsdl/MultipleEndpoint.wsdl
(rev 0)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/samples/webserviceref/META-INF/wsdl/MultipleEndpoint.wsdl 2014-08-27
17:00:38 UTC (rev 18870)
@@ -0,0 +1,55 @@
+<!--
+ wsimport -d ../../../java -keep -p org.jboss.test.ws.jaxws.webserviceref
META-INF/wsdl/Endpoint.wsdl
+-->
+<definitions name='EndpointService'
targetNamespace='http://org.jboss.ws/wsref'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:soap12='http://schemas.xmlsoap.org/wsdl/soap12/'
xmlns:tns='http://org.jboss.ws/wsref'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+
+ <message name='Endpoint_echo'>
+ <part name='arg0' type='xsd:string'/>
+ </message>
+ <message name='Endpoint_echoResponse'>
+ <part name='return' type='xsd:string'/>
+ </message>
+
+ <portType name='Endpoint'>
+ <operation name='echo' parameterOrder='arg0'>
+ <input message='tns:Endpoint_echo'/>
+ <output message='tns:Endpoint_echoResponse'/>
+ </operation>
+ </portType>
+
+ <binding name='EndpointBinding' type='tns:Endpoint'>
+ <soap:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echo'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body namespace='http://org.jboss.ws/wsref'
use='literal'/>
+ </input>
+ <output>
+ <soap:body namespace='http://org.jboss.ws/wsref'
use='literal'/>
+ </output>
+ </operation>
+ </binding>
+
+ <binding name='EndpointBinding2' type='tns:Endpoint'>
+ <soap12:binding style='rpc'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='echo'>
+ <soap12:operation soapAction=''/>
+ <input>
+ <soap12:body namespace='http://org.jboss.ws/wsref'
use='literal'/>
+ </input>
+ <output>
+ <soap12:body namespace='http://org.jboss.ws/wsref'
use='literal'/>
+ </output>
+ </operation>
+ </binding>
+
+ <service name='EndpointService'>
+ <port binding='tns:EndpointBinding' name='EndpointPort'>
+ <soap:address
location='http://@jboss.bind.address@:8080/jaxws-samples-webserviceref'/>
+ </port>
+ <port binding='tns:EndpointBinding2' name='EndpointPort2'>
+ <soap:address
location='http://@jboss.bind.address@:8080/jaxws-samples-webserviceref'/>
+ </port>
+ </service>
+
+</definitions>
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/shared-tests/src/test/resources/jaxws/samples/webserviceref/WEB-INF-client/jboss-web.xml 2014-08-27
17:00:38 UTC (rev 18870)
@@ -84,5 +84,31 @@
<service-qname>{http://org.jboss.ws/wsref}EndpointService</service-qname>
<wsdl-override>WEB-INF/wsdl/Endpoint.wsdl</wsdl-override>
</service-ref>
+
+ <!--
+ @WebServiceRef(value = MultipleEndpointService.class)
+ -->
+ <service-ref>
+
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/port7</service-ref-name>
+
<service-qname>{http://org.jboss.ws/wsref}EndpointService</service-qname>
+ <wsdl-override>WEB-INF/wsdl/MultipleEndpoint.wsdl</wsdl-override>
+ <port-component-ref>
+
<service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.Endpoint</service-endpoint-interface>
+ <port-qname>{http://org.jboss.ws/wsref}EndpointPort2</port-qname>
+ </port-component-ref>
+ </service-ref>
+ <!--
+ @WebServiceRef(value = MultipleEndpointService.class)
+ -->
+ <service-ref>
+
<service-ref-name>org.jboss.test.ws.jaxws.samples.webserviceref.ServletClient/port8</service-ref-name>
+
<service-qname>{http://org.jboss.ws/wsref}EndpointService</service-qname>
+ <wsdl-override>WEB-INF/wsdl/MultipleEndpoint.wsdl</wsdl-override>
+ <port-component-ref>
+
<service-endpoint-interface>org.jboss.test.ws.jaxws.samples.webserviceref.Endpoint</service-endpoint-interface>
+ <port-qname>{http://org.jboss.ws/wsref}EndpointPort</port-qname>
+ </port-component-ref>
+ </service-ref>
+
</jboss-web>
\ No newline at end of file
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/CryptoCheckMain.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/CryptoCheckMain.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/CryptoCheckMain.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -1,5 +1,7 @@
package org.jboss.wsf.test;
+import java.security.Provider;
+
/**
*
* @author Rostislav Svoboda
@@ -11,7 +13,13 @@
{
System.out.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
System.out.println("JCE unlimited strength cryptography: " +
((javax.crypto.Cipher.getMaxAllowedKeyLength("RC5") < 256)?"NOT
":"") + "INSTALLED" );
- System.out.println("Bouncy Castle JCE Provider: " +
((java.security.Security.getProvider("BC") == null)?"NOT
":"") + "INSTALLED" );
+ Provider p = java.security.Security.getProvider("BC");
+ if (p != null) {
+ System.out.println("Bouncy Castle JCE Provider: INSTALLED
(ver: " + p.getVersion() + ", " +
+ p.getClass().getProtectionDomain().getCodeSource().getLocation() +
")" );
+ } else {
+ System.out.println("Bouncy Castle JCE Provider: NOT
INSTALLED" );
+ }
System.out.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
}
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
---
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2014-08-26
01:47:00 UTC (rev 18869)
+++
stack/cxf/branches/jbossws-cxf-4.3.x/modules/testsuite/test-utils/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2014-08-27
17:00:38 UTC (rev 18870)
@@ -429,6 +429,11 @@
return archive;
}
+ public String getName()
+ {
+ return archive.getName();
+ }
+
private File assertArchiveDirExists(String testArchiveDir)
{
File archiveDir = new File(testArchiveDir);
@@ -438,14 +443,25 @@
throw new IllegalArgumentException("Cannot create archive - system
property '"
+ JBossWSTestHelper.SYSPROP_TEST_ARCHIVE_DIRECTORY + "' not
set.");
if (!archiveDir.mkdirs())
- ;
- throw new IllegalArgumentException("Cannot create archive - can not
create test archive directory '"
+ throw new IllegalArgumentException("Cannot create archive - can not
create test archive directory '"
+ archiveDir.getAbsolutePath() + "' not set.");
}
return archiveDir;
}
}
+ public static String writeToFile(BaseDeployment<?>... deps) {
+ if (deps == null) {
+ return "";
+ }
+ StringBuilder sb = new StringBuilder();
+ for (BaseDeployment<?> dep : deps) {
+ sb.append(dep.writeToFile().getName());
+ sb.append(" ");
+ }
+ return sb.toString().trim();
+ }
+
public static abstract class WarDeployment extends BaseDeployment<WebArchive>
{
public WarDeployment(String name)
Modified: stack/cxf/branches/jbossws-cxf-4.3.x/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.3.x/pom.xml 2014-08-26 01:47:00 UTC (rev 18869)
+++ stack/cxf/branches/jbossws-cxf-4.3.x/pom.xml 2014-08-27 17:00:38 UTC (rev 18870)
@@ -69,7 +69,7 @@
<jbossws.native.version>4.2.0.Final</jbossws.native.version>
<jboss720.version>7.2.0.Final</jboss720.version>
<wildfly800.version>8.0.0.Final</wildfly800.version>
- <wildfly801.version>8.0.1.Final-SNAPSHOT</wildfly801.version>
+ <wildfly810.version>8.1.0.Final-SNAPSHOT</wildfly810.version>
<ejb.api.version>1.0.2.Final</ejb.api.version>
<cxf.version>2.7.11</cxf.version>
<cxf.asm.version>3.3.1</cxf.asm.version>
@@ -162,7 +162,7 @@
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-webservices-tests-integration</artifactId>
- <version>${wildfly801.version}</version>
+ <version>${wildfly810.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.ws.projects</groupId>
@@ -1407,14 +1407,14 @@
</profile>
<!--
- Name: wildfly801
- Descr: WildFly-8.0.1 specific options
+ Name: wildfly810
+ Descr: WildFly-8.1.0 specific options
-->
<profile>
- <id>wildfly801</id>
+ <id>wildfly810</id>
<properties>
- <jbossws.integration.target>wildfly801</jbossws.integration.target>
- <jboss.home>${wildfly801.home}</jboss.home>
+ <jbossws.integration.target>wildfly810</jbossws.integration.target>
+ <jboss.home>${wildfly810.home}</jboss.home>
</properties>
</profile>