JBossWS SVN: r18872 - stack/cxf/branches/jbossws-cxf-4.3.x.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-08-27 14:16:16 -0400 (Wed, 27 Aug 2014)
New Revision: 18872
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/pom.xml
Log:
[JBWS-3823] Upgrade to Apache CXF 2.7.12
Modified: stack/cxf/branches/jbossws-cxf-4.3.x/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.3.x/pom.xml 2014-08-27 17:17:53 UTC (rev 18871)
+++ stack/cxf/branches/jbossws-cxf-4.3.x/pom.xml 2014-08-27 18:16:16 UTC (rev 18872)
@@ -71,7 +71,7 @@
<wildfly800.version>8.0.0.Final</wildfly800.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.version>2.7.12</cxf.version>
<cxf.asm.version>3.3.1</cxf.asm.version>
<cxf.xjcplugins.version>2.6.1</cxf.xjcplugins.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
@@ -104,8 +104,8 @@
<jms.api.version>1.0.1.Final</jms.api.version>
<velocity.version>1.7</velocity.version>
<xerces.version>2.9.1</xerces.version>
- <xmlsec.version>1.5.6</xmlsec.version>
- <wss4j.version>1.6.15</wss4j.version>
+ <xmlsec.version>1.5.7</xmlsec.version>
+ <wss4j.version>1.6.16</wss4j.version>
<wstx.version>4.2.0</wstx.version>
<spring.version>3.0.7.RELEASE</spring.version>
<shrinkwrap.version>1.1.3</shrinkwrap.version>
10 years, 3 months
JBossWS SVN: r18871 - stack/cxf/branches/jbossws-cxf-4.3.x.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-08-27 13:17:53 -0400 (Wed, 27 Aug 2014)
New Revision: 18871
Modified:
stack/cxf/branches/jbossws-cxf-4.3.x/
Log:
Blocked revisions 18599-18602,18604-18606,18608,18613-18615,18620,18622-18624,18653-18655,18659-18660,18662,18664,18669-18670,18684,18688,18694,18696-18697,18699-18700,18702,18705,18711,18714,18716,18722-18725,18731,18733-18734,18738-18741,18743-18744,18747-18749,18753-18754,18760-18761,18763-18769,18771-18776,18780,18788-18795,18797,18799-18804,18809-18810,18815,18817-18821,18825-18831,18836,18838,18841,18844,18846,18849-18851,18853-18855,18858,18865,18867-18869 via svnmerge
.......
r18599 | asoldano | 2014-04-29 16:31:40 +0200 (Tue, 29 Apr 2014) | 2 lines
[JBWS-3686] Initial changes to upgrade to Apache CXF 3.0.0; build moved to 5.0.0-SNAPSHOT
.......
r18600 | asoldano | 2014-04-30 09:24:35 +0200 (Wed, 30 Apr 2014) | 2 lines
[JBWS-3686] Fixing compile issue with latest cxf 3 snapshots
.......
r18601 | asoldano | 2014-04-30 10:19:25 +0200 (Wed, 30 Apr 2014) | 2 lines
[JBWS-3686] Temporarly excluding 2 tests
.......
r18602 | asoldano | 2014-04-30 11:29:18 +0200 (Wed, 30 Apr 2014) | 2 lines
Fixing classname typo
.......
r18604 | asoldano | 2014-04-30 14:52:18 +0200 (Wed, 30 Apr 2014) | 2 lines
[JBWS-3686] RSA 1.5 key transport algorithm now needs to be explicitly allowed
.......
r18605 | asoldano | 2014-04-30 14:53:03 +0200 (Wed, 30 Apr 2014) | 2 lines
[JBWS-3686] Use X509 token version matching actual certificate version
.......
r18606 | asoldano | 2014-04-30 14:53:40 +0200 (Wed, 30 Apr 2014) | 2 lines
[JBWS-3686] Fixing compile issues in spring testsuite too
.......
r18608 | asoldano | 2014-05-05 10:05:10 +0200 (Mon, 05 May 2014) | 2 lines
[JBWS-3686] Move to released xmlsec
.......
r18613 | asoldano | 2014-05-05 17:42:47 +0200 (Mon, 05 May 2014) | 2 lines
[JBWS-3686] <soapjms:jndiURL> tag is now required in the wsdl for making CXF resolve the connection factory using JNDI; adding empty tag to local services declaration of jms endpoints
.......
r18614 | asoldano | 2014-05-06 13:49:15 +0200 (Tue, 06 May 2014) | 2 lines
[JBWS-3790] adding profile for excluding udp tests
.......
r18615 | asoldano | 2014-05-06 15:38:19 +0200 (Tue, 06 May 2014) | 2 lines
[JBWS-3686] Workaround for CXF-5726 (move oneway invocations to wsrm endpoints after req-res ones) + explicit close of client proxy in WS-RM testcases (unless the Bus is already being shutdown)
.......
r18620 | asoldano | 2014-05-06 17:04:16 +0200 (Tue, 06 May 2014) | 2 lines
[JBWS-3686] Move to released WSS4J 2.0.0
.......
r18622 | asoldano | 2014-05-06 18:05:09 +0200 (Tue, 06 May 2014) | 2 lines
[JBWS-3791] Moving jbossws-cxf-test-utils out of modules/testsuite
.......
r18623 | asoldano | 2014-05-07 10:03:27 +0200 (Wed, 07 May 2014) | 2 lines
[JBWS-3791] Fixing bin dist
.......
r18624 | asoldano | 2014-05-07 12:44:29 +0200 (Wed, 07 May 2014) | 2 lines
[JBWS-3686] Adding createClassloader permission now required due to CXF 3 ProxyClassloader
.......
r18653 | asoldano | 2014-05-14 19:21:17 +0200 (Wed, 14 May 2014) | 2 lines
[JBWS-3793] Use latest jbossws-spi
.......
r18654 | asoldano | 2014-05-14 19:22:45 +0200 (Wed, 14 May 2014) | 2 lines
[JBWS-3794] Updating target containers
.......
r18655 | asoldano | 2014-05-14 19:58:24 +0200 (Wed, 14 May 2014) | 2 lines
[WFLY-2864] Fixing testcase
.......
r18659 | asoldano | 2014-05-15 16:36:35 +0200 (Thu, 15 May 2014) | 2 lines
[JBWS-3794] Bugfix
.......
r18660 | asoldano | 2014-05-15 19:40:32 +0200 (Thu, 15 May 2014) | 2 lines
[JBWS-3780] Drop AS 7.2.0 container integration
.......
r18662 | asoldano | 2014-05-16 12:02:58 +0200 (Fri, 16 May 2014) | 2 lines
[JBWS-3779] Cleanup of jbws-native / jax-rpc stuff
.......
r18664 | asoldano | 2014-05-16 14:40:47 +0200 (Fri, 16 May 2014) | 2 lines
Use latest jbossws-api
.......
r18669 | asoldano | 2014-05-16 16:05:38 +0200 (Fri, 16 May 2014) | 2 lines
[JBWS-3795] Updating/fixing testsuite accordingly
.......
r18670 | asoldano | 2014-05-16 16:46:21 +0200 (Fri, 16 May 2014) | 2 lines
[JBWS-3795] Fix cxf-testsuite too
.......
r18684 | asoldano | 2014-05-20 12:24:27 +0200 (Tue, 20 May 2014) | 2 lines
[JBWS-3779] WIP
.......
r18688 | asoldano | 2014-05-22 09:19:21 +0200 (Thu, 22 May 2014) | 2 lines
[JBWS-3686] Moving to released CXF 3.0.0 version
.......
r18694 | jim.ma | 2014-05-26 11:20:26 +0200 (Mon, 26 May 2014) | 1 line
[JBWS-3630]:Add dependency to enable http async client conduit
.......
r18696 | asoldano | 2014-05-26 17:53:21 +0200 (Mon, 26 May 2014) | 2 lines
Misc minor changes (making some fields final, removing unused / deprecated code)
.......
r18697 | jim.ma | 2014-05-27 02:48:30 +0200 (Tue, 27 May 2014) | 1 line
[JBWS-3630]:Add more test cases
.......
r18699 | jim.ma | 2014-05-27 17:18:53 +0200 (Tue, 27 May 2014) | 1 line
[JBWS-3630]:exclude cxf-rt-transports-http-hc.jar from module.xml
.......
r18700 | jim.ma | 2014-05-28 03:41:29 +0200 (Wed, 28 May 2014) | 1 line
[JBWS-3630]:Add http asynclient.jar in the binary distribution
.......
r18702 | jim.ma | 2014-05-29 09:21:34 +0200 (Thu, 29 May 2014) | 1 line
[JBWS-3630]:Add httpcomponets module with slot 'asyncclient'
.......
r18705 | asoldano | 2014-05-30 16:05:25 +0200 (Fri, 30 May 2014) | 2 lines
[JBWS-3630] Adding missing module.xml files
.......
r18711 | jim.ma | 2014-06-03 12:16:17 +0200 (Tue, 03 Jun 2014) | 1 line
[JBWS-3789]:Enable WS-Security streaming (StAX) support for some tests
.......
r18714 | jim.ma | 2014-06-04 08:42:26 +0200 (Wed, 04 Jun 2014) | 1 line
[JBWS-3789]:Add commons-codec jar in binary
.......
r18716 | asoldano | 2014-06-05 10:01:18 +0200 (Thu, 05 Jun 2014) | 2 lines
Use WildFly 8.1.0.Final instead of CR2
.......
r18722 | asoldano | 2014-06-06 12:12:08 +0200 (Fri, 06 Jun 2014) | 2 lines
[JBWS-3799] Upgrade to jaxb 2.2.7
.......
r18723 | asoldano | 2014-06-06 15:26:58 +0200 (Fri, 06 Jun 2014) | 2 lines
[JBWS-3686] Remove files not needed
.......
r18724 | asoldano | 2014-06-09 11:40:41 +0200 (Mon, 09 Jun 2014) | 2 lines
[JBWS-3799] Fixing bin dist
.......
r18725 | asoldano | 2014-06-09 14:19:56 +0200 (Mon, 09 Jun 2014) | 2 lines
[JBWS-3686] Removing file not needed
.......
r18731 | asoldano | 2014-06-12 18:05:44 +0200 (Thu, 12 Jun 2014) | 2 lines
[JBWS-3793] More cleanup
.......
r18733 | asoldano | 2014-06-13 22:28:00 +0200 (Fri, 13 Jun 2014) | 2 lines
[JBWS-3686] Restoring WS-Trust ActAs and OnBehalfOf tests; the STS keystore needs trusted certs for the ActAs client too, otherwise WSS4J 2.0 does not trust the client in the STS server
.......
r18734 | asoldano | 2014-06-13 22:42:45 +0200 (Fri, 13 Jun 2014) | 2 lines
Ask to shutdown the bus *after* the client it has been created for has been run
.......
r18738 | asoldano | 2014-06-16 10:51:18 +0200 (Mon, 16 Jun 2014) | 2 lines
[JBWS-3799] Explicit jaxb-core dependency
.......
r18739 | asoldano | 2014-06-16 15:00:35 +0200 (Mon, 16 Jun 2014) | 2 lines
[JBWS-3799] Revert change to cxf version erroneously included in previous commit
.......
r18740 | rsearls | 2014-06-16 15:46:45 +0200 (Mon, 16 Jun 2014) | 1 line
remove obsolete todo stmt
.......
r18741 | rsearls | 2014-06-16 15:47:30 +0200 (Mon, 16 Jun 2014) | 1 line
remove obsolete file
.......
r18743 | jim.ma | 2014-06-18 08:07:36 +0200 (Wed, 18 Jun 2014) | 1 line
[JBWS-3733]:Check ServerConfig.isStatisticsEnabled() before gather data with EndpointMetrics
.......
r18744 | jim.ma | 2014-06-18 12:09:08 +0200 (Wed, 18 Jun 2014) | 1 line
[JBWS-3800]:Make endpoint config optional
.......
r18747 | jim.ma | 2014-06-19 01:47:01 +0200 (Thu, 19 Jun 2014) | 1 line
[JBWS-3799]:Remove transitive dependency
.......
r18748 | jim.ma | 2014-06-19 10:43:26 +0200 (Thu, 19 Jun 2014) | 1 line
[JBWS-3800]:Only check existence of endpoint config in standalone.xml when it is specified in annotaion or decriptor
.......
r18749 | asoldano | 2014-06-19 19:14:09 +0200 (Thu, 19 Jun 2014) | 2 lines
[JBWS-3711] Initial conversion to ShrinkWrap of some shared-testsuite tests (non-samples)
.......
r18753 | asoldano | 2014-06-20 15:36:01 +0200 (Fri, 20 Jun 2014) | 2 lines
[JBWS-3711] Conversion to ShrinkWrap of remaining non-samples shared tests (moved benchmark jars build to a specific profile)
.......
r18754 | asoldano | 2014-06-20 19:34:46 +0200 (Fri, 20 Jun 2014) | 2 lines
[JBWS-3711] ShrinkWrap conversion WIP, samples shared tests...
.......
r18760 | asoldano | 2014-06-23 14:34:05 +0200 (Mon, 23 Jun 2014) | 2 lines
[JBWS-3711] Fix regression introduces in former commit
.......
r18761 | jim.ma | 2014-06-24 02:54:06 +0200 (Tue, 24 Jun 2014) | 1 line
[JBWS-3804]:Remove ResourceResolverDeploymentAspect
.......
r18763 | asoldano | 2014-06-25 15:12:21 +0200 (Wed, 25 Jun 2014) | 2 lines
Fix indentation
.......
r18764 | asoldano | 2014-06-25 15:22:17 +0200 (Wed, 25 Jun 2014) | 3 lines
[JBWS-3806] Updating org/jboss/as/webservices/main/module.xml to be in synch with wildfly master and reference the webservices subsystem Maven artifact. Enabling filtering in assembly plugin for relying on 'wildfly900.version' property, we'll have to use a more generic one later
.......
r18765 | asoldano | 2014-06-25 19:07:43 +0200 (Wed, 25 Jun 2014) | 2 lines
[JBWS-3711] WIP
.......
r18766 | asoldano | 2014-06-26 10:15:44 +0200 (Thu, 26 Jun 2014) | 2 lines
[JBWS-3711] Fix regression
.......
r18767 | asoldano | 2014-06-26 14:48:29 +0200 (Thu, 26 Jun 2014) | 2 lines
[JBWS-3711][JBWS-3667] Fixing bug causing failure when test archive dir does not exist
.......
r18768 | asoldano | 2014-06-26 14:49:31 +0200 (Thu, 26 Jun 2014) | 2 lines
[JBWS-3711] Completed migration of shared testsuite to ShrinkWrap
.......
r18769 | asoldano | 2014-06-26 15:37:16 +0200 (Thu, 26 Jun 2014) | 2 lines
[JBWS-3807] Run wsconsume task in generate-test-sources phase
.......
r18771 | asoldano | 2014-06-26 16:18:36 +0200 (Thu, 26 Jun 2014) | 2 lines
[JBWS-3806] Keep on using full distribution, available in 'dist' folder of WFLY
.......
r18772 | asoldano | 2014-06-27 17:29:26 +0200 (Fri, 27 Jun 2014) | 2 lines
[JBWS-3711] Converting non-sample cxf tests (WIP)
.......
r18773 | asoldano | 2014-06-30 20:53:54 +0200 (Mon, 30 Jun 2014) | 2 lines
[JBWS-3711] WIP
.......
r18774 | asoldano | 2014-07-03 12:05:50 +0200 (Thu, 03 Jul 2014) | 2 lines
[JBWS-3711] Conversion to ShrinkWrap of remaining cxf non-sample tests...
.......
r18775 | asoldano | 2014-07-03 14:20:47 +0200 (Thu, 03 Jul 2014) | 2 lines
[JBWS-3711] WIP conversion of cxf sample tests
.......
r18776 | asoldano | 2014-07-03 17:43:16 +0200 (Thu, 03 Jul 2014) | 2 lines
[JBWS-3711] WIP
.......
r18780 | asoldano | 2014-07-04 15:40:08 +0200 (Fri, 04 Jul 2014) | 2 lines
[JBWS-3711] Completed conversion to ShrinkWrap of cxf-specific tests. Spring based tests only missing...
.......
r18788 | jim.ma | 2014-07-07 10:38:55 +0200 (Mon, 07 Jul 2014) | 1 line
Fix kerberos test package name
.......
r18789 | asoldano | 2014-07-07 11:31:44 +0200 (Mon, 07 Jul 2014) | 2 lines
[JBWS-3711] Fixing bin distro
.......
r18790 | asoldano | 2014-07-07 17:31:05 +0200 (Mon, 07 Jul 2014) | 2 lines
[WFLY-3440] Fix jboss-deployment-structure.xml files according to new WFLY behaviour when WS subsystem is disabled
.......
r18791 | asoldano | 2014-07-07 18:23:56 +0200 (Mon, 07 Jul 2014) | 2 lines
[JBWS-3799] Remove duplicated dependency, caused by commit 18747
.......
r18792 | jim.ma | 2014-07-08 09:28:10 +0200 (Tue, 08 Jul 2014) | 1 line
Set maven-help-plugin version to work with maven 3.2.2
.......
r18793 | asoldano | 2014-07-08 23:06:17 +0200 (Tue, 08 Jul 2014) | 2 lines
[JBWS-3711] Converted cxf-spring tests to ShrinkWrap
.......
r18794 | rsearls | 2014-07-10 21:26:21 +0200 (Thu, 10 Jul 2014) | 1 line
[JBWS-3810] added module ref to org.apache.xml-resolver
.......
r18795 | asoldano | 2014-07-11 13:03:48 +0200 (Fri, 11 Jul 2014) | 2 lines
[JBWS-3811] Move to Apache CXF 3.0.1-SNAPSHOT
.......
r18797 | asoldano | 2014-07-11 17:18:35 +0200 (Fri, 11 Jul 2014) | 2 lines
[JBWS-3811] Move to using required BouncyCastle 1.50 for tests
.......
r18799 | rsearls | 2014-07-11 21:51:42 +0200 (Fri, 11 Jul 2014) | 1 line
[JBWS-3788] test clientSide app catalog and clientSide jbossws-cxf-client.jar catalog
.......
r18800 | asoldano | 2014-07-14 14:30:24 +0200 (Mon, 14 Jul 2014) | 2 lines
[JBWS-3811] Move to BC 1.49
.......
r18801 | rsearls | 2014-07-15 16:04:56 +0200 (Tue, 15 Jul 2014) | 1 line
[JBWS-3788] added test for server side (cxf) catalog processing
.......
r18802 | rsearls | 2014-07-15 17:10:10 +0200 (Tue, 15 Jul 2014) | 1 line
moved to text mime type
.......
r18803 | asoldano | 2014-07-21 12:47:43 +0200 (Mon, 21 Jul 2014) | 2 lines
[JBWS-3811] Moving to CXF 3.0.1 release
.......
r18804 | asoldano | 2014-07-21 18:15:08 +0200 (Mon, 21 Jul 2014) | 2 lines
[JBWS-3628] Add property expansion capability to .wsdl files
.......
r18809 | asoldano | 2014-07-21 22:44:46 +0200 (Mon, 21 Jul 2014) | 2 lines
[JBWS-3815] Add mechanism for setting system properties while running JBossWS tests
.......
r18810 | asoldano | 2014-07-21 22:50:55 +0200 (Mon, 21 Jul 2014) | 2 lines
[JBWS-3628] Adding testcase
.......
r18815 | asoldano | 2014-07-25 15:45:21 +0200 (Fri, 25 Jul 2014) | 2 lines
Move to Apache CXF 3.0.2-SNAPSHOT and WSS4J 2.0.2-SNAPSHOT
.......
r18817 | asoldano | 2014-07-28 11:02:36 +0200 (Mon, 28 Jul 2014) | 2 lines
[JBWS-3816] Temporarly excluding test
.......
r18818 | asoldano | 2014-07-28 14:32:20 +0200 (Mon, 28 Jul 2014) | 2 lines
[JBWS-3789] Adding required dependencies
.......
r18819 | asoldano | 2014-07-28 16:20:29 +0200 (Mon, 28 Jul 2014) | 2 lines
[JBWS-3789] Streaming ws-security coverage for GCM algorithms tests
.......
r18820 | asoldano | 2014-07-29 08:43:00 +0200 (Tue, 29 Jul 2014) | 1 line
.......
r18821 | asoldano | 2014-07-29 09:16:22 +0200 (Tue, 29 Jul 2014) | 2 lines
[JBWS-3817] Avoid globally installing BouncyCastle
.......
r18825 | jim.ma | 2014-08-06 09:18:31 +0200 (Wed, 06 Aug 2014) | 1 line
[JBWS-3514]:Support cxf @FactoryType annotation
.......
r18826 | jim.ma | 2014-08-07 02:46:27 +0200 (Thu, 07 Aug 2014) | 1 line
Temporarily exclude JBWS3809TestCase.Enable it after backport fix to WFLY8.x integration layer
.......
r18827 | jim.ma | 2014-08-07 02:48:28 +0200 (Thu, 07 Aug 2014) | 1 line
Only temporarily exclude JBWS3809TestCase for Wildfly810
.......
r18828 | asoldano | 2014-08-07 14:29:18 +0200 (Thu, 07 Aug 2014) | 2 lines
[JBWS-3810] Also fix WFLY 8 integration
.......
r18829 | asoldano | 2014-08-07 16:56:37 +0200 (Thu, 07 Aug 2014) | 2 lines
Updating excludes
.......
r18830 | rsearls | 2014-08-07 19:03:51 +0200 (Thu, 07 Aug 2014) | 1 line
[JBWS-3750] code addition and corresponding test
.......
r18831 | asoldano | 2014-08-08 10:51:48 +0200 (Fri, 08 Aug 2014) | 2 lines
[JBWS-3750] Fixing build (broken due to commit 18830) by copying missing classes from rsearls branch; also updating JBWS2150TestCaseForked to test additions
.......
r18836 | asoldano | 2014-08-08 15:59:56 +0200 (Fri, 08 Aug 2014) | 2 lines
A couple of minor singleton optimizations, replaced usage of static synchronized methods with lazy initialization holder class idiom
.......
r18838 | asoldano | 2014-08-08 16:45:18 +0200 (Fri, 08 Aug 2014) | 2 lines
[JBWS-3750] Move additional interceptor registration to Bus level (instead of Endpoint level)
.......
r18841 | jim.ma | 2014-08-11 12:08:14 +0200 (Mon, 11 Aug 2014) | 1 line
[JBWS-3785]:Add option for forcing https protocol when rewriting soap:addres in WSDL
.......
r18844 | jim.ma | 2014-08-13 10:23:56 +0200 (Wed, 13 Aug 2014) | 1 line
[JBWS-3514]:Enable tests for wildfly800 and wildfly810
.......
r18846 | jim.ma | 2014-08-14 10:43:00 +0200 (Thu, 14 Aug 2014) | 1 line
[JBWS-3805]:Add property to force the address uri scheme
.......
r18849 | jim.ma | 2014-08-19 09:49:15 +0200 (Tue, 19 Aug 2014) | 1 line
[JBWS-3785][JBWS-3805]:Revert the previous change;only provide option to force change the soap address uri scheme
.......
r18850 | jim.ma | 2014-08-19 10:39:45 +0200 (Tue, 19 Aug 2014) | 1 line
[JBWS-3805]:Add test case
.......
r18851 | asoldano | 2014-08-20 16:16:42 +0200 (Wed, 20 Aug 2014) | 2 lines
[JBWS-3785] Refactoring Jim's changes: simplifying SoapAddressRewriteHelper, fixing WSDLSoapAddressRewriteUtils and preparing bunch of code sections for [JBWS-3805]
.......
r18853 | asoldano | 2014-08-20 18:16:39 +0200 (Wed, 20 Aug 2014) | 2 lines
[JBWS-3785] Fixing regression
.......
r18854 | asoldano | 2014-08-21 15:33:05 +0200 (Thu, 21 Aug 2014) | 2 lines
Improving test
.......
r18855 | asoldano | 2014-08-21 17:03:42 +0200 (Thu, 21 Aug 2014) | 2 lines
Further improving test
.......
r18858 | asoldano | 2014-08-22 11:48:45 +0200 (Fri, 22 Aug 2014) | 2 lines
[JBWS-3785] Improving JBWS2150TestCaseForked to cover uri scheme addition (as well as port/secure-port which were not covered yet)
.......
r18865 | asoldano | 2014-08-25 17:04:31 +0200 (Mon, 25 Aug 2014) | 2 lines
[JBWS-3821][JBWS-3820] Adding JAXWS 2.2 additional constructors to a bunch of test JAX-WS Service classes that are used for WebServiceRef injection
.......
r18867 | asoldano | 2014-08-25 17:47:13 +0200 (Mon, 25 Aug 2014) | 2 lines
[JBWS-3822] Default to TCCL bus selection strategy for clients running in-container
.......
r18868 | asoldano | 2014-08-25 17:49:04 +0200 (Mon, 25 Aug 2014) | 2 lines
[JBWS-3822] Fix few regressions
.......
r18869 | rsearls | 2014-08-26 03:47:00 +0200 (Tue, 26 Aug 2014) | 1 line
[JBWS-3809] Enable backport to wilfly810 complete
.......
Property changes on: stack/cxf/branches/jbossws-cxf-4.3.x
___________________________________________________________________
Added: svnmerge-blocked
+ /stack/cxf/trunk:18599-18602,18604-18606,18608,18613-18615,18620,18622-18624,18653-18655,18659-18660,18662,18664,18669-18670,18684,18688,18694,18696-18697,18699-18700,18702,18705,18711,18714,18716,18722-18725,18731,18733-18734,18738-18741,18743-18744,18747-18749,18753-18754,18760-18761,18763-18769,18771-18776,18780,18788-18795,18797,18799-18804,18809-18810,18815,18817-18821,18825-18831,18836,18838,18841,18844,18846,18849-18851,18853-18855,18858,18865,18867-18869
10 years, 3 months
JBossWS SVN: r18870 - in stack/cxf/branches/jbossws-cxf-4.3.x: modules/client/src/main/java/org/jboss/wsf/stack/cxf and 26 other directories.
by jbossws-commits@lists.jboss.org
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....");
+ }
+ 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>
10 years, 3 months
JBossWS SVN: r18869 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-08-25 21:47:00 -0400 (Mon, 25 Aug 2014)
New Revision: 18869
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3809] Enable backport to wilfly810 complete
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2014-08-25 15:49:04 UTC (rev 18868)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2014-08-26 01:47:00 UTC (rev 18869)
@@ -794,9 +794,6 @@
<!-- # [JBWS-3805]:Allow overriding soap:address rewrite options in jboss-webservices.xml;Not supposed to support in WFLY8 -->
<exclude>org/jboss/test/ws/jaxws/cxf/jbws3805/*TestCase*</exclude>
-
- <!-- [JBWS-3809] Enable it after backport change to wilfly810 ASIL ? -->
- <exclude>org/jboss/test/ws/jaxws/cxf/jbws3809/*TestCase*</exclude>
</excludes>
</configuration>
</plugin>
10 years, 4 months
JBossWS SVN: r18868 - stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-08-25 11:49:04 -0400 (Mon, 25 Aug 2014)
New Revision: 18868
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/DeploymentArchives.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointService.java
Log:
[JBWS-3822] Fix few regressions
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java 2014-08-25 15:47:13 UTC (rev 18867)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/AbstractClient.java 2014-08-25 15:49:04 UTC (rev 18868)
@@ -37,6 +37,9 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
+import org.jboss.wsf.stack.cxf.client.ClientBusSelector;
+import org.jboss.wsf.stack.cxf.client.Constants;
+
/**
*
* @author alessio.soldano(a)jboss.com
@@ -121,14 +124,20 @@
BusFactory.setThreadDefaultBus(null);
performInvocation(url); //goes through ServiceDelegate which sets the thread bus if it's null
Bus newThreadBus = BusFactory.getThreadDefaultBus(false);
- if (newThreadBus == initialDefaultBus)
- {
- throw new BusTestException("Thread bus set to former default bus " + initialDefaultBus + " instead of a new bus!");
+ if (ClientBusSelector.getDefaultStrategy().equals(Constants.THREAD_BUS_STRATEGY)) {
+ if (newThreadBus == initialDefaultBus)
+ {
+ throw new BusTestException("Thread bus set to former default bus " + initialDefaultBus + " instead of a new bus!");
+ }
+ else if (newThreadBus == threadBus)
+ {
+ throw new BusTestException("Thread bus set to former thread bus " + threadBus + " instead of a new bus!");
+ }
+ } else {
+ if (newThreadBus != null) {
+ throw new BusTestException("Thread bus set to " + newThreadBus + " instead of null!");
+ }
}
- else if (newThreadBus == threadBus)
- {
- throw new BusTestException("Thread bus set to former thread bus " + threadBus + " instead of a new bus!");
- }
performInvocation(url);
checkThreadBus(newThreadBus); //the thread bus is not changed as it's not null
checkDefaultBus(initialDefaultBus);
@@ -187,6 +196,11 @@
protected static void checkThreadBus(Bus expectedThreadBus) throws BusTestException
{
Bus bus = BusFactory.getThreadDefaultBus(false);
+ if (expectedThreadBus == null && bus != null)
+ {
+ throw new BusTestException("Thread " + Thread.currentThread() + " associated with bus " + bus
+ + " instead of expected null bus");
+ }
if (bus != expectedThreadBus)
{
throw new BusTestException("Thread " + Thread.currentThread() + " associated with bus " + bus
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/DeploymentArchives.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/DeploymentArchives.java 2014-08-25 15:47:13 UTC (rev 18867)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/DeploymentArchives.java 2014-08-25 15:49:04 UTC (rev 18868)
@@ -67,7 +67,7 @@
public static final String EJB3_CLIENT = JBossWSTestHelper.writeToFile(new JBossWSTestHelper.JarDeployment("jaxws-cxf-bus-ejb3-client.jar") { {
archive
.setManifest(new StringAsset("Manifest-Version: 1.0\n"
- + "Dependencies: org.apache.cxf\n"))
+ + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client\n"))
.addClass(org.jboss.test.ws.jaxws.cxf.bus.AbstractClient.class)
.addClass(org.jboss.test.ws.jaxws.cxf.bus.BusTestException.class)
.addClass(org.jboss.test.ws.jaxws.cxf.bus.EJB3Client.class)
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointService.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointService.java 2014-08-25 15:47:13 UTC (rev 18867)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/EndpointService.java 2014-08-25 15:49:04 UTC (rev 18868)
@@ -53,6 +53,10 @@
super(wsdlLocation, serviceName);
}
+ public EndpointService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
public EndpointService() {
super(WSDL_LOCATION, TESTENDPOINTSERVICE);
}
10 years, 4 months
JBossWS SVN: r18867 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-08-25 11:47:13 -0400 (Mon, 25 Aug 2014)
New Revision: 18867
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ClientBusSelector.java
Log:
[JBWS-3822] Default to TCCL bus selection strategy for clients running in-container
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ClientBusSelector.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ClientBusSelector.java 2014-08-25 15:39:48 UTC (rev 18866)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ClientBusSelector.java 2014-08-25 15:47:13 UTC (rev 18867)
@@ -28,6 +28,7 @@
import javax.xml.ws.WebServiceFeature;
+import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.stack.cxf.Loggers;
import org.jboss.wsf.stack.cxf.Messages;
@@ -43,7 +44,7 @@
{
private static final String sysPropStrategy;
static {
- final String propValue = SecurityActions.getSystemProperty(JBWS_CXF_JAXWS_CLIENT_BUS_STRATEGY, THREAD_BUS_STRATEGY);
+ final String propValue = SecurityActions.getSystemProperty(JBWS_CXF_JAXWS_CLIENT_BUS_STRATEGY, ClassLoaderProvider.isSet() ? TCCL_BUS_STRATEGY : THREAD_BUS_STRATEGY);
if (THREAD_BUS_STRATEGY.equals(propValue) || NEW_BUS_STRATEGY.equals(propValue) || TCCL_BUS_STRATEGY.equals(propValue))
{
sysPropStrategy = propValue;
10 years, 4 months
JBossWS SVN: r18866 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-08-25 11:39:48 -0400 (Mon, 25 Aug 2014)
New Revision: 18866
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java
Log:
[JBWS-3821] Use equals for comparing strings...
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java 2014-08-25 15:04:31 UTC (rev 18865)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java 2014-08-25 15:39:48 UTC (rev 18866)
@@ -227,7 +227,7 @@
{
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) {
+ if (!ClientBusSelector.getDefaultStrategy().equals(Constants.THREAD_BUS_STRATEGY)) {
featuresList.add(new UseThreadBusFeature());
}
final WebServiceFeature[] features = featuresList.size() == 0 ? null : featuresList.toArray(new WebServiceFeature[]{});
10 years, 4 months
JBossWS SVN: r18865 - in stack/cxf/trunk/modules/testsuite: cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3679 and 9 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-08-25 11:04:31 -0400 (Mon, 25 Aug 2014)
New Revision: 18865
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/webserviceref/EndpointService.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3679/EndpointOneService.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1581/EndpointService.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1841/EndpointService.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/DeploymentArchives.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2527/HelloService.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/cc/CCVerificationService.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/profile/ProfileMgmtService.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/EndpointService.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EndpointService.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/MultipleEndpointService.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webservicerefsec/EndpointService.java
Log:
[JBWS-3821][JBWS-3820] Adding JAXWS 2.2 additional constructors to a bunch of test JAX-WS Service classes that are used for WebServiceRef injection
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/webserviceref/EndpointService.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/webserviceref/EndpointService.java 2014-08-25 15:02:32 UTC (rev 18864)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/webserviceref/EndpointService.java 2014-08-25 15:04:31 UTC (rev 18865)
@@ -53,6 +53,10 @@
super(wsdlLocation, serviceName);
}
+ public EndpointService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
public EndpointService() {
super(WSDL_LOCATION, TESTENDPOINTSERVICE);
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3679/EndpointOneService.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3679/EndpointOneService.java 2014-08-25 15:02:32 UTC (rev 18864)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3679/EndpointOneService.java 2014-08-25 15:04:31 UTC (rev 18865)
@@ -31,6 +31,10 @@
super(wsdlLocation, serviceName);
}
+ public EndpointOneService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
@WebEndpoint(name = "EndpointOne")
public EndpointOne getSheepWSPort() {
return super.getPort(new QName("http://org.jboss.ws.jaxws.cxf/jbws3679", "EndpointOnePort"), EndpointOne.class);
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1581/EndpointService.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1581/EndpointService.java 2014-08-25 15:02:32 UTC (rev 18864)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1581/EndpointService.java 2014-08-25 15:04:31 UTC (rev 18865)
@@ -26,6 +26,7 @@
import javax.xml.namespace.QName;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
@WebServiceClient(name="EndpointService", targetNamespace="http://jbws1581.jaxws.ws.test.jboss.org/")
public class EndpointService extends javax.xml.ws.Service
@@ -36,6 +37,10 @@
super(wsdlLocation, serviceName);
}
+ public EndpointService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
@WebEndpoint(name = "EndpointBeanPort")
public EndpointInterface getEndpointPort() {
return (EndpointInterface)super.getPort(TESTENDPOINTPORT, EndpointInterface.class);
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1841/EndpointService.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1841/EndpointService.java 2014-08-25 15:02:32 UTC (rev 18864)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws1841/EndpointService.java 2014-08-25 15:04:31 UTC (rev 18865)
@@ -26,6 +26,7 @@
import javax.xml.namespace.QName;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
@WebServiceClient(name="EndpointService", targetNamespace="http://www.openuri.org/2004/04/HelloWorld")
public class EndpointService extends javax.xml.ws.Service
@@ -36,6 +37,10 @@
super(wsdlLocation, serviceName);
}
+ public EndpointService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
@WebEndpoint(name = "EJB3BeanPort")
public EndpointInterface getEndpointPort() {
return (EndpointInterface)super.getPort(TESTENDPOINTPORT, EndpointInterface.class);
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet.java 2014-08-25 15:02:32 UTC (rev 18864)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/ClientServlet.java 2014-08-25 15:04:31 UTC (rev 18865)
@@ -44,7 +44,7 @@
@MTOM
@RespectBinding
@Addressing
-@WebServiceRef(name="service/jbws2307service/asdf", type=HelloService.class)
+@WebServiceRef(name="service/jbws2307service/asdf", type=HelloServiceJAXWS22.class)
public class ClientServlet extends HttpServlet
{
@@ -53,7 +53,7 @@
private final Logger log = Logger.getLogger(ClientServlet.class);
@WebServiceRef(name="service/jbws2307service")
- HelloService service;
+ HelloServiceJAXWS22 service;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/DeploymentArchives.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/DeploymentArchives.java 2014-08-25 15:02:32 UTC (rev 18864)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2307/DeploymentArchives.java 2014-08-25 15:04:31 UTC (rev 18865)
@@ -23,7 +23,6 @@
import java.io.File;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.wsf.test.JBossWSTestHelper;
public final class DeploymentArchives
@@ -33,7 +32,6 @@
.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")
@@ -72,7 +70,7 @@
.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)
+ .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/web.xml"), "web.xml")
.addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/jbws2307/WEB-INF-client/wsdl/HelloService.wsdl"), "wsdl/HelloService.wsdl")
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2527/HelloService.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2527/HelloService.java 2014-08-25 15:02:32 UTC (rev 18864)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2527/HelloService.java 2014-08-25 15:04:31 UTC (rev 18865)
@@ -27,6 +27,7 @@
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 HelloService extends Service
@@ -38,6 +39,11 @@
super(wsdlLocation, serviceName);
}
+ public HelloService(URL wsdlLocation, QName serviceName, WebServiceFeature... features)
+ {
+ super(wsdlLocation, serviceName, features);
+ }
+
public HelloService()
{
super(HELLOSERVICE_WSDL_LOCATION, new QName("http://helloservice.org/wsdl", "HelloService"));
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/cc/CCVerificationService.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/cc/CCVerificationService.java 2014-08-25 15:02:32 UTC (rev 18864)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/cc/CCVerificationService.java 2014-08-25 15:04:31 UTC (rev 18865)
@@ -28,6 +28,7 @@
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
/**
* This class was generated by the JAXWS SI.
@@ -56,6 +57,10 @@
super(wsdlLocation, serviceName);
}
+ public CCVerificationService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
public CCVerificationService() {
super(CCVERIFICATIONSERVICE_WSDL_LOCATION, new QName("http://org.jboss.ws/samples/retail/cc", "CCVerificationService"));
}
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/profile/ProfileMgmtService.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/profile/ProfileMgmtService.java 2014-08-25 15:02:32 UTC (rev 18864)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/advanced/retail/profile/ProfileMgmtService.java 2014-08-25 15:04:31 UTC (rev 18865)
@@ -28,11 +28,10 @@
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
/**
- * This class was generated by the JAXWS SI.
- * JAX-WS RI 2.1-10/21/2006 12:56 AM(vivek)-EA2
- * Generated source version: 2.0
+ * Class generated by tools
*/
@WebServiceClient(name = "ProfileMgmtService", targetNamespace = "http://org.jboss.ws/samples/retail/profile", wsdlLocation = "resources/jaxws/samples/retail/META-INF/wsdl/ProfileMgmtService.wsdl")
public class ProfileMgmtService
@@ -55,6 +54,10 @@
super(wsdlLocation, serviceName);
}
+ public ProfileMgmtService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
public ProfileMgmtService() {
super(PROFILEMGMTSERVICE_WSDL_LOCATION, new QName("http://org.jboss.ws/samples/retail/profile", "ProfileMgmtService"));
}
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/EndpointService.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/EndpointService.java 2014-08-25 15:02:32 UTC (rev 18864)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/serviceref/EndpointService.java 2014-08-25 15:04:31 UTC (rev 18865)
@@ -28,6 +28,7 @@
import javax.xml.ws.Service;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceFeature;
/**
* JBossWS Generated Source
@@ -63,6 +64,10 @@
super(wsdlLocation, serviceName);
}
+ public EndpointService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+ super(wsdlLocation, serviceName, features);
+ }
+
public EndpointService() {
super(TESTENDPOINTSERVICE_WSDL_LOCATION, new QName("http://serviceref.samples.jaxws.ws.test.jboss.org/", "EndpointService"));
}
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EndpointService.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EndpointService.java 2014-08-25 15:02:32 UTC (rev 18864)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/EndpointService.java 2014-08-25 15:04:31 UTC (rev 18865)
@@ -72,6 +72,11 @@
super(wsdlLocation, serviceName);
}
+ public EndpointService(URL wsdlLocation, QName serviceName, WebServiceFeature... features)
+ {
+ super(wsdlLocation, serviceName, features);
+ }
+
/**
*
* @return
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/MultipleEndpointService.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/MultipleEndpointService.java 2014-08-25 15:02:32 UTC (rev 18864)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webserviceref/MultipleEndpointService.java 2014-08-25 15:04:31 UTC (rev 18865)
@@ -66,6 +66,11 @@
super(wsdlLocation, serviceName);
}
+ public MultipleEndpointService(URL wsdlLocation, QName serviceName, WebServiceFeature... features)
+ {
+ super(wsdlLocation, serviceName, features);
+ }
+
/**
*
* @return
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webservicerefsec/EndpointService.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webservicerefsec/EndpointService.java 2014-08-25 15:02:32 UTC (rev 18864)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/samples/webservicerefsec/EndpointService.java 2014-08-25 15:04:31 UTC (rev 18865)
@@ -72,6 +72,11 @@
super(wsdlLocation, serviceName);
}
+ public EndpointService(URL wsdlLocation, QName serviceName, WebServiceFeature... features)
+ {
+ super(wsdlLocation, serviceName, features);
+ }
+
/**
*
* @return
10 years, 4 months
JBossWS SVN: r18864 - in stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client: serviceref and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-08-25 11:02:32 -0400 (Mon, 25 Aug 2014)
New Revision: 18864
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ClientBusSelector.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java
Log:
[JBWS-3821] Ensure WebServiceRef injection is not affected by system bus selection strategy
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ClientBusSelector.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ClientBusSelector.java 2014-08-25 12:43:15 UTC (rev 18863)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ClientBusSelector.java 2014-08-25 15:02:32 UTC (rev 18864)
@@ -102,4 +102,8 @@
}
return featureStrategy != null ? featureStrategy : sysPropStrategy;
}
+
+ public static String getDefaultStrategy() {
+ return sysPropStrategy;
+ }
}
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java 2014-08-25 12:43:15 UTC (rev 18863)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java 2014-08-25 15:02:32 UTC (rev 18864)
@@ -53,7 +53,9 @@
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;
/**
@@ -223,7 +225,12 @@
private Service instantiateService(final UnifiedServiceRefMetaData serviceRefMD, final Class<?> serviceClass)
throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException, WSFException
{
- final WebServiceFeature[] features = getFeatures(serviceRefMD);
+ 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)
@@ -437,7 +444,7 @@
}
}
- private WebServiceFeature[] getFeatures(final UnifiedServiceRefMetaData serviceRef)
+ private List<WebServiceFeature> getFeatures(final UnifiedServiceRefMetaData serviceRef)
{
List<WebServiceFeature> features = new LinkedList<WebServiceFeature>();
@@ -471,8 +478,7 @@
features.add(new RespectBindingFeature(enabled));
}
- return features.size() == 0 ? null : features.toArray(new WebServiceFeature[]
- {});
+ return features;
}
private WebServiceFeature[] getFeatures(final UnifiedPortComponentRefMetaData portComponentRefMD)
10 years, 4 months
JBossWS SVN: r18863 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-08-25 08:43:15 -0400 (Mon, 25 Aug 2014)
New Revision: 18863
Removed:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/AbstractServiceObjectFactoryJAXWS.java
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java
Log:
Removing service object factory type hierarchy which is not needed anymore (and we can get rid of the thread local to store the bus)
Deleted: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/AbstractServiceObjectFactoryJAXWS.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/AbstractServiceObjectFactoryJAXWS.java 2014-08-25 11:15:01 UTC (rev 18862)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/AbstractServiceObjectFactoryJAXWS.java 2014-08-25 12:43:15 UTC (rev 18863)
@@ -1,541 +0,0 @@
-/*
- * 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.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.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
-{
- 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;
-
- 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
- if (getWsdlURL(serviceRef, serviceClass) == null)
- {
- final QName serviceQName = this.getServiceQName(serviceRef, serviceClass);
- forcedAddress = serviceRef.getDeployedServiceAddress(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 port = null;
- Object candidatePort = null;
- if (serviceClass != Service.class)
- {
- 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();
- }
- });
- }
-
- private Service instantiateService(final UnifiedServiceRefMetaData serviceRefMD, final Class<?> serviceClass)
- throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException, WSFException
- {
- final WebServiceFeature[] features = getFeatures(serviceRefMD);
- final QName serviceQName = this.getServiceQName(serviceRefMD, serviceClass);
- URL wsdlURL = this.getWsdlURL(serviceRefMD, serviceClass);
- if (wsdlURL == null)
- {
- final String deployedServiceAddress = serviceRefMD.getDeployedServiceAddress(serviceQName);
- if (deployedServiceAddress != null)
- {
- try
- {
- wsdlURL = new URL(deployedServiceAddress + "?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)
- {
- try {
- Constructor<?> ctor = serviceClass.getConstructor(new Class[] {URL.class, QName.class, WebServiceFeature[].class});
- target = (Service) ctor.newInstance(new Object[] {wsdlURL, serviceQName, features});
- } catch (NoSuchMethodException nsme) {
- throw org.jboss.wsf.stack.cxf.Messages.MESSAGES.missingJAXWS22ServiceConstructor(serviceClass.getName(), nsme);
- }
- }
- else
- {
- Constructor<?> ctor = serviceClass.getConstructor(new Class[]
- {URL.class, QName.class});
- target = (Service) ctor.newInstance(new Object[]
- {wsdlURL, serviceQName});
- }
- }
- else
- {
- if (features != null)
- {
- try {
- Constructor<?> ctor = serviceClass.getConstructor(new Class[] {WebServiceFeature[].class});
- target = (Service) ctor.newInstance(new Object[] {features});
- } catch (NoSuchMethodException nsme) {
- throw org.jboss.wsf.stack.cxf.Messages.MESSAGES.missingJAXWS22ServiceConstructor(serviceClass.getName(), nsme);
- }
- }
- 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)
- {
- return serviceRefMD.getWsdlLocation(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/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java 2014-08-25 11:15:01 UTC (rev 18862)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFServiceObjectFactoryJAXWS.java 2014-08-25 12:43:15 UTC (rev 18863)
@@ -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,495 @@
*/
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.Constants;
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
+ if (getWsdlURL(serviceRef, serviceClass) == null)
+ {
+ final QName serviceQName = this.getServiceQName(serviceRef, serviceClass);
+ forcedAddress = serviceRef.getDeployedServiceAddress(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 SecurityActions.getContextClassLoader().loadClass(className);
+ }
+
+ return null;
}
+
+ private String getServiceClassName(final UnifiedServiceRefMetaData serviceRefMD)
+ {
+ final String serviceImplClassName = serviceRefMD.getServiceImplClass();
+ if (serviceImplClassName != null)
+ return serviceImplClassName;
- @Override
- protected void configure(final UnifiedServiceRefMetaData serviceRefUMDM, final Service service)
+ final String serviceInterfaceName = serviceRefMD.getServiceInterface();
+ if (serviceInterfaceName != null)
+ return serviceInterfaceName;
+
+ return Service.class.getName(); // fallback
+ }
+
+ private String getTargetClassName(final UnifiedServiceRefMetaData serviceRefMD)
{
- if (serviceRefUMDM.getHandlerChain() != null)
+ 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, WSFException
{
- busAssociation.set(null);
- BusFactory.setThreadDefaultBus(null);
+ final WebServiceFeature[] features = getFeatures(serviceRefMD);
+ final QName serviceQName = this.getServiceQName(serviceRefMD, serviceClass);
+ URL wsdlURL = this.getWsdlURL(serviceRefMD, serviceClass);
+ if (wsdlURL == null)
+ {
+ final String deployedServiceAddress = serviceRefMD.getDeployedServiceAddress(serviceQName);
+ if (deployedServiceAddress != null)
+ {
+ try
+ {
+ wsdlURL = new URL(deployedServiceAddress + "?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)
+ {
+ try {
+ Constructor<?> ctor = serviceClass.getConstructor(new Class[] {URL.class, QName.class, WebServiceFeature[].class});
+ target = (Service) ctor.newInstance(new Object[] {wsdlURL, serviceQName, features});
+ } catch (NoSuchMethodException nsme) {
+ throw org.jboss.wsf.stack.cxf.Messages.MESSAGES.missingJAXWS22ServiceConstructor(serviceClass.getName(), nsme);
+ }
+ }
+ else
+ {
+ Constructor<?> ctor = serviceClass.getConstructor(new Class[]
+ {URL.class, QName.class});
+ target = (Service) ctor.newInstance(new Object[]
+ {wsdlURL, serviceQName});
+ }
+ }
+ else
+ {
+ if (features != null)
+ {
+ try {
+ Constructor<?> ctor = serviceClass.getConstructor(new Class[] {WebServiceFeature[].class});
+ target = (Service) ctor.newInstance(new Object[] {features});
+ } catch (NoSuchMethodException nsme) {
+ throw org.jboss.wsf.stack.cxf.Messages.MESSAGES.missingJAXWS22ServiceConstructor(serviceClass.getName(), nsme);
+ }
+ }
+ 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)
+ {
+ return serviceRefMD.getWsdlLocation(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[]
+ {});
+ }
+
private Bus createNewBus(final UnifiedServiceRefMetaData serviceRefMD)
{
final Bus bus;
10 years, 4 months