You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bu...@apache.org on 2021/03/15 17:27:40 UTC
[cxf] branch master updated (e8cd90d -> b341f7c)
This is an automated email from the ASF dual-hosted git repository.
buhhunyx pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git.
from e8cd90d Updating undertow to 2.2.5
new 4f932d8 cxf-services-sts-systests-basic: organize servers
new b341f7c cxf-rt-ws-addr: fix PMD rule: UnusedAssignment
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../ws/addressing/impl/InternalContextUtils.java | 2 +-
.../cxf/ws/addressing/impl/MAPAggregatorImpl.java | 3 +-
.../apache/cxf/ws/addressing/soap/MAPCodec.java | 3 +-
.../cxf/ws/addressing/soap/MAPCodecTest.java | 2 +-
.../systest/sts/basic_auth/JaxrsBasicAuthTest.java | 2 +-
.../sts/secure_conv/SCTSAMLTokenProvider.java | 3 +-
.../sts/asymmetric/AsymmetricBindingTest.java | 109 ++++-----------
.../apache/cxf/systest/sts/asymmetric/Server.java | 46 -------
.../cxf/systest/sts/asymmetric/StaxServer.java | 46 -------
.../apache/cxf/systest/sts/bearer/BearerTest.java | 81 ++++-------
.../org/apache/cxf/systest/sts/bearer/Server.java | 46 -------
.../apache/cxf/systest/sts/bearer/StaxServer.java | 46 -------
.../systest/sts/delegation/SAMLDelegationTest.java | 44 +-----
.../cxf/systest/sts/delegation/STSServer.java | 19 +--
.../DoubleItServer.java} | 14 +-
.../cxf/systest/sts/deployment/STSServer.java | 24 +---
.../systest/sts/deployment/StaxDoubleItServer.java | 11 +-
.../cxf/systest/sts/deployment/StaxSTSServer.java | 31 +----
.../intermediary_transformation/Intermediary.java | 46 -------
.../IntermediaryCaching.java | 46 -------
.../IntermediaryCachingPortTypeImpl.java | 4 +-
.../IntermediaryPortTypeImpl.java | 4 +-
.../IntermediaryTransformationCachingTest.java | 39 ++----
.../IntermediaryTransformationTest.java | 48 ++-----
.../sts/intermediary_transformation/Server.java | 46 -------
.../IssuerSTSServer.java} | 10 +-
.../apache/cxf/systest/sts/issuer/IssuerTest.java | 105 +++++----------
.../apache/cxf/systest/sts/issuer/STSServer.java | 46 -------
.../org/apache/cxf/systest/sts/issuer/Server.java | 46 -------
.../cxf/systest/sts/issueunit/IssueUnitTest.java | 89 ++----------
.../org/apache/cxf/systest/sts/jaas/JAASTest.java | 108 +++------------
.../org/apache/cxf/systest/sts/jaas/Server.java | 46 -------
.../org/apache/cxf/systest/sts/jaas/Server2.java | 46 -------
.../systest/sts/sendervouches/Intermediary.java | 46 -------
.../sts/sendervouches/SenderVouchesTest.java | 75 +++--------
.../cxf/systest/sts/sendervouches/Server.java | 46 -------
.../sts/sendervouches/StaxIntermediary.java | 46 -------
.../cxf/systest/sts/sendervouches/StaxServer.java | 46 -------
.../sts/stsclient/AbstractSTSTokenTest.java | 21 +--
.../cxf/systest/sts/stsclient/STSClientTest.java | 42 ++----
.../apache/cxf/systest/sts/stsclient/Server.java | 46 -------
.../apache/cxf/systest/sts/symmetric/Server.java | 46 -------
.../cxf/systest/sts/symmetric/StaxServer.java | 46 -------
.../sts/symmetric/SymmetricBindingTest.java | 134 +++++-------------
.../apache/cxf/systest/sts/template/Server.java | 46 -------
.../cxf/systest/sts/template/StaxServer.java | 46 -------
.../cxf/systest/sts/template/TemplateTest.java | 97 +++----------
.../apache/cxf/systest/sts/transport/Server.java | 46 -------
.../cxf/systest/sts/transport/StaxServer.java | 46 -------
.../sts/transport/TransportBindingTest.java | 150 +++++----------------
.../cxf/systest/sts/username_actas/Server.java | 46 -------
.../cxf/systest/sts/username_actas/Server2.java | 46 -------
.../username_actas/UsernameActAsCachingTest.java | 60 ++-------
.../sts/username_actas/UsernameActAsTest.java | 55 +++-----
.../systest/sts/username_onbehalfof/Server.java | 46 -------
.../systest/sts/username_onbehalfof/Server2.java | 46 -------
.../UsernameOnBehalfOfCachingTest.java | 62 ++-------
.../UsernameOnBehalfOfTest.java | 55 +++-----
.../cxf/systest/sts/x509/AsymmetricServer.java | 50 -------
.../org/apache/cxf/systest/sts/x509/Server.java | 50 -------
.../apache/cxf/systest/sts/x509/StaxServer.java | 50 -------
.../sts/x509/X509AsymmetricBindingTest.java | 35 ++---
.../systest/sts/x509/X509SymmetricBindingTest.java | 110 ++++-----------
.../cxf/systest/sts/asymmetric/cxf-service.xml | 8 +-
.../systest/sts/asymmetric/cxf-stax-service.xml | 8 +-
.../apache/cxf/systest/sts/bearer/cxf-service.xml | 6 +-
.../cxf/systest/sts/bearer/cxf-stax-service.xml | 8 +-
.../cxf/systest/sts/deployment/cxf-transport.xml | 14 +-
.../systest/sts/deployment/cxf-ut-encrypted.xml | 12 +-
.../apache/cxf/systest/sts/deployment/cxf-ut.xml | 12 +-
.../apache/cxf/systest/sts/deployment/cxf-x509.xml | 2 +-
.../systest/sts/deployment/stax-cxf-transport.xml | 16 +--
.../sts/deployment/stax-cxf-ut-encrypted.xml | 18 +--
.../cxf/systest/sts/deployment/stax-cxf-ut.xml | 12 +-
.../cxf/systest/sts/deployment/stax-cxf-x509.xml | 2 +-
.../cxf-intermediary-caching.xml | 4 +-
.../cxf-intermediary.xml | 9 +-
.../intermediary_transformation/cxf-service.xml | 8 +-
.../apache/cxf/systest/sts/issuer/DoubleIt.wsdl | 10 +-
.../sts/issuer/cxf-issuer-sts-transport.xml | 14 +-
.../apache/cxf/systest/sts/issuer/cxf-service.xml | 8 +-
.../apache/cxf/systest/sts/jaas/cxf-service.xml | 22 +--
.../apache/cxf/systest/sts/jaas/cxf-service2.xml | 20 +--
.../systest/sts/sendervouches/cxf-intermediary.xml | 6 +-
.../cxf/systest/sts/sendervouches/cxf-service.xml | 4 +-
.../sts/sendervouches/cxf-stax-intermediary.xml | 10 +-
.../systest/sts/sendervouches/cxf-stax-service.xml | 6 +-
.../cxf/systest/sts/stsclient/cxf-service.xml | 4 +-
.../cxf/systest/sts/symmetric/cxf-service.xml | 10 +-
.../cxf/systest/sts/symmetric/cxf-stax-service.xml | 10 +-
.../cxf/systest/sts/template/cxf-service.xml | 6 +-
.../cxf/systest/sts/template/cxf-stax-service.xml | 8 +-
.../cxf/systest/sts/transport/cxf-service.xml | 14 +-
.../cxf/systest/sts/transport/cxf-stax-service.xml | 16 +--
.../cxf/systest/sts/username_actas/cxf-service.xml | 10 +-
.../systest/sts/username_actas/cxf-service2.xml | 10 +-
.../sts/username_onbehalfof/cxf-service.xml | 10 +-
.../sts/username_onbehalfof/cxf-service2.xml | 10 +-
.../systest/sts/x509/cxf-asymmetric-service.xml | 2 +-
.../apache/cxf/systest/sts/x509/cxf-service.xml | 8 +-
.../cxf/systest/sts/x509/cxf-stax-service.xml | 8 +-
101 files changed, 542 insertions(+), 2820 deletions(-)
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/Server.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/StaxServer.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Server.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/StaxServer.java
copy services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/{rest/STSRESTServer.java => deployment/DoubleItServer.java} (75%)
copy tools/corba/src/main/java/org/apache/cxf/tools/corba/idlpreprocessor/IncludeResolver.java => services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/StaxDoubleItServer.java (82%)
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/Intermediary.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryCaching.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/Server.java
copy services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/{rest/STSRESTServer.java => issuer/IssuerSTSServer.java} (78%)
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/STSServer.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/Server.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/Server.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/Server2.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Intermediary.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Server.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/StaxIntermediary.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/StaxServer.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/Server.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/Server.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/StaxServer.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/Server.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/StaxServer.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/Server.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/StaxServer.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/Server.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/Server2.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/Server.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/Server2.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/AsymmetricServer.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/Server.java
delete mode 100644 services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/StaxServer.java
[cxf] 01/02: cxf-services-sts-systests-basic: organize servers
Posted by bu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
buhhunyx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 4f932d881de23b88e6388d4b624eed119942031a
Author: Alexey Markevich <bu...@gmail.com>
AuthorDate: Mon Mar 15 20:18:28 2021 +0300
cxf-services-sts-systests-basic: organize servers
---
.../systest/sts/basic_auth/JaxrsBasicAuthTest.java | 2 +-
.../sts/secure_conv/SCTSAMLTokenProvider.java | 3 +-
.../sts/asymmetric/AsymmetricBindingTest.java | 109 ++++-----------
.../apache/cxf/systest/sts/asymmetric/Server.java | 46 -------
.../cxf/systest/sts/asymmetric/StaxServer.java | 46 -------
.../apache/cxf/systest/sts/bearer/BearerTest.java | 81 ++++-------
.../apache/cxf/systest/sts/bearer/StaxServer.java | 46 -------
.../systest/sts/delegation/SAMLDelegationTest.java | 44 +-----
.../cxf/systest/sts/delegation/STSServer.java | 19 +--
.../Server.java => deployment/DoubleItServer.java} | 22 +--
.../cxf/systest/sts/deployment/STSServer.java | 24 +---
.../StaxDoubleItServer.java} | 25 +---
.../cxf/systest/sts/deployment/StaxSTSServer.java | 31 +----
.../intermediary_transformation/Intermediary.java | 46 -------
.../IntermediaryCaching.java | 46 -------
.../IntermediaryCachingPortTypeImpl.java | 4 +-
.../IntermediaryPortTypeImpl.java | 4 +-
.../IntermediaryTransformationCachingTest.java | 39 ++----
.../IntermediaryTransformationTest.java | 48 ++-----
.../sts/intermediary_transformation/Server.java | 46 -------
.../issuer/{Server.java => IssuerSTSServer.java} | 24 +---
.../apache/cxf/systest/sts/issuer/IssuerTest.java | 105 +++++----------
.../apache/cxf/systest/sts/issuer/STSServer.java | 46 -------
.../cxf/systest/sts/issueunit/IssueUnitTest.java | 89 ++----------
.../org/apache/cxf/systest/sts/jaas/JAASTest.java | 108 +++------------
.../org/apache/cxf/systest/sts/jaas/Server2.java | 46 -------
.../systest/sts/sendervouches/Intermediary.java | 46 -------
.../sts/sendervouches/SenderVouchesTest.java | 75 +++--------
.../cxf/systest/sts/sendervouches/Server.java | 46 -------
.../sts/sendervouches/StaxIntermediary.java | 46 -------
.../cxf/systest/sts/sendervouches/StaxServer.java | 46 -------
.../sts/stsclient/AbstractSTSTokenTest.java | 21 +--
.../cxf/systest/sts/stsclient/STSClientTest.java | 42 ++----
.../apache/cxf/systest/sts/stsclient/Server.java | 46 -------
.../apache/cxf/systest/sts/symmetric/Server.java | 46 -------
.../cxf/systest/sts/symmetric/StaxServer.java | 46 -------
.../sts/symmetric/SymmetricBindingTest.java | 134 +++++-------------
.../apache/cxf/systest/sts/template/Server.java | 46 -------
.../cxf/systest/sts/template/StaxServer.java | 46 -------
.../cxf/systest/sts/template/TemplateTest.java | 97 +++----------
.../apache/cxf/systest/sts/transport/Server.java | 46 -------
.../cxf/systest/sts/transport/StaxServer.java | 46 -------
.../sts/transport/TransportBindingTest.java | 150 +++++----------------
.../cxf/systest/sts/username_actas/Server.java | 46 -------
.../cxf/systest/sts/username_actas/Server2.java | 46 -------
.../username_actas/UsernameActAsCachingTest.java | 60 ++-------
.../sts/username_actas/UsernameActAsTest.java | 55 +++-----
.../systest/sts/username_onbehalfof/Server.java | 46 -------
.../systest/sts/username_onbehalfof/Server2.java | 46 -------
.../UsernameOnBehalfOfCachingTest.java | 62 ++-------
.../UsernameOnBehalfOfTest.java | 55 +++-----
.../cxf/systest/sts/x509/AsymmetricServer.java | 50 -------
.../org/apache/cxf/systest/sts/x509/Server.java | 50 -------
.../apache/cxf/systest/sts/x509/StaxServer.java | 50 -------
.../sts/x509/X509AsymmetricBindingTest.java | 35 ++---
.../systest/sts/x509/X509SymmetricBindingTest.java | 110 ++++-----------
.../cxf/systest/sts/asymmetric/cxf-service.xml | 8 +-
.../systest/sts/asymmetric/cxf-stax-service.xml | 8 +-
.../apache/cxf/systest/sts/bearer/cxf-service.xml | 6 +-
.../cxf/systest/sts/bearer/cxf-stax-service.xml | 8 +-
.../cxf/systest/sts/deployment/cxf-transport.xml | 14 +-
.../systest/sts/deployment/cxf-ut-encrypted.xml | 12 +-
.../apache/cxf/systest/sts/deployment/cxf-ut.xml | 12 +-
.../apache/cxf/systest/sts/deployment/cxf-x509.xml | 2 +-
.../systest/sts/deployment/stax-cxf-transport.xml | 16 +--
.../sts/deployment/stax-cxf-ut-encrypted.xml | 18 +--
.../cxf/systest/sts/deployment/stax-cxf-ut.xml | 12 +-
.../cxf/systest/sts/deployment/stax-cxf-x509.xml | 2 +-
.../cxf-intermediary-caching.xml | 4 +-
.../cxf-intermediary.xml | 9 +-
.../intermediary_transformation/cxf-service.xml | 8 +-
.../apache/cxf/systest/sts/issuer/DoubleIt.wsdl | 10 +-
.../sts/issuer/cxf-issuer-sts-transport.xml | 14 +-
.../apache/cxf/systest/sts/issuer/cxf-service.xml | 8 +-
.../apache/cxf/systest/sts/jaas/cxf-service.xml | 22 +--
.../apache/cxf/systest/sts/jaas/cxf-service2.xml | 20 +--
.../systest/sts/sendervouches/cxf-intermediary.xml | 6 +-
.../cxf/systest/sts/sendervouches/cxf-service.xml | 4 +-
.../sts/sendervouches/cxf-stax-intermediary.xml | 10 +-
.../systest/sts/sendervouches/cxf-stax-service.xml | 6 +-
.../cxf/systest/sts/stsclient/cxf-service.xml | 4 +-
.../cxf/systest/sts/symmetric/cxf-service.xml | 10 +-
.../cxf/systest/sts/symmetric/cxf-stax-service.xml | 10 +-
.../cxf/systest/sts/template/cxf-service.xml | 6 +-
.../cxf/systest/sts/template/cxf-stax-service.xml | 8 +-
.../cxf/systest/sts/transport/cxf-service.xml | 14 +-
.../cxf/systest/sts/transport/cxf-stax-service.xml | 16 +--
.../cxf/systest/sts/username_actas/cxf-service.xml | 10 +-
.../systest/sts/username_actas/cxf-service2.xml | 10 +-
.../sts/username_onbehalfof/cxf-service.xml | 10 +-
.../sts/username_onbehalfof/cxf-service2.xml | 10 +-
.../systest/sts/x509/cxf-asymmetric-service.xml | 2 +-
.../apache/cxf/systest/sts/x509/cxf-service.xml | 8 +-
.../cxf/systest/sts/x509/cxf-stax-service.xml | 8 +-
94 files changed, 532 insertions(+), 2718 deletions(-)
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxrsBasicAuthTest.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxrsBasicAuthTest.java
index fd3d486..f9b726b 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxrsBasicAuthTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/basic_auth/JaxrsBasicAuthTest.java
@@ -83,7 +83,7 @@ public class JaxrsBasicAuthTest extends AbstractBusClientServerTestBase {
final String address = "https://localhost:" + PORT + "/doubleit/services/doubleit-rs";
final int numToDouble = 25;
- WebClient client = null;
+ final WebClient client;
if (username != null && password != null) {
client = WebClient.create(address, username, password, configLocation);
} else {
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java
index fd35189..13b261b 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/secure_conv/SCTSAMLTokenProvider.java
@@ -86,7 +86,6 @@ public class SCTSAMLTokenProvider implements TokenProvider {
*/
public TokenProviderResponse createToken(TokenProviderParameters tokenParameters) {
testKeyType(tokenParameters);
- byte[] secret = null;
byte[] entropyBytes = null;
long keySize = 0;
boolean computedKey = false;
@@ -95,7 +94,7 @@ public class SCTSAMLTokenProvider implements TokenProvider {
LOG.fine("Handling token of type: " + tokenRequirements.getTokenType());
keyRequirements.setKeyType(STSConstants.SYMMETRIC_KEY_KEYTYPE);
- secret = (byte[])tokenParameters.getAdditionalProperties().get(SCTValidator.SCT_VALIDATOR_SECRET);
+ byte[] secret = (byte[])tokenParameters.getAdditionalProperties().get(SCTValidator.SCT_VALIDATOR_SECRET);
try {
Document doc = DOMUtils.createDocument();
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java
index 3394f9d..6e42a10 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/AsymmetricBindingTest.java
@@ -20,20 +20,17 @@ package org.apache.cxf.systest.sts.asymmetric;
import java.net.URL;
import java.security.cert.X509Certificate;
-import java.util.Arrays;
-import java.util.Collection;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TestParam;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.systest.sts.deployment.STSServer;
+import org.apache.cxf.systest.sts.deployment.StaxDoubleItServer;
import org.apache.cxf.systest.sts.deployment.StaxSTSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
@@ -66,8 +63,8 @@ public class AsymmetricBindingTest extends AbstractBusClientServerTestBase {
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(Server.class);
- private static final String STAX_PORT = allocatePort(StaxServer.class);
+ private static final String PORT = allocatePort(DoubleItServer.class);
+ private static final String STAX_PORT = allocatePort(StaxDoubleItServer.class);
final TestParam test;
@@ -77,64 +74,36 @@ public class AsymmetricBindingTest extends AbstractBusClientServerTestBase {
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server.class, true)
+ assertTrue(launchServer(new DoubleItServer(
+ AsymmetricBindingTest.class.getResource("cxf-service.xml"),
+ AsymmetricBindingTest.class.getResource("cxf-stax-service.xml")))
);
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(StaxServer.class, true)
- );
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-ut.xml");
- assertTrue(launchServer(stsServer));
-
- stsServer = new STSServer();
- stsServer.setContext("cxf-ut-encrypted.xml");
- assertTrue(launchServer(stsServer));
- StaxSTSServer staxStsServer = new StaxSTSServer();
- staxStsServer.setContext("stax-cxf-ut.xml");
- assertTrue(launchServer(staxStsServer));
-
- staxStsServer = new StaxSTSServer();
- staxStsServer.setContext("stax-cxf-ut-encrypted.xml");
- assertTrue(launchServer(staxStsServer));
+ assertTrue(launchServer(new STSServer(
+ "cxf-ut.xml",
+ "stax-cxf-ut.xml")));
+ assertTrue(launchServer(new STSServer(
+ "cxf-ut-encrypted.xml",
+ "stax-cxf-ut-encrypted.xml")));
}
@Parameters(name = "{0}")
- public static Collection<TestParam> data() {
-
- return Arrays.asList(new TestParam[] {new TestParam(PORT, false, STSPORT2),
- new TestParam(PORT, true, STSPORT2),
- new TestParam(STAX_PORT, false, STSPORT2),
- new TestParam(STAX_PORT, true, STSPORT2),
-
- new TestParam(PORT, false, STAX_STSPORT2),
- new TestParam(PORT, true, STAX_STSPORT2),
- new TestParam(STAX_PORT, false, STAX_STSPORT2),
- new TestParam(STAX_PORT, true, STAX_STSPORT2),
- });
- }
-
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ public static TestParam[] data() {
+ return new TestParam[] {new TestParam(PORT, false, STSPORT2),
+ new TestParam(PORT, true, STSPORT2),
+ new TestParam(STAX_PORT, false, STSPORT2),
+ new TestParam(STAX_PORT, true, STSPORT2),
+
+ new TestParam(PORT, false, STAX_STSPORT2),
+ new TestParam(PORT, true, STAX_STSPORT2),
+ new TestParam(STAX_PORT, false, STAX_STSPORT2),
+ new TestParam(STAX_PORT, true, STAX_STSPORT2),
+ };
}
@org.junit.Test
public void testUsernameTokenSAML1() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = AsymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = AsymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -152,18 +121,11 @@ public class AsymmetricBindingTest extends AbstractBusClientServerTestBase {
doubleIt(asymmetricSaml1Port, 25);
((java.io.Closeable)asymmetricSaml1Port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testUsernameTokenSAML2() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = AsymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = AsymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -182,18 +144,11 @@ public class AsymmetricBindingTest extends AbstractBusClientServerTestBase {
TokenTestUtils.verifyToken(asymmetricSaml2Port);
((java.io.Closeable)asymmetricSaml2Port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testUsernameTokenSAML2KeyValue() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = AsymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = AsymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -212,18 +167,11 @@ public class AsymmetricBindingTest extends AbstractBusClientServerTestBase {
TokenTestUtils.verifyToken(asymmetricSaml2Port);
((java.io.Closeable)asymmetricSaml2Port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testUsernameTokenSAML1Encrypted() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = AsymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = AsymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -254,7 +202,6 @@ public class AsymmetricBindingTest extends AbstractBusClientServerTestBase {
doubleIt(asymmetricSaml1EncryptedPort, 40);
((java.io.Closeable)asymmetricSaml1EncryptedPort).close();
- bus.shutdown(true);
}
private static void doubleIt(DoubleItPortType port, int numToDouble) {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/Server.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/Server.java
deleted file mode 100644
index b76a898..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/Server.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.asymmetric;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Server extends AbstractBusTestServerBase {
-
- public Server() {
-
- }
-
- protected void run() {
- URL busFile = Server.class.getResource("cxf-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/StaxServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/StaxServer.java
deleted file mode 100644
index 7de16bf..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/asymmetric/StaxServer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.asymmetric;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class StaxServer extends AbstractBusTestServerBase {
-
- public StaxServer() {
-
- }
-
- protected void run() {
- URL busFile = StaxServer.class.getResource("cxf-stax-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new StaxServer();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java
index 6feb879..fb44b87 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/BearerTest.java
@@ -19,20 +19,17 @@
package org.apache.cxf.systest.sts.bearer;
import java.net.URL;
-import java.util.Arrays;
-import java.util.Collection;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TestParam;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.systest.sts.deployment.STSServer;
+import org.apache.cxf.systest.sts.deployment.StaxDoubleItServer;
import org.apache.cxf.systest.sts.deployment.StaxSTSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.example.contract.doubleit.DoubleItPortType;
@@ -58,8 +55,8 @@ public class BearerTest extends AbstractBusClientServerTestBase {
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(Server.class);
- private static final String STAX_PORT = allocatePort(StaxServer.class);
+ private static final String PORT = allocatePort(DoubleItServer.class);
+ private static final String STAX_PORT = allocatePort(StaxDoubleItServer.class);
final TestParam test;
@@ -69,56 +66,32 @@ public class BearerTest extends AbstractBusClientServerTestBase {
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server.class, true)
+ assertTrue(launchServer(new DoubleItServer(
+ BearerTest.class.getResource("cxf-service.xml"),
+ BearerTest.class.getResource("cxf-stax-service.xml")))
);
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(StaxServer.class, true)
- );
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-transport.xml");
- assertTrue(launchServer(stsServer));
-
- StaxSTSServer staxStsServer = new StaxSTSServer();
- staxStsServer.setContext("stax-cxf-transport.xml");
- assertTrue(launchServer(staxStsServer));
+ assertTrue(launchServer(new STSServer(
+ "cxf-transport.xml",
+ "stax-cxf-transport.xml")));
}
@Parameters(name = "{0}")
- public static Collection<TestParam> data() {
-
- return Arrays.asList(new TestParam[] {new TestParam(PORT, false, STSPORT),
- new TestParam(PORT, true, STSPORT),
- new TestParam(STAX_PORT, false, STSPORT),
- new TestParam(STAX_PORT, true, STSPORT),
-
- new TestParam(PORT, false, STAX_STSPORT),
- new TestParam(PORT, true, STAX_STSPORT),
- new TestParam(STAX_PORT, false, STAX_STSPORT),
- new TestParam(STAX_PORT, true, STAX_STSPORT),
- });
- }
-
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ public static TestParam[] data() {
+ return new TestParam[] {new TestParam(PORT, false, STSPORT),
+ new TestParam(PORT, true, STSPORT),
+ new TestParam(STAX_PORT, false, STSPORT),
+ new TestParam(STAX_PORT, true, STSPORT),
+
+ new TestParam(PORT, false, STAX_STSPORT),
+ new TestParam(PORT, true, STAX_STSPORT),
+ new TestParam(STAX_PORT, false, STAX_STSPORT),
+ new TestParam(STAX_PORT, true, STAX_STSPORT),
+ };
}
@org.junit.Test
public void testSAML2Bearer() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = BearerTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = BearerTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -136,18 +109,11 @@ public class BearerTest extends AbstractBusClientServerTestBase {
doubleIt(transportSaml2Port, 45);
((java.io.Closeable)transportSaml2Port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testSAML2BearerNoBinding() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = BearerTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = BearerTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -165,7 +131,6 @@ public class BearerTest extends AbstractBusClientServerTestBase {
doubleIt(transportSaml2Port, 45);
((java.io.Closeable)transportSaml2Port).close();
- bus.shutdown(true);
}
private static void doubleIt(DoubleItPortType port, int numToDouble) {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/StaxServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/StaxServer.java
deleted file mode 100644
index 744111c..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/StaxServer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.bearer;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class StaxServer extends AbstractBusTestServerBase {
-
- public StaxServer() {
-
- }
-
- protected void run() {
- URL busFile = StaxServer.class.getResource("cxf-stax-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new StaxServer();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/delegation/SAMLDelegationTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/delegation/SAMLDelegationTest.java
index 39ee27d..9f79249 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/delegation/SAMLDelegationTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/delegation/SAMLDelegationTest.java
@@ -18,7 +18,6 @@
*/
package org.apache.cxf.systest.sts.delegation;
-import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
@@ -28,8 +27,6 @@ import javax.security.auth.callback.CallbackHandler;
import org.w3c.dom.Element;
import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.jaxws.context.WrappedMessageContext;
import org.apache.cxf.message.MessageImpl;
import org.apache.cxf.sts.STSConstants;
@@ -87,19 +84,9 @@ public class SAMLDelegationTest extends AbstractBusClientServerTestBase {
);
}
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
- }
-
@org.junit.Test
public void testSAMLOnBehalfOf() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SAMLDelegationTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
// Get a token from the UT endpoint first
SecurityToken token =
@@ -125,18 +112,11 @@ public class SAMLDelegationTest extends AbstractBusClientServerTestBase {
DEFAULT_ADDRESS, true, "Transport_Port");
assertEquals(SAML2_TOKEN_TYPE, token2.getTokenType());
assertNotNull(token2.getToken());
-
- bus.shutdown(true);
}
@org.junit.Test
public void testSAMLActAs() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SAMLDelegationTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
// Get a token from the UT endpoint first
SecurityToken token =
@@ -162,18 +142,11 @@ public class SAMLDelegationTest extends AbstractBusClientServerTestBase {
DEFAULT_ADDRESS, false, "Transport_Port");
assertEquals(SAML2_TOKEN_TYPE, token2.getTokenType());
assertNotNull(token2.getToken());
-
- bus.shutdown(true);
}
@org.junit.Test
public void testTransportForgedDelegationToken() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SAMLDelegationTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
Crypto crypto = CryptoFactory.getInstance(getEncryptionProperties());
CallbackHandler callbackHandler = new CommonCallbackHandler();
@@ -198,18 +171,11 @@ public class SAMLDelegationTest extends AbstractBusClientServerTestBase {
} catch (Exception ex) {
// expected
}
-
- bus.shutdown(true);
}
@org.junit.Test
public void testTransportUnsignedDelegationToken() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SAMLDelegationTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
// Create SAML token
Element samlToken =
@@ -231,8 +197,6 @@ public class SAMLDelegationTest extends AbstractBusClientServerTestBase {
} catch (Exception ex) {
// expected
}
-
- bus.shutdown(true);
}
private SecurityToken requestSecurityToken(
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/delegation/STSServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/delegation/STSServer.java
index 4392606..f678d53 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/delegation/STSServer.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/delegation/STSServer.java
@@ -18,29 +18,12 @@
*/
package org.apache.cxf.systest.sts.delegation;
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
public class STSServer extends AbstractBusTestServerBase {
- public STSServer() {
-
- }
-
protected void run() {
- URL busFile = STSServer.class.getResource("cxf-sts-transport.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new STSServer();
- } catch (Exception e) {
- e.printStackTrace();
- }
+ setBus(new SpringBusFactory().createBus(getClass().getResource("cxf-sts-transport.xml")));
}
}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/Server.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/DoubleItServer.java
similarity index 66%
rename from services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/Server.java
rename to services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/DoubleItServer.java
index 1e69ebb..a626a42 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/Server.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/DoubleItServer.java
@@ -16,31 +16,23 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.systest.sts.jaas;
+package org.apache.cxf.systest.sts.deployment;
import java.net.URL;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-public class Server extends AbstractBusTestServerBase {
+public class DoubleItServer extends AbstractBusTestServerBase {
- public Server() {
+ private final URL[] contexts;
+ public DoubleItServer(URL... contexts) {
+ this.contexts = contexts;
}
protected void run() {
- URL busFile = Server.class.getResource("cxf-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server();
- } catch (Exception e) {
- e.printStackTrace();
- }
+ setBus(new SpringBusFactory().createBus(contexts));
}
+
}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/STSServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/STSServer.java
index f71674f..3b7970e 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/STSServer.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/STSServer.java
@@ -19,34 +19,22 @@
package org.apache.cxf.systest.sts.deployment;
import java.net.URL;
+import java.util.Arrays;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
public class STSServer extends AbstractBusTestServerBase {
- private String context;
-
- public STSServer() {
+ private final String[] contexts;
+ public STSServer(String... contexts) {
+ this.contexts = contexts;
}
protected void run() {
- URL busFile = STSServer.class.getResource(context);
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new STSServer();
- } catch (Exception e) {
- e.printStackTrace();
- }
+ setBus(new SpringBusFactory().createBus(
+ Arrays.stream(contexts).map(c -> getClass().getResource(c)).toArray(URL[]::new)));
}
- public void setContext(String context) {
- this.context = context;
- }
}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Server.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/StaxDoubleItServer.java
similarity index 56%
rename from services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Server.java
rename to services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/StaxDoubleItServer.java
index aba42ee..7fdaa72 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/bearer/Server.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/StaxDoubleItServer.java
@@ -16,31 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.cxf.systest.sts.bearer;
+package org.apache.cxf.systest.sts.deployment;
import java.net.URL;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Server extends AbstractBusTestServerBase {
-
- public Server() {
+public class StaxDoubleItServer extends DoubleItServer {
+ public StaxDoubleItServer(URL contexts) {
+ super(contexts);
}
- protected void run() {
- URL busFile = Server.class.getResource("cxf-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/StaxSTSServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/StaxSTSServer.java
index ddd57fa..3bbead4 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/StaxSTSServer.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/deployment/StaxSTSServer.java
@@ -18,35 +18,10 @@
*/
package org.apache.cxf.systest.sts.deployment;
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class StaxSTSServer extends AbstractBusTestServerBase {
-
- private String context;
-
- public StaxSTSServer() {
+public class StaxSTSServer extends STSServer {
+ public StaxSTSServer(String... contexts) {
+ super(contexts);
}
- protected void run() {
- URL busFile = StaxSTSServer.class.getResource(context);
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new StaxSTSServer();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public void setContext(String context) {
- this.context = context;
- }
}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/Intermediary.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/Intermediary.java
deleted file mode 100644
index 233daa5..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/Intermediary.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.intermediary_transformation;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Intermediary extends AbstractBusTestServerBase {
-
- public Intermediary() {
-
- }
-
- protected void run() {
- URL busFile = Intermediary.class.getResource("cxf-intermediary.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Intermediary();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryCaching.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryCaching.java
deleted file mode 100644
index d2b0d47..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryCaching.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.intermediary_transformation;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class IntermediaryCaching extends AbstractBusTestServerBase {
-
- public IntermediaryCaching() {
-
- }
-
- protected void run() {
- URL busFile = IntermediaryCaching.class.getResource("cxf-intermediary-caching.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new IntermediaryCaching();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryCachingPortTypeImpl.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryCachingPortTypeImpl.java
index c41b478..69ed3dd 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryCachingPortTypeImpl.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryCachingPortTypeImpl.java
@@ -30,7 +30,7 @@ import javax.xml.ws.Service;
import javax.xml.ws.WebServiceContext;
import org.apache.cxf.feature.Features;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
import org.apache.cxf.ws.security.trust.STSClient;
import org.apache.cxf.ws.security.trust.delegation.ReceivedTokenCallbackHandler;
@@ -42,7 +42,7 @@ import org.junit.Assert;
serviceName = "DoubleItService",
endpointInterface = "org.example.contract.doubleit.DoubleItPortType")
@Features(features = "org.apache.cxf.feature.LoggingFeature")
-public class IntermediaryCachingPortTypeImpl extends AbstractBusClientServerTestBase
+public class IntermediaryCachingPortTypeImpl extends AbstractClientServerTestBase
implements DoubleItPortType {
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryPortTypeImpl.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryPortTypeImpl.java
index a1a9e45..a3fbc60 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryPortTypeImpl.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryPortTypeImpl.java
@@ -30,7 +30,7 @@ import javax.xml.ws.Service;
import javax.xml.ws.WebServiceContext;
import org.apache.cxf.feature.Features;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
import org.apache.cxf.ws.security.trust.STSClient;
import org.example.contract.doubleit.DoubleItPortType;
@@ -41,7 +41,7 @@ import org.junit.Assert;
serviceName = "DoubleItService",
endpointInterface = "org.example.contract.doubleit.DoubleItPortType")
@Features(features = "org.apache.cxf.feature.LoggingFeature")
-public class IntermediaryPortTypeImpl extends AbstractBusClientServerTestBase implements DoubleItPortType {
+public class IntermediaryPortTypeImpl extends AbstractClientServerTestBase implements DoubleItPortType {
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationCachingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationCachingTest.java
index 64749bd..1349de2 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationCachingTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationCachingTest.java
@@ -25,10 +25,8 @@ import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
import javax.xml.ws.soap.SOAPFaultException;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
@@ -53,46 +51,26 @@ public class IntermediaryTransformationCachingTest extends AbstractBusClientServ
static final String STSPORT = allocatePort(STSServer.class);
static final String STSPORT2 = allocatePort(STSServer.class, 2);
- static final String PORT2 = allocatePort(Server.class, 2);
+ static final String PORT2 = allocatePort(DoubleItServer.class, 2);
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(IntermediaryCaching.class);
+ private static final String PORT = allocatePort(DoubleItServer.class);
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Intermediary failed to launch",
- // run the Intermediary in the same process
- // set this to false to fork
- launchServer(IntermediaryCaching.class, true)
+ assertTrue(launchServer(new DoubleItServer(
+ IntermediaryTransformationCachingTest.class.getResource("cxf-service.xml"),
+ IntermediaryTransformationCachingTest.class.getResource("cxf-intermediary-caching.xml")))
);
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server.class, true)
- );
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-transport.xml");
- assertTrue(launchServer(stsServer));
- }
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ assertTrue(launchServer(new STSServer("cxf-transport.xml")));
}
@org.junit.Test
public void testIntermediaryTransformationCaching() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = IntermediaryTransformationCachingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = IntermediaryTransformationCachingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -142,7 +120,6 @@ public class IntermediaryTransformationCachingTest extends AbstractBusClientServ
((java.io.Closeable)alicePort).close();
((java.io.Closeable)bobPort).close();
((java.io.Closeable)servicePort).close();
- bus.shutdown(true);
}
private static void doubleIt(DoubleItPortType port, int numToDouble) {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationTest.java
index f3fa8d2..a352478 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/IntermediaryTransformationTest.java
@@ -24,10 +24,8 @@ import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
@@ -52,46 +50,26 @@ public class IntermediaryTransformationTest extends AbstractBusClientServerTestB
static final String STSPORT = allocatePort(STSServer.class);
static final String STSPORT2 = allocatePort(STSServer.class, 2);
- static final String PORT2 = allocatePort(Server.class, 2);
+ static final String PORT2 = allocatePort(DoubleItServer.class, 2);
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(Intermediary.class);
+ private static final String PORT = allocatePort(DoubleItServer.class);
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Intermediary failed to launch",
- // run the Intermediary in the same process
- // set this to false to fork
- launchServer(Intermediary.class, true)
+ assertTrue(launchServer(new DoubleItServer(
+ IntermediaryTransformationTest.class.getResource("cxf-service.xml"),
+ IntermediaryTransformationTest.class.getResource("cxf-intermediary.xml")))
);
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server.class, true)
- );
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-transport.xml");
- assertTrue(launchServer(stsServer));
- }
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ assertTrue(launchServer(new STSServer("cxf-transport.xml")));
}
@org.junit.Test
public void testIntermediaryTransformation() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = IntermediaryTransformationTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = IntermediaryTransformationTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -106,18 +84,11 @@ public class IntermediaryTransformationTest extends AbstractBusClientServerTestB
doubleIt(transportPort, 25);
((java.io.Closeable)transportPort).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testIntermediaryTransformationBadClient() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = IntermediaryTransformationTest.class.getResource("cxf-bad-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-bad-client.xml").toString());
URL wsdl = IntermediaryTransformationTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -136,7 +107,6 @@ public class IntermediaryTransformationTest extends AbstractBusClientServerTestB
}
((java.io.Closeable)transportPort).close();
- bus.shutdown(true);
}
private static void doubleIt(DoubleItPortType port, int numToDouble) {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/Server.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/Server.java
deleted file mode 100644
index 24e4d12..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/intermediary_transformation/Server.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.intermediary_transformation;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Server extends AbstractBusTestServerBase {
-
- public Server() {
-
- }
-
- protected void run() {
- URL busFile = Server.class.getResource("cxf-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/Server.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/IssuerSTSServer.java
similarity index 65%
rename from services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/Server.java
rename to services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/IssuerSTSServer.java
index a80db75..d638b4b 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/Server.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/IssuerSTSServer.java
@@ -18,29 +18,13 @@
*/
package org.apache.cxf.systest.sts.issuer;
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-public class Server extends AbstractBusTestServerBase {
-
- public Server() {
-
- }
-
- protected void run() {
- URL busFile = Server.class.getResource("cxf-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
+public class IssuerSTSServer extends AbstractBusTestServerBase {
- try {
- new Server();
- } catch (Exception e) {
- e.printStackTrace();
- }
+ @Override
+ protected void run() {
+ setBus(new SpringBusFactory().createBus(getClass().getResource("cxf-issuer-sts-transport.xml")));
}
}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/IssuerTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/IssuerTest.java
index cf4e68b..57dc61d 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/IssuerTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/IssuerTest.java
@@ -18,16 +18,18 @@
*/
package org.apache.cxf.systest.sts.issuer;
-import java.io.IOException;
-import java.net.ServerSocket;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.InputStreamReader;
+import java.net.URI;
import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Paths;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.example.contract.doubleit.DoubleItPortType;
@@ -41,62 +43,44 @@ import static org.junit.Assert.assertTrue;
*/
public class IssuerTest extends AbstractBusClientServerTestBase {
+ static final String STSPORT = allocatePort(IssuerSTSServer.class);
+
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(Server.class);
+ private static final String PORT = allocatePort(DoubleItServer.class);
- // These tests require port numbers in the WSDLs and so we can't easily do variable substitution
- private static boolean portFree = true;
+ private static final String WSDL_FILTERED = "DoubleItFiltered.wsdl";
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server.class, true)
- );
-
- try {
- ServerSocket sock = new ServerSocket(30101);
- sock.close();
-
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(STSServer.class, true)
- );
- } catch (IOException ex) {
- portFree = false;
- // portFree is set to false + the test won't run
+ assertTrue(launchServer(new DoubleItServer(
+ IssuerTest.class.getResource("cxf-service.xml")
+ )));
+
+ assertTrue(launchServer(new IssuerSTSServer()));
+
+ try (
+ BufferedReader r = new BufferedReader(
+ new InputStreamReader(IssuerTest.class.getResourceAsStream("DoubleIt.wsdl")));
+ BufferedWriter w = Files.newBufferedWriter(Paths.get(URI.create(
+ IssuerTest.class.getResource("DoubleIt.wsdl").toString().replace("DoubleIt.wsdl", WSDL_FILTERED))))) {
+
+ String s;
+ while ((s = r.readLine()) != null) {
+ w.write(s.replace("${testutil.ports.IssuerSTSServer}", STSPORT));
+ }
}
}
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
- }
-
// In this test, the client uses the address defined in the <sp:Issuer> address in the policy
// of the service provider to contact the STS. The client is configured with the STS's service
// Policy. Useful if you want a simple way to avoid hardcoding the STS host/port in the client.
@org.junit.Test
public void testSAML1Issuer() throws Exception {
+ createBus(getClass().getResource("cxf-client.xml").toString());
- if (!portFree) {
- return;
- }
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = IssuerTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
-
- URL wsdl = IssuerTest.class.getResource("DoubleIt.wsdl");
+ URL wsdl = IssuerTest.class.getResource(WSDL_FILTERED);
Service service = Service.create(wsdl, SERVICE_QNAME);
QName portQName = new QName(NAMESPACE, "DoubleItTransportSAML1Port");
DoubleItPortType transportSaml1Port =
@@ -106,25 +90,14 @@ public class IssuerTest extends AbstractBusClientServerTestBase {
doubleIt(transportSaml1Port, 25);
((java.io.Closeable)transportSaml1Port).close();
- bus.shutdown(true);
}
// Test getting the STS details via WS-MEX
@org.junit.Test
public void testSAML2MEX() throws Exception {
+ createBus(getClass().getResource("cxf-client.xml").toString());
- if (!portFree) {
- return;
- }
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = IssuerTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
-
- URL wsdl = IssuerTest.class.getResource("DoubleIt.wsdl");
+ URL wsdl = IssuerTest.class.getResource(WSDL_FILTERED);
Service service = Service.create(wsdl, SERVICE_QNAME);
QName portQName = new QName(NAMESPACE, "DoubleItTransportSAML2Port");
DoubleItPortType transportSaml2Port =
@@ -134,25 +107,14 @@ public class IssuerTest extends AbstractBusClientServerTestBase {
doubleIt(transportSaml2Port, 25);
((java.io.Closeable)transportSaml2Port).close();
- bus.shutdown(true);
}
// Test getting the STS details via WS-MEX + SOAP 1.2
@org.junit.Test
public void testSAML2MEXSoap12() throws Exception {
+ createBus(getClass().getResource("cxf-client.xml").toString());
- if (!portFree) {
- return;
- }
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = IssuerTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
-
- URL wsdl = IssuerTest.class.getResource("DoubleIt.wsdl");
+ URL wsdl = IssuerTest.class.getResource(WSDL_FILTERED);
Service service = Service.create(wsdl, SERVICE_QNAME);
QName portQName = new QName(NAMESPACE, "DoubleItTransportSAML2Soap12Port");
DoubleItPortType transportSaml2Port =
@@ -162,7 +124,6 @@ public class IssuerTest extends AbstractBusClientServerTestBase {
doubleIt(transportSaml2Port, 25);
((java.io.Closeable)transportSaml2Port).close();
- bus.shutdown(true);
}
private static void doubleIt(DoubleItPortType port, int numToDouble) {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/STSServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/STSServer.java
deleted file mode 100644
index 9266418..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issuer/STSServer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.issuer;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class STSServer extends AbstractBusTestServerBase {
-
- public STSServer() {
-
- }
-
- protected void run() {
- URL busFile = STSServer.class.getResource("cxf-issuer-sts-transport.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new STSServer();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
index 0d0577c..0540a10 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/issueunit/IssueUnitTest.java
@@ -18,7 +18,6 @@
*/
package org.apache.cxf.systest.sts.issueunit;
-import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -31,9 +30,7 @@ import javax.xml.namespace.QName;
import org.w3c.dom.Element;
import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
import org.apache.cxf.binding.soap.SoapBindingConstants;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.helpers.DOMUtils;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.apache.cxf.jaxws.context.WrappedMessageContext;
@@ -100,25 +97,12 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
@BeforeClass
public static void startServers() throws Exception {
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-transport.xml");
- assertTrue(launchServer(stsServer));
- }
-
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ assertTrue(launchServer(new STSServer("cxf-transport.xml")));
}
@org.junit.Test
public void testRetrieveWSMEX() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = IssueUnitTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
// Get Metadata
JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
@@ -144,12 +128,7 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
*/
@org.junit.Test
public void testSymmetricKeySaml1() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = IssueUnitTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
// Get a token
SecurityToken token =
@@ -176,8 +155,6 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
assertTrue(OpenSAMLUtil.isMethodHolderOfKey(confirmMethod));
SAMLKeyInfo subjectKeyInfo = assertion.getSubjectKeyInfo();
assertNotNull(subjectKeyInfo.getSecret());
-
- bus.shutdown(true);
}
/**
@@ -185,12 +162,7 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
*/
@org.junit.Test
public void testPublicKeySaml2() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = IssueUnitTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
// Get a token
SecurityToken token =
@@ -216,8 +188,6 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
assertTrue(OpenSAMLUtil.isMethodHolderOfKey(confirmMethod));
SAMLKeyInfo subjectKeyInfo = assertion.getSubjectKeyInfo();
assertNotNull(subjectKeyInfo.getCerts());
-
- bus.shutdown(true);
}
/**
@@ -225,12 +195,7 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
*/
@org.junit.Test
public void testBearerSaml1() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = IssueUnitTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
// Get a token
SecurityToken token =
@@ -253,8 +218,6 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
confirmMethod = methods.get(0);
}
assertTrue(confirmMethod != null && confirmMethod.contains("bearer"));
-
- bus.shutdown(true);
}
/**
@@ -262,12 +225,7 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
*/
@org.junit.Test
public void testBearerSVSaml2() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = IssueUnitTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
// Get a token
SecurityToken token =
@@ -292,8 +250,6 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
confirmMethod = methods.get(0);
}
assertNotNull(confirmMethod);
-
- bus.shutdown(true);
}
/**
@@ -301,12 +257,7 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
*/
@org.junit.Test
public void testNoAppliesTo() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = IssueUnitTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
try {
requestSecurityToken(SAML1_TOKEN_TYPE, BEARER_KEYTYPE, bus, null);
@@ -314,8 +265,6 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
} catch (Exception ex) {
// expected
}
-
- bus.shutdown(true);
}
/**
@@ -323,12 +272,7 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
*/
@org.junit.Test
public void testBearerSaml1Context() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = IssueUnitTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
// Get a token
String context = "AuthenticationContext";
@@ -352,8 +296,6 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
confirmMethod = methods.get(0);
}
assertTrue(confirmMethod != null && confirmMethod.contains("bearer"));
-
- bus.shutdown(true);
}
/**
@@ -361,12 +303,7 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
*/
@org.junit.Test
public void testBearerSaml1Lifetime() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = IssueUnitTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
// Get a token
SecurityToken token =
@@ -390,17 +327,11 @@ public class IssueUnitTest extends AbstractBusClientServerTestBase {
}
assertTrue(confirmMethod != null && confirmMethod.contains("bearer"));
- bus.shutdown(true);
}
@org.junit.Test
public void testSAMLinWSSecToOtherRealm() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = IssueUnitTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
Crypto crypto = CryptoFactory.getInstance(getEncryptionProperties());
CallbackHandler callbackHandler = new CommonCallbackHandler();
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/JAASTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/JAASTest.java
index 4d923c0..efde6e4 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/JAASTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/JAASTest.java
@@ -25,10 +25,8 @@ import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.jaxrs.client.WebClient;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
@@ -56,43 +54,22 @@ public class JAASTest extends AbstractBusClientServerTestBase {
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(Server.class);
- private static final String PORT2 = allocatePort(Server2.class);
+ private static final String PORT = allocatePort(DoubleItServer.class);
+ private static final String PORT2 = allocatePort(DoubleItServer.class, 2);
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server.class, true)
- );
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server2.class, true)
- );
-
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-transport.xml");
- assertTrue(launchServer(stsServer));
- }
+ assertTrue(launchServer(new DoubleItServer(
+ JAASTest.class.getResource("cxf-service.xml"),
+ JAASTest.class.getResource("cxf-service2.xml")
+ )));
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ assertTrue(launchServer(new STSServer("cxf-transport.xml")));
}
@org.junit.Test
public void testSuccessfulInvocation() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = JAASTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = JAASTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -112,18 +89,11 @@ public class JAASTest extends AbstractBusClientServerTestBase {
doubleIt(utPort, 35);
((java.io.Closeable)utPort).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testSuccessfulInvocationWithProperties() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = JAASTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = JAASTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -143,18 +113,11 @@ public class JAASTest extends AbstractBusClientServerTestBase {
doubleIt(utPort, 35);
((java.io.Closeable)utPort).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testUnsuccessfulAuthentication() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = JAASTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = JAASTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -176,18 +139,11 @@ public class JAASTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)utPort).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testUnsuccessfulAuthorization() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = JAASTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = JAASTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -209,18 +165,11 @@ public class JAASTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)utPort).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testSuccessfulPassthroughInvocation() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = JAASTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = JAASTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -240,18 +189,11 @@ public class JAASTest extends AbstractBusClientServerTestBase {
doubleIt(utPort, 35);
((java.io.Closeable)utPort).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testUnsuccessfulAuthenticationPassthroughInvocation() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = JAASTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = JAASTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -273,18 +215,11 @@ public class JAASTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)utPort).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testUnsuccessfulAuthorizationPassthroughInvocation() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = JAASTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = JAASTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -306,21 +241,13 @@ public class JAASTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)utPort).close();
- bus.shutdown(true);
}
// Here the service config has no TLS settings for the call to the STS...it's configured
// separately via the JAAS configuration
@org.junit.Test
- @org.junit.Ignore
public void testSuccessfulInvocationConfig() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = JAASTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = JAASTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -337,7 +264,6 @@ public class JAASTest extends AbstractBusClientServerTestBase {
doubleIt(utPort, 25);
((java.io.Closeable)utPort).close();
- bus.shutdown(true);
}
@org.junit.Test
@@ -393,7 +319,7 @@ public class JAASTest extends AbstractBusClientServerTestBase {
final String configLocation = "org/apache/cxf/systest/sts/jaas/cxf-client.xml";
final int numToDouble = 25;
- WebClient client = null;
+ final WebClient client;
if (username != null && password != null) {
client = WebClient.create(address, username, password, configLocation);
} else {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/Server2.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/Server2.java
deleted file mode 100644
index 910ddb05..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/jaas/Server2.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.jaas;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Server2 extends AbstractBusTestServerBase {
-
- public Server2() {
-
- }
-
- protected void run() {
- URL busFile = Server2.class.getResource("cxf-service2.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server2();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Intermediary.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Intermediary.java
deleted file mode 100644
index 848ddd7..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Intermediary.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.sendervouches;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Intermediary extends AbstractBusTestServerBase {
-
- public Intermediary() {
-
- }
-
- protected void run() {
- URL busFile = Intermediary.class.getResource("cxf-intermediary.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Intermediary();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/SenderVouchesTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/SenderVouchesTest.java
index 9bae6a9..b1c7d3a 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/SenderVouchesTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/SenderVouchesTest.java
@@ -19,17 +19,14 @@
package org.apache.cxf.systest.sts.sendervouches;
import java.net.URL;
-import java.util.Arrays;
-import java.util.Collection;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TestParam;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
+import org.apache.cxf.systest.sts.deployment.StaxDoubleItServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.example.contract.doubleit.DoubleItPortType;
@@ -48,14 +45,14 @@ import static org.junit.Assert.assertTrue;
@RunWith(value = org.junit.runners.Parameterized.class)
public class SenderVouchesTest extends AbstractBusClientServerTestBase {
- static final String PORT2 = allocatePort(Server.class, 2);
- static final String STAX_PORT2 = allocatePort(StaxServer.class, 2);
+ static final String PORT2 = allocatePort(DoubleItServer.class, 2);
+ static final String STAX_PORT2 = allocatePort(StaxDoubleItServer.class, 2);
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(Intermediary.class);
- private static final String STAX_PORT = allocatePort(StaxIntermediary.class);
+ private static final String PORT = allocatePort(DoubleItServer.class);
+ private static final String STAX_PORT = allocatePort(StaxDoubleItServer.class);
final TestParam test;
@@ -65,56 +62,27 @@ public class SenderVouchesTest extends AbstractBusClientServerTestBase {
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server.class, true)
- );
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Intermediary.class, true)
- );
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(StaxServer.class, true)
- );
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(StaxIntermediary.class, true)
- );
+ assertTrue(launchServer(new DoubleItServer(
+ SenderVouchesTest.class.getResource("cxf-service.xml"),
+ SenderVouchesTest.class.getResource("cxf-stax-service.xml")
+ )));
+ assertTrue(launchServer(new DoubleItServer(
+ SenderVouchesTest.class.getResource("cxf-intermediary.xml"),
+ SenderVouchesTest.class.getResource("cxf-stax-intermediary.xml")
+ )));
}
@Parameters(name = "{0}")
- public static Collection<TestParam> data() {
-
- return Arrays.asList(new TestParam[] {new TestParam(PORT, false),
- new TestParam(PORT, true),
- new TestParam(STAX_PORT, false),
- new TestParam(STAX_PORT, true),
- });
- }
-
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ public static TestParam[] data() {
+ return new TestParam[] {new TestParam(PORT, false),
+ new TestParam(PORT, true),
+ new TestParam(STAX_PORT, false),
+ new TestParam(STAX_PORT, true),
+ };
}
-
@org.junit.Test
public void testSenderVouches() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SenderVouchesTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = SenderVouchesTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -130,7 +98,6 @@ public class SenderVouchesTest extends AbstractBusClientServerTestBase {
doubleIt(transportUTPort, 25);
((java.io.Closeable)transportUTPort).close();
- bus.shutdown(true);
}
private static void doubleIt(DoubleItPortType port, int numToDouble) {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Server.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Server.java
deleted file mode 100644
index 2611deb..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/Server.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.sendervouches;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Server extends AbstractBusTestServerBase {
-
- public Server() {
-
- }
-
- protected void run() {
- URL busFile = Server.class.getResource("cxf-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/StaxIntermediary.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/StaxIntermediary.java
deleted file mode 100644
index ba75fdd..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/StaxIntermediary.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.sendervouches;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class StaxIntermediary extends AbstractBusTestServerBase {
-
- public StaxIntermediary() {
-
- }
-
- protected void run() {
- URL busFile = StaxIntermediary.class.getResource("cxf-stax-intermediary.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new StaxIntermediary();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/StaxServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/StaxServer.java
deleted file mode 100644
index f2c276f..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/sendervouches/StaxServer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.sendervouches;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class StaxServer extends AbstractBusTestServerBase {
-
- public StaxServer() {
-
- }
-
- protected void run() {
- URL busFile = StaxServer.class.getResource("cxf-stax-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new StaxServer();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/AbstractSTSTokenTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/AbstractSTSTokenTest.java
index 42efdd6..74666f2 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/AbstractSTSTokenTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/AbstractSTSTokenTest.java
@@ -45,20 +45,19 @@ import org.apache.cxf.service.model.EndpointInfo;
import org.apache.cxf.service.model.ServiceInfo;
import org.apache.cxf.systest.sts.TLSClientParametersUtils;
import org.apache.cxf.systest.sts.deployment.STSServer;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractClientServerTestBase;
import org.apache.cxf.transport.https.SSLUtils;
import org.apache.cxf.ws.security.SecurityConstants;
import org.apache.cxf.ws.security.tokenstore.SecurityToken;
import org.apache.cxf.ws.security.trust.STSClient;
-import org.junit.AfterClass;
import org.junit.BeforeClass;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-public abstract class AbstractSTSTokenTest extends AbstractBusClientServerTestBase {
+public abstract class AbstractSTSTokenTest extends AbstractClientServerTestBase {
static final String STSPORT = allocatePort(STSServer.class);
static final String STSPORT2 = allocatePort(STSServer.class, 2);
@@ -81,18 +80,10 @@ public abstract class AbstractSTSTokenTest extends AbstractBusClientServerTestBa
@BeforeClass
public static void startServers() throws Exception {
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-transport.xml");
- assertTrue(launchServer(stsServer));
-
- stsServer = new STSServer();
- stsServer.setContext("cxf-x509.xml");
- assertTrue(launchServer(stsServer));
- }
-
- @AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ assertTrue(launchServer(new STSServer(
+ "cxf-transport.xml",
+ "cxf-x509.xml"
+ )));
}
static STSClient initStsClientAsymmeticBinding(Bus bus) {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSClientTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSClientTest.java
index 989bb4d..4bd89f7 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSClientTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/STSClientTest.java
@@ -23,9 +23,7 @@ import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.example.contract.doubleit.DoubleItPortType;
@@ -46,35 +44,19 @@ public class STSClientTest extends AbstractBusClientServerTestBase {
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(Server.class);
+ private static final String PORT = allocatePort(DoubleItServer.class);
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server.class, true)
- );
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-transport.xml");
- assertTrue(launchServer(stsServer));
- }
-
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ assertTrue(launchServer(new DoubleItServer(
+ STSClientTest.class.getResource("cxf-service.xml")
+ )));
+ assertTrue(launchServer(new STSServer("cxf-transport.xml")));
}
@org.junit.Test
public void testSTSClientName() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = STSClientTest.class.getResource("cxf-client-name.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client-name.xml").toString());
URL wsdl = STSClientTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -86,18 +68,11 @@ public class STSClientTest extends AbstractBusClientServerTestBase {
doubleIt(transportSaml1Port, 25);
((java.io.Closeable)transportSaml1Port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testDefaultSTSClient() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = STSClientTest.class.getResource("cxf-default-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-default-client.xml").toString());
URL wsdl = STSClientTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -109,7 +84,6 @@ public class STSClientTest extends AbstractBusClientServerTestBase {
doubleIt(transportSaml1Port, 25);
((java.io.Closeable)transportSaml1Port).close();
- bus.shutdown(true);
}
private static void doubleIt(DoubleItPortType port, int numToDouble) {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/Server.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/Server.java
deleted file mode 100644
index 802d631..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/stsclient/Server.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.stsclient;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Server extends AbstractBusTestServerBase {
-
- public Server() {
-
- }
-
- protected void run() {
- URL busFile = Server.class.getResource("cxf-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/Server.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/Server.java
deleted file mode 100644
index c387238..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/Server.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.symmetric;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Server extends AbstractBusTestServerBase {
-
- public Server() {
-
- }
-
- protected void run() {
- URL busFile = Server.class.getResource("cxf-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/StaxServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/StaxServer.java
deleted file mode 100644
index e415a74..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/StaxServer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.symmetric;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class StaxServer extends AbstractBusTestServerBase {
-
- public StaxServer() {
-
- }
-
- protected void run() {
- URL busFile = StaxServer.class.getResource("cxf-stax-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new StaxServer();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
index aae0e1b..2e5983a 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/symmetric/SymmetricBindingTest.java
@@ -19,8 +19,6 @@
package org.apache.cxf.systest.sts.symmetric;
import java.net.URL;
-import java.util.Arrays;
-import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
@@ -38,14 +36,14 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.jaxws.DispatchImpl;
import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TestParam;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.systest.sts.deployment.STSServer;
+import org.apache.cxf.systest.sts.deployment.StaxDoubleItServer;
import org.apache.cxf.systest.sts.deployment.StaxSTSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
@@ -77,8 +75,8 @@ public class SymmetricBindingTest extends AbstractBusClientServerTestBase {
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(Server.class);
- private static final String STAX_PORT = allocatePort(StaxServer.class);
+ private static final String PORT = allocatePort(DoubleItServer.class);
+ private static final String STAX_PORT = allocatePort(StaxDoubleItServer.class);
final TestParam test;
@@ -88,63 +86,36 @@ public class SymmetricBindingTest extends AbstractBusClientServerTestBase {
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server.class, true)
+ assertTrue(launchServer(new DoubleItServer(
+ SymmetricBindingTest.class.getResource("cxf-service.xml"),
+ SymmetricBindingTest.class.getResource("cxf-stax-service.xml")))
);
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(StaxServer.class, true)
- );
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-ut.xml");
- assertTrue(launchServer(stsServer));
-
- stsServer = new STSServer();
- stsServer.setContext("cxf-ut-encrypted.xml");
- assertTrue(launchServer(stsServer));
-
- StaxSTSServer staxStsServer = new StaxSTSServer();
- staxStsServer.setContext("stax-cxf-ut.xml");
- assertTrue(launchServer(staxStsServer));
- staxStsServer = new StaxSTSServer();
- staxStsServer.setContext("stax-cxf-ut-encrypted.xml");
- assertTrue(launchServer(staxStsServer));
+ assertTrue(launchServer(new STSServer(
+ "cxf-ut.xml",
+ "stax-cxf-ut.xml")));
+ assertTrue(launchServer(new STSServer(
+ "cxf-ut-encrypted.xml",
+ "stax-cxf-ut-encrypted.xml")));
}
@Parameters(name = "{0}")
- public static Collection<TestParam> data() {
-
- return Arrays.asList(new TestParam[] {new TestParam(PORT, false, STSPORT2),
- new TestParam(PORT, true, STSPORT2),
- new TestParam(STAX_PORT, false, STSPORT2),
- new TestParam(STAX_PORT, true, STSPORT2),
-
- new TestParam(PORT, false, STAX_STSPORT2),
- new TestParam(PORT, true, STAX_STSPORT2),
- new TestParam(STAX_PORT, false, STAX_STSPORT2),
- new TestParam(STAX_PORT, true, STAX_STSPORT2),
- });
- }
-
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ public static TestParam[] data() {
+ return new TestParam[] {new TestParam(PORT, false, STSPORT2),
+ new TestParam(PORT, true, STSPORT2),
+ new TestParam(STAX_PORT, false, STSPORT2),
+ new TestParam(STAX_PORT, true, STSPORT2),
+
+ new TestParam(PORT, false, STAX_STSPORT2),
+ new TestParam(PORT, true, STAX_STSPORT2),
+ new TestParam(STAX_PORT, false, STAX_STSPORT2),
+ new TestParam(STAX_PORT, true, STAX_STSPORT2),
+ };
}
@org.junit.Test
public void testUsernameTokenSAML1() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -163,18 +134,11 @@ public class SymmetricBindingTest extends AbstractBusClientServerTestBase {
TokenTestUtils.verifyToken(symmetricSaml1Port);
((java.io.Closeable)symmetricSaml1Port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testUsernameTokenSAML2() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -193,7 +157,6 @@ public class SymmetricBindingTest extends AbstractBusClientServerTestBase {
TokenTestUtils.verifyToken(symmetricSaml2Port);
((java.io.Closeable)symmetricSaml2Port).close();
- bus.shutdown(true);
}
@org.junit.Test
@@ -203,12 +166,7 @@ public class SymmetricBindingTest extends AbstractBusClientServerTestBase {
// We don't support ProtectTokens + the streaming clients.
return;
}
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -227,17 +185,11 @@ public class SymmetricBindingTest extends AbstractBusClientServerTestBase {
TokenTestUtils.verifyToken(symmetricSaml2Port);
((java.io.Closeable)symmetricSaml2Port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testUsernameTokenSAML1Encrypted() throws Exception {
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -255,18 +207,11 @@ public class SymmetricBindingTest extends AbstractBusClientServerTestBase {
doubleIt(symmetricSaml1Port, 25);
((java.io.Closeable)symmetricSaml1Port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testUsernameTokenSAML2SecureConversation() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -284,18 +229,11 @@ public class SymmetricBindingTest extends AbstractBusClientServerTestBase {
doubleIt(symmetricSaml2Port, 30);
((java.io.Closeable)symmetricSaml2Port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testUsernameTokenSAML2Dispatch() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -324,19 +262,11 @@ public class SymmetricBindingTest extends AbstractBusClientServerTestBase {
DOMSource response = dispatch.invoke(request);
assertNotNull(response);
-
- bus.shutdown(true);
}
@org.junit.Test
public void testUsernameTokenSAML1Dispatch() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = SymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -367,8 +297,6 @@ public class SymmetricBindingTest extends AbstractBusClientServerTestBase {
DOMSource response = dispatch.invoke(request);
assertNotNull(response);
-
- bus.shutdown(true);
}
private DOMSource createDOMRequest() throws ParserConfigurationException {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/Server.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/Server.java
deleted file mode 100644
index bc39447..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/Server.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.template;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Server extends AbstractBusTestServerBase {
-
- public Server() {
-
- }
-
- protected void run() {
- URL busFile = Server.class.getResource("cxf-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/StaxServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/StaxServer.java
deleted file mode 100644
index 18818af..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/StaxServer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.template;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class StaxServer extends AbstractBusTestServerBase {
-
- public StaxServer() {
-
- }
-
- protected void run() {
- URL busFile = StaxServer.class.getResource("cxf-stax-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new StaxServer();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/TemplateTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/TemplateTest.java
index 2396843..2fa0a9f 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/TemplateTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/template/TemplateTest.java
@@ -19,8 +19,6 @@
package org.apache.cxf.systest.sts.template;
import java.net.URL;
-import java.util.Arrays;
-import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
@@ -29,11 +27,11 @@ import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TestParam;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.systest.sts.deployment.STSServer;
+import org.apache.cxf.systest.sts.deployment.StaxDoubleItServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
import org.apache.cxf.ws.security.trust.STSClient;
@@ -60,8 +58,8 @@ public class TemplateTest extends AbstractBusClientServerTestBase {
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(Server.class);
- private static final String STAX_PORT = allocatePort(StaxServer.class);
+ private static final String PORT = allocatePort(DoubleItServer.class);
+ private static final String STAX_PORT = allocatePort(StaxDoubleItServer.class);
final TestParam test;
@@ -71,46 +69,23 @@ public class TemplateTest extends AbstractBusClientServerTestBase {
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server.class, true)
+ assertTrue(launchServer(new DoubleItServer(
+ TemplateTest.class.getResource("cxf-service.xml"),
+ TemplateTest.class.getResource("cxf-stax-service.xml")))
);
-
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(StaxServer.class, true)
- );
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-transport.xml");
- assertTrue(launchServer(stsServer));
+ assertTrue(launchServer(new STSServer("cxf-transport.xml")));
}
@Parameters(name = "{0}")
- public static Collection<TestParam> data() {
-
- return Arrays.asList(new TestParam[] {new TestParam(PORT, false, STSPORT),
- new TestParam(STAX_PORT, false, STSPORT),
- });
- }
-
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ public static TestParam[] data() {
+ return new TestParam[] {new TestParam(PORT, false, STSPORT),
+ new TestParam(STAX_PORT, false, STSPORT),
+ };
}
@org.junit.Test
public void testSAML1PublicKey() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TemplateTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = TemplateTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -135,18 +110,11 @@ public class TemplateTest extends AbstractBusClientServerTestBase {
doubleIt(port, 25);
((java.io.Closeable)port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testSendSAML2ToSAML1PublicKey() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TemplateTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = TemplateTest.class.getResource("DoubleItNoTemplate.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -178,18 +146,11 @@ public class TemplateTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testSendBearerToSAML1PublicKey() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TemplateTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = TemplateTest.class.getResource("DoubleItNoTemplate2.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -222,18 +183,11 @@ public class TemplateTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testSendSAML2PublicKey() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TemplateTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = TemplateTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -258,18 +212,11 @@ public class TemplateTest extends AbstractBusClientServerTestBase {
doubleIt(port, 25);
((java.io.Closeable)port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testSendSAML1ToSAML2PublicKey() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TemplateTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = TemplateTest.class.getResource("DoubleItNoTemplate.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -301,18 +248,11 @@ public class TemplateTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testBearerToSAML2PublicKey() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TemplateTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = TemplateTest.class.getResource("DoubleItNoTemplate2.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -344,7 +284,6 @@ public class TemplateTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)port).close();
- bus.shutdown(true);
}
private STSClient createSTSClient(Bus bus) {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/Server.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/Server.java
deleted file mode 100644
index a028ae7..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/Server.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.transport;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Server extends AbstractBusTestServerBase {
-
- public Server() {
-
- }
-
- protected void run() {
- URL busFile = Server.class.getResource("cxf-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/StaxServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/StaxServer.java
deleted file mode 100644
index 229cbe0..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/StaxServer.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.transport;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class StaxServer extends AbstractBusTestServerBase {
-
- public StaxServer() {
-
- }
-
- protected void run() {
- URL busFile = StaxServer.class.getResource("cxf-stax-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new StaxServer();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java
index ca2818b..ec2acdc 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/transport/TransportBindingTest.java
@@ -19,8 +19,6 @@
package org.apache.cxf.systest.sts.transport;
import java.net.URL;
-import java.util.Arrays;
-import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
@@ -38,7 +36,6 @@ import org.w3c.dom.Element;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.configuration.jsse.TLSClientParameters;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.frontend.ClientProxy;
@@ -47,7 +44,9 @@ import org.apache.cxf.systest.sts.TLSClientParametersUtils;
import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TestParam;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.systest.sts.deployment.STSServer;
+import org.apache.cxf.systest.sts.deployment.StaxDoubleItServer;
import org.apache.cxf.systest.sts.deployment.StaxSTSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.transport.http.HTTPConduit;
@@ -80,8 +79,8 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(Server.class);
- private static final String STAX_PORT = allocatePort(StaxServer.class);
+ private static final String PORT = allocatePort(DoubleItServer.class);
+ private static final String STAX_PORT = allocatePort(StaxDoubleItServer.class);
final TestParam test;
@@ -91,56 +90,33 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server.class, true)
+ assertTrue(launchServer(new DoubleItServer(
+ TransportBindingTest.class.getResource("cxf-service.xml"),
+ TransportBindingTest.class.getResource("cxf-stax-service.xml")))
);
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(StaxServer.class, true)
- );
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-transport.xml");
- assertTrue(launchServer(stsServer));
-
- StaxSTSServer staxStsServer = new StaxSTSServer();
- staxStsServer.setContext("stax-cxf-transport.xml");
- assertTrue(launchServer(staxStsServer));
+ assertTrue(launchServer(new STSServer(
+ "cxf-transport.xml",
+ "stax-cxf-transport.xml"
+ )));
}
@Parameters(name = "{0}")
- public static Collection<TestParam> data() {
-
- return Arrays.asList(new TestParam[] {new TestParam(PORT, false, STSPORT),
- new TestParam(PORT, true, STSPORT),
- new TestParam(STAX_PORT, false, STSPORT),
- new TestParam(STAX_PORT, true, STSPORT),
-
- new TestParam(PORT, false, STAX_STSPORT),
- new TestParam(PORT, true, STAX_STSPORT),
- new TestParam(STAX_PORT, false, STAX_STSPORT),
- new TestParam(STAX_PORT, true, STAX_STSPORT),
- });
- }
-
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ public static TestParam[] data() {
+ return new TestParam[] {new TestParam(PORT, false, STSPORT),
+ new TestParam(PORT, true, STSPORT),
+ new TestParam(STAX_PORT, false, STSPORT),
+ new TestParam(STAX_PORT, true, STSPORT),
+
+ new TestParam(PORT, false, STAX_STSPORT),
+ new TestParam(PORT, true, STAX_STSPORT),
+ new TestParam(STAX_PORT, false, STAX_STSPORT),
+ new TestParam(STAX_PORT, true, STAX_STSPORT),
+ };
}
@org.junit.Test
public void testSAML1() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TransportBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = TransportBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -158,18 +134,11 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
doubleIt(transportSaml1Port, 25);
((java.io.Closeable)transportSaml1Port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testSAML2() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TransportBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = TransportBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -187,7 +156,6 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
doubleIt(transportSaml2Port, 25);
((java.io.Closeable)transportSaml2Port).close();
- bus.shutdown(true);
}
@org.junit.Test
@@ -252,13 +220,7 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
*/
@org.junit.Test
public void testUnknownClient() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TransportBindingTest.class.getResource("cxf-bad-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-bad-client.xml").toString());
URL wsdl = TransportBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -281,18 +243,11 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)transportSaml1Port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testSAML1Endorsing() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TransportBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = TransportBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -310,7 +265,6 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
doubleIt(transportSaml1Port, 25);
((java.io.Closeable)transportSaml1Port).close();
- bus.shutdown(true);
}
/**
@@ -320,13 +274,7 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
*/
@org.junit.Test
public void testUnknownAddress() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TransportBindingTest.class.getResource("cxf-bad-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-bad-client.xml").toString());
URL wsdl = TransportBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -349,7 +297,6 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)transportSaml1Port).close();
- bus.shutdown(true);
}
@org.junit.Test
@@ -360,12 +307,7 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
System.setProperty("https.protocols", "TLSv1");
}
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TransportBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = TransportBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -395,8 +337,6 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
DOMSource response = dispatch.invoke(request);
assertNotNull(response);
-
- bus.shutdown(true);
}
@org.junit.Test
@@ -407,12 +347,7 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
System.setProperty("https.protocols", "TLSv1");
}
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TransportBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = TransportBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -443,8 +378,6 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
DOMSource response = dispatch.invoke(request);
assertNotNull(response);
-
- bus.shutdown(true);
}
@org.junit.Test
@@ -455,12 +388,7 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
return;
}
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TransportBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = TransportBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -478,18 +406,11 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
doubleIt(transportSaml1Port, 25);
((java.io.Closeable)transportSaml1Port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testSAML2SymmetricEndorsing() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TransportBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = TransportBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -507,7 +428,6 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
doubleIt(transportSaml1Port, 25);
((java.io.Closeable)transportSaml1Port).close();
- bus.shutdown(true);
}
@org.junit.Test
@@ -518,12 +438,7 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
return;
}
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = TransportBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = TransportBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -541,7 +456,6 @@ public class TransportBindingTest extends AbstractBusClientServerTestBase {
doubleIt(transportSaml1Port, 25);
((java.io.Closeable)transportSaml1Port).close();
- bus.shutdown(true);
}
private DOMSource createDOMRequest() throws ParserConfigurationException {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/Server.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/Server.java
deleted file mode 100644
index 1ba8084..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/Server.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.username_actas;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Server extends AbstractBusTestServerBase {
-
- public Server() {
-
- }
-
- protected void run() {
- URL busFile = Server.class.getResource("cxf-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/Server2.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/Server2.java
deleted file mode 100644
index e261df8..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/Server2.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.username_actas;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Server2 extends AbstractBusTestServerBase {
-
- public Server2() {
-
- }
-
- protected void run() {
- URL busFile = Server2.class.getResource("cxf-service2.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server2();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsCachingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsCachingTest.java
index a1646e8..2039d20 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsCachingTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsCachingTest.java
@@ -24,12 +24,10 @@ import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
-import org.apache.cxf.Bus;
import org.apache.cxf.BusException;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.endpoint.EndpointException;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
@@ -60,24 +58,14 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(Server.class);
+ private static final String PORT = allocatePort(DoubleItServer.class);
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server.class, true)
- );
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-x509.xml");
- assertTrue(launchServer(stsServer));
- }
-
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ assertTrue(launchServer(new DoubleItServer(
+ UsernameActAsCachingTest.class.getResource("cxf-service.xml")
+ )));
+ assertTrue(launchServer(new STSServer("cxf-x509.xml")));
}
/**
@@ -85,13 +73,7 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
*/
@org.junit.Test
public void testUsernameActAsCaching() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = UsernameActAsCachingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = UsernameActAsCachingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -163,7 +145,6 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)port).close();
- bus.shutdown(true);
}
/**
@@ -171,13 +152,7 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
*/
@org.junit.Test
public void testDifferentUsersCaching() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = UsernameActAsCachingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = UsernameActAsCachingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -253,7 +228,6 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)port).close();
- bus.shutdown(true);
}
/**
@@ -261,13 +235,7 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
*/
@org.junit.Test
public void testAppliesToCaching() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = UsernameActAsCachingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = UsernameActAsCachingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -344,7 +312,6 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)port).close();
- bus.shutdown(true);
}
/**
@@ -352,13 +319,7 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
*/
@org.junit.Test
public void testNoAppliesToCaching() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = UsernameActAsCachingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = UsernameActAsCachingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -406,7 +367,6 @@ public class UsernameActAsCachingTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)port).close();
- bus.shutdown(true);
}
private void clearSTSClient(BindingProvider p) throws BusException, EndpointException {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
index 80225db..261a2e4 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
@@ -19,20 +19,16 @@
package org.apache.cxf.systest.sts.username_actas;
import java.net.URL;
-import java.util.Arrays;
-import java.util.Collection;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.rt.security.SecurityConstants;
import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TestParam;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.systest.sts.deployment.StaxSTSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -64,7 +60,7 @@ public class UsernameActAsTest extends AbstractBusClientServerTestBase {
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(Server2.class);
+ private static final String PORT = allocatePort(DoubleItServer.class, 2);
final TestParam test;
@@ -74,45 +70,27 @@ public class UsernameActAsTest extends AbstractBusClientServerTestBase {
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server2.class, true)
- );
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-x509.xml");
- assertTrue(launchServer(stsServer));
-
- StaxSTSServer staxStsServer = new StaxSTSServer();
- staxStsServer.setContext("stax-cxf-x509.xml");
- assertTrue(launchServer(staxStsServer));
+ assertTrue(launchServer(new DoubleItServer(
+ UsernameActAsTest.class.getResource("cxf-service2.xml")
+ )));
+ assertTrue(launchServer(new STSServer(
+ "cxf-x509.xml",
+ "stax-cxf-x509.xml"
+ )));
}
@Parameters(name = "{0}")
- public static Collection<TestParam> data() {
-
- return Arrays.asList(new TestParam[] {new TestParam(PORT, false, STSPORT2),
- new TestParam(PORT, true, STSPORT2),
- new TestParam(PORT, false, STAX_STSPORT2),
- new TestParam(PORT, true, STAX_STSPORT2),
- });
- }
-
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ public static TestParam[] data() {
+ return new TestParam[] {new TestParam(PORT, false, STSPORT2),
+ new TestParam(PORT, true, STSPORT2),
+ new TestParam(PORT, false, STAX_STSPORT2),
+ new TestParam(PORT, true, STAX_STSPORT2),
+ };
}
@org.junit.Test
public void testUsernameActAs() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = UsernameActAsTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = UsernameActAsTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -160,7 +138,6 @@ public class UsernameActAsTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)port2).close();
- bus.shutdown(true);
}
private static void doubleIt(DoubleItPortType port, int numToDouble) {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/Server.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/Server.java
deleted file mode 100644
index 3209eba..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/Server.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.username_onbehalfof;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Server extends AbstractBusTestServerBase {
-
- public Server() {
-
- }
-
- protected void run() {
- URL busFile = Server.class.getResource("cxf-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/Server2.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/Server2.java
deleted file mode 100644
index 39b7930..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/Server2.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.username_onbehalfof;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Server2 extends AbstractBusTestServerBase {
-
- public Server2() {
-
- }
-
- protected void run() {
- URL busFile = Server2.class.getResource("cxf-service2.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server2();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfCachingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfCachingTest.java
index b5ddd85..4ac0de6 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfCachingTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfCachingTest.java
@@ -24,12 +24,10 @@ import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
-import org.apache.cxf.Bus;
import org.apache.cxf.BusException;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.endpoint.EndpointException;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.apache.cxf.ws.security.SecurityConstants;
@@ -59,24 +57,16 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(Server.class);
+ private static final String PORT = allocatePort(DoubleItServer.class);
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server.class, true)
- );
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-x509.xml");
- assertTrue(launchServer(stsServer));
- }
-
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ assertTrue(launchServer(new DoubleItServer(
+ UsernameOnBehalfOfCachingTest.class.getResource("cxf-service.xml")
+ )));
+ assertTrue(launchServer(new STSServer(
+ "cxf-x509.xml"
+ )));
}
/**
@@ -84,13 +74,7 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
*/
@org.junit.Test
public void testUsernameOnBehalfOfCaching() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = UsernameOnBehalfOfCachingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = UsernameOnBehalfOfCachingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -163,7 +147,6 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
}
((java.io.Closeable)port2).close();
- bus.shutdown(true);
}
/**
@@ -171,13 +154,7 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
*/
@org.junit.Test
public void testDifferentUsersCaching() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = UsernameOnBehalfOfCachingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = UsernameOnBehalfOfCachingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -253,7 +230,6 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
}
((java.io.Closeable)port).close();
- bus.shutdown(true);
}
/**
@@ -261,13 +237,7 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
*/
@org.junit.Test
public void testAppliesToCaching() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = UsernameOnBehalfOfCachingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = UsernameOnBehalfOfCachingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -344,7 +314,6 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
}
((java.io.Closeable)port).close();
- bus.shutdown(true);
}
/**
@@ -352,13 +321,7 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
*/
@org.junit.Test
public void testNoAppliesToCaching() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = UsernameOnBehalfOfCachingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = UsernameOnBehalfOfCachingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -406,7 +369,6 @@ public class UsernameOnBehalfOfCachingTest extends AbstractBusClientServerTestBa
}
((java.io.Closeable)port).close();
- bus.shutdown(true);
}
private void clearSTSClient(BindingProvider p) throws BusException, EndpointException {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
index 853a169..15ba45f 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
@@ -19,20 +19,16 @@
package org.apache.cxf.systest.sts.username_onbehalfof;
import java.net.URL;
-import java.util.Arrays;
-import java.util.Collection;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.rt.security.SecurityConstants;
import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TestParam;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.systest.sts.deployment.StaxSTSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
@@ -63,7 +59,7 @@ public class UsernameOnBehalfOfTest extends AbstractBusClientServerTestBase {
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(Server2.class);
+ private static final String PORT = allocatePort(DoubleItServer.class, 2);
final TestParam test;
@@ -73,46 +69,28 @@ public class UsernameOnBehalfOfTest extends AbstractBusClientServerTestBase {
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server2.class, true)
- );
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-x509.xml");
- assertTrue(launchServer(stsServer));
-
- StaxSTSServer staxStsServer = new StaxSTSServer();
- staxStsServer.setContext("stax-cxf-x509.xml");
- assertTrue(launchServer(staxStsServer));
+ assertTrue(launchServer(new DoubleItServer(
+ UsernameOnBehalfOfTest.class.getResource("cxf-service2.xml")
+ )));
+ assertTrue(launchServer(new STSServer(
+ "cxf-x509.xml",
+ "stax-cxf-x509.xml"
+ )));
}
@Parameters(name = "{0}")
- public static Collection<TestParam> data() {
+ public static TestParam[] data() {
+ return new TestParam[] {new TestParam(PORT, false, STSPORT2),
+ new TestParam(PORT, true, STSPORT2),
- return Arrays.asList(new TestParam[] {new TestParam(PORT, false, STSPORT2),
- new TestParam(PORT, true, STSPORT2),
-
- new TestParam(PORT, false, STAX_STSPORT2),
- new TestParam(PORT, true, STAX_STSPORT2),
- });
- }
-
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ new TestParam(PORT, false, STAX_STSPORT2),
+ new TestParam(PORT, true, STAX_STSPORT2),
+ };
}
@org.junit.Test
public void testUsernameOnBehalfOf() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = UsernameOnBehalfOfTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -159,7 +137,6 @@ public class UsernameOnBehalfOfTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)port2).close();
- bus.shutdown(true);
}
private static void doubleIt(DoubleItPortType port, int numToDouble) {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/AsymmetricServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/AsymmetricServer.java
deleted file mode 100644
index 71ca1f9..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/AsymmetricServer.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.x509;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class AsymmetricServer extends AbstractBusTestServerBase {
-
- public AsymmetricServer() {
-
- }
-
- protected void run() {
- URL busFile = AsymmetricServer.class.getResource("cxf-asymmetric-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new AsymmetricServer();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public static void main(String[] args) {
- new AsymmetricServer().run();
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/Server.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/Server.java
deleted file mode 100644
index a51bcef..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/Server.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.x509;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class Server extends AbstractBusTestServerBase {
-
- public Server() {
-
- }
-
- protected void run() {
- URL busFile = Server.class.getResource("cxf-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new Server();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public static void main(String[] args) {
- new Server().run();
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/StaxServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/StaxServer.java
deleted file mode 100644
index b7c5be7..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/StaxServer.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.systest.sts.x509;
-
-import java.net.URL;
-
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
-
-public class StaxServer extends AbstractBusTestServerBase {
-
- public StaxServer() {
-
- }
-
- protected void run() {
- URL busFile = StaxServer.class.getResource("cxf-stax-service.xml");
- Bus busLocal = new SpringBusFactory().createBus(busFile);
- BusFactory.setDefaultBus(busLocal);
- setBus(busLocal);
-
- try {
- new StaxServer();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public static void main(String[] args) {
- new StaxServer().run();
- }
-}
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509AsymmetricBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509AsymmetricBindingTest.java
index 45074bf..694392c 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509AsymmetricBindingTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509AsymmetricBindingTest.java
@@ -24,10 +24,8 @@ import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.systest.sts.deployment.STSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.example.contract.doubleit.DoubleItPortType;
@@ -51,35 +49,21 @@ public class X509AsymmetricBindingTest extends AbstractBusClientServerTestBase {
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(AsymmetricServer.class);
+ private static final String PORT = allocatePort(DoubleItPortType.class);
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(AsymmetricServer.class, true)
- );
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-x509.xml");
- assertTrue(launchServer(stsServer));
- }
-
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ assertTrue(launchServer(new DoubleItServer(
+ X509AsymmetricBindingTest.class.getResource("cxf-asymmetric-service.xml")
+ )));
+ assertTrue(launchServer(new STSServer(
+ "cxf-x509.xml"
+ )));
}
@org.junit.Test
public void testX509SAML2() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = X509AsymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = X509AsymmetricBindingTest.class.getResource("DoubleItAsymmetric.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -93,7 +77,6 @@ public class X509AsymmetricBindingTest extends AbstractBusClientServerTestBase {
doubleIt(port, 30);
((java.io.Closeable)port).close();
- bus.shutdown(true);
}
private static void doubleIt(DoubleItPortType port, int numToDouble) {
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509SymmetricBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509SymmetricBindingTest.java
index a6283c6..ea916bc 100644
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509SymmetricBindingTest.java
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509SymmetricBindingTest.java
@@ -19,20 +19,17 @@
package org.apache.cxf.systest.sts.x509;
import java.net.URL;
-import java.util.Arrays;
-import java.util.Collection;
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
-import org.apache.cxf.Bus;
-import org.apache.cxf.BusFactory;
-import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.systest.sts.common.SecurityTestUtil;
import org.apache.cxf.systest.sts.common.TestParam;
import org.apache.cxf.systest.sts.common.TokenTestUtils;
+import org.apache.cxf.systest.sts.deployment.DoubleItServer;
import org.apache.cxf.systest.sts.deployment.STSServer;
+import org.apache.cxf.systest.sts.deployment.StaxDoubleItServer;
import org.apache.cxf.systest.sts.deployment.StaxSTSServer;
import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
import org.example.contract.doubleit.DoubleItPortType;
@@ -60,8 +57,8 @@ public class X509SymmetricBindingTest extends AbstractBusClientServerTestBase {
private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
- private static final String PORT = allocatePort(Server.class);
- private static final String STAX_PORT = allocatePort(StaxServer.class);
+ private static final String PORT = allocatePort(DoubleItServer.class);
+ private static final String STAX_PORT = allocatePort(StaxDoubleItServer.class);
final TestParam test;
@@ -71,56 +68,33 @@ public class X509SymmetricBindingTest extends AbstractBusClientServerTestBase {
@BeforeClass
public static void startServers() throws Exception {
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(Server.class, true)
- );
- assertTrue(
- "Server failed to launch",
- // run the server in the same process
- // set this to false to fork
- launchServer(StaxServer.class, true)
- );
- STSServer stsServer = new STSServer();
- stsServer.setContext("cxf-x509.xml");
- assertTrue(launchServer(stsServer));
-
- StaxSTSServer staxStsServer = new StaxSTSServer();
- staxStsServer.setContext("stax-cxf-x509.xml");
- assertTrue(launchServer(staxStsServer));
+ assertTrue(launchServer(new DoubleItServer(
+ X509SymmetricBindingTest.class.getResource("cxf-service.xml"),
+ X509SymmetricBindingTest.class.getResource("cxf-stax-service.xml")
+ )));
+ assertTrue(launchServer(new STSServer(
+ "cxf-x509.xml",
+ "stax-cxf-x509.xml"
+ )));
}
@Parameters(name = "{0}")
- public static Collection<TestParam> data() {
-
- return Arrays.asList(new TestParam[] {new TestParam(PORT, false, STSPORT2),
- new TestParam(PORT, true, STSPORT2),
- new TestParam(STAX_PORT, false, STSPORT2),
- new TestParam(STAX_PORT, true, STSPORT2),
-
- new TestParam(PORT, false, STAX_STSPORT2),
- new TestParam(PORT, true, STAX_STSPORT2),
- new TestParam(STAX_PORT, false, STAX_STSPORT2),
- new TestParam(STAX_PORT, true, STAX_STSPORT2),
- });
- }
-
- @org.junit.AfterClass
- public static void cleanup() throws Exception {
- stopAllServers();
+ public static TestParam[] data() {
+ return new TestParam[] {new TestParam(PORT, false, STSPORT2),
+ new TestParam(PORT, true, STSPORT2),
+ new TestParam(STAX_PORT, false, STSPORT2),
+ new TestParam(STAX_PORT, true, STSPORT2),
+
+ new TestParam(PORT, false, STAX_STSPORT2),
+ new TestParam(PORT, true, STAX_STSPORT2),
+ new TestParam(STAX_PORT, false, STAX_STSPORT2),
+ new TestParam(STAX_PORT, true, STAX_STSPORT2),
+ };
}
@org.junit.Test
public void testX509SAML1() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = X509SymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = X509SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -138,18 +112,11 @@ public class X509SymmetricBindingTest extends AbstractBusClientServerTestBase {
doubleIt(symmetricSaml1Port, 25);
((java.io.Closeable)symmetricSaml1Port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testX509SAML2() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = X509SymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = X509SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -168,18 +135,11 @@ public class X509SymmetricBindingTest extends AbstractBusClientServerTestBase {
TokenTestUtils.verifyToken(symmetricSaml2Port);
((java.io.Closeable)symmetricSaml2Port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testX509SAML2Endorsing() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = X509SymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = X509SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -200,18 +160,11 @@ public class X509SymmetricBindingTest extends AbstractBusClientServerTestBase {
}
((java.io.Closeable)symmetricSaml2Port).close();
- bus.shutdown(true);
}
@org.junit.Test
public void testX509SAML2Supporting() throws Exception {
-
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = X509SymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = X509SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -229,7 +182,6 @@ public class X509SymmetricBindingTest extends AbstractBusClientServerTestBase {
doubleIt(symmetricSaml2Port, 30);
((java.io.Closeable)symmetricSaml2Port).close();
- bus.shutdown(true);
}
// Here we refer to the Assertion directly, instead of creating a SecurityTokenReference and using the
@@ -242,12 +194,7 @@ public class X509SymmetricBindingTest extends AbstractBusClientServerTestBase {
return;
}
- SpringBusFactory bf = new SpringBusFactory();
- URL busFile = X509SymmetricBindingTest.class.getResource("cxf-client.xml");
-
- Bus bus = bf.createBus(busFile.toString());
- BusFactory.setDefaultBus(bus);
- BusFactory.setThreadDefaultBus(bus);
+ createBus(getClass().getResource("cxf-client.xml").toString());
URL wsdl = X509SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
Service service = Service.create(wsdl, SERVICE_QNAME);
@@ -267,7 +214,6 @@ public class X509SymmetricBindingTest extends AbstractBusClientServerTestBase {
doubleIt(symmetricSaml2Port, 30);
((java.io.Closeable)symmetricSaml2Port).close();
- bus.shutdown(true);
}
private static void doubleIt(DoubleItPortType port, int numToDouble) {
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/asymmetric/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/asymmetric/cxf-service.xml
index 3aca3b3..2fe6c80 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/asymmetric/cxf-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/asymmetric/cxf-service.xml
@@ -26,7 +26,7 @@
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http: [...]
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.asymmetric.Server}/doubleit/services/doubleitasymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitasymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -34,21 +34,21 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.asymmetric.Server}/doubleit/services/doubleitasymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitasymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2keyvalue" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2KeyValuePort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.asymmetric.Server}/doubleit/services/doubleitasymmetricsaml2keyvalue" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2KeyValuePort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitasymmetricsaml2keyvalue" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml1encrypted" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML1EncryptedPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.asymmetric.Server}/doubleit/services/doubleitasymmetricsaml1encrypted" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML1EncryptedPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitasymmetricsaml1encrypted" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/asymmetric/cxf-stax-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/asymmetric/cxf-stax-service.xml
index 93c9631..2dbb06f 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/asymmetric/cxf-stax-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/asymmetric/cxf-stax-service.xml
@@ -26,7 +26,7 @@
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http: [...]
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.asymmetric.StaxServer}/doubleit/services/doubleitasymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleitasymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -35,7 +35,7 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.asymmetric.StaxServer}/doubleit/services/doubleitasymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleitasymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -43,7 +43,7 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2keyvalue" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2KeyValuePort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.asymmetric.StaxServer}/doubleit/services/doubleitasymmetricsaml2keyvalue" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2KeyValuePort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleitasymmetricsaml2keyvalue" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -51,7 +51,7 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml1encrypted" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML1EncryptedPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.asymmetric.StaxServer}/doubleit/services/doubleitasymmetricsaml1encrypted" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML1EncryptedPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleitasymmetricsaml1encrypted" wsdlLocation="org/apache/cxf/systest/sts/asymmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-service.xml
index eaa835d..6307b13 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-service.xml
@@ -26,14 +26,14 @@
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http: [...]
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2bearer" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2BearerPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.bearer.Server}/doubleit/services/doubleittransportsaml2bearer" wsdlLocation="org/apache/cxf/systest/sts/bearer/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2BearerPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml2bearer" wsdlLocation="org/apache/cxf/systest/sts/bearer/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2bearer2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2BearerPort2" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.bearer.Server}/doubleit/services/doubleittransportsaml2bearer2" wsdlLocation="org/apache/cxf/systest/sts/bearer/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2BearerPort2" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml2bearer2" wsdlLocation="org/apache/cxf/systest/sts/bearer/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -41,7 +41,7 @@
</jaxws:properties>
</jaxws:endpoint>
<httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.bearer.Server}">
+ <httpj:engine port="${testutil.ports.DoubleItServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-stax-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-stax-service.xml
index 2a3b704..7df3fea 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-stax-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/bearer/cxf-stax-service.xml
@@ -26,7 +26,7 @@
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http: [...]
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2bearer" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2BearerPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.bearer.StaxServer}/doubleit/services/doubleittransportsaml2bearer" wsdlLocation="org/apache/cxf/systest/sts/bearer/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2BearerPort" serviceName="s:DoubleItService" depends-on="StaxClientAuthHttpsSettings" address="https://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleittransportsaml2bearer" wsdlLocation="org/apache/cxf/systest/sts/bearer/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -34,7 +34,7 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2bearer2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2BearerPort2" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.bearer.StaxServer}/doubleit/services/doubleittransportsaml2bearer2" wsdlLocation="org/apache/cxf/systest/sts/bearer/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2BearerPort2" serviceName="s:DoubleItService" depends-on="StaxClientAuthHttpsSettings" address="https://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleittransportsaml2bearer2" wsdlLocation="org/apache/cxf/systest/sts/bearer/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -42,8 +42,8 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.bearer.StaxServer}">
+ <httpj:engine-factory id="StaxClientAuthHttpsSettings" bus="cxf">
+ <httpj:engine port="${testutil.ports.StaxDoubleItServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-transport.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-transport.xml
index d2bc272..cea7459 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-transport.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-transport.xml
@@ -18,20 +18,14 @@
under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:cxf="http://cxf.apache.org/core"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:sec="http://cxf.apache.org/configuration/security"
xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
xmlns:test="http://apache.org/hello_world_soap_http"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://www [...]
- <cxf:bus>
- <cxf:features>
- <cxf:logging/>
- </cxf:features>
- </cxf:bus>
-
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://www.springframework.org/schema/util http://www.springframework.org/sc [...]
+
<import resource="sts/cxf-sts.xml" />
<jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTS" implementor="#stsProviderBean" address="https://localhost:${testutil.ports.STSServer}/SecurityTokenService/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Port" depends-on="ClientAuthHttpsSettings">
@@ -39,7 +33,7 @@
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTS-realmB" implementor="#stsProviderBean" address="https://localhost:${testutil.ports.STSServer}/SecurityTokenService/b-issuer/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_SAML_Port" depends-on="ClientAuthHttpsSettings">
+ <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" implementor="#stsProviderBean" address="https://localhost:${testutil.ports.STSServer}/SecurityTokenService/b-issuer/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_SAML_Port" depends-on="ClientAuthHttpsSettings">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="stsKeystore.properties"/>
@@ -59,4 +53,4 @@
</httpj:tlsServerParameters>
</httpj:engine>
</httpj:engine-factory>
-</beans>
\ No newline at end of file
+</beans>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut-encrypted.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut-encrypted.xml
index 50fd3b2..ef9aa50 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut-encrypted.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut-encrypted.xml
@@ -18,18 +18,12 @@
under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:cxf="http://cxf.apache.org/core"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:test="http://apache.org/hello_world_soap_http"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd">
- <cxf:bus>
- <cxf:features>
- <cxf:logging/>
- </cxf:features>
- </cxf:bus>
-
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd">
+
<import resource="sts/cxf-sts.xml" />
<!-- Override org.apache.cxf.sts.operation.TokenIssueOperation -->
@@ -43,7 +37,7 @@
<property name="encryptIssuedToken" value="true"/>
</bean>
- <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="EncryptedUTSTS" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.STSServer.2}/SecurityTokenService/UTEncrypted" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UTEncrypted_Port">
+ <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.STSServer.2}/SecurityTokenService/UTEncrypted" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UTEncrypted_Port">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="stsKeystore.properties"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml
index b7df0d0..588d0b2 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-ut.xml
@@ -18,21 +18,15 @@
under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:cxf="http://cxf.apache.org/core"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:test="http://apache.org/hello_world_soap_http"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd">
- <cxf:bus>
- <cxf:features>
- <cxf:logging/>
- </cxf:features>
- </cxf:bus>
-
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd">
+
<import resource="sts/cxf-sts.xml" />
- <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="UTSTS" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.STSServer.2}/SecurityTokenService/UT" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UT_Port">
+ <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.STSServer.2}/SecurityTokenService/UT" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UT_Port">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="stsKeystore.properties"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml
index 33840f3..9568c75 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml
@@ -38,7 +38,7 @@
<bean class="org.apache.cxf.systest.sts.username_onbehalfof.UsernameTokenValidator"/>
</util:list>
- <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="X509STS" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.STSServer.2}/SecurityTokenService/X509" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:X509_Port">
+ <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.STSServer.2}/SecurityTokenService/X509" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:X509_Port">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="stsKeystore.properties"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-transport.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-transport.xml
index 830ec17..4b865fb 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-transport.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-transport.xml
@@ -18,29 +18,23 @@
under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:cxf="http://cxf.apache.org/core"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:sec="http://cxf.apache.org/configuration/security"
xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
xmlns:test="http://apache.org/hello_world_soap_http"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://www [...]
- <cxf:bus>
- <cxf:features>
- <cxf:logging/>
- </cxf:features>
- </cxf:bus>
-
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://www.springframework.org/schema/util http://www.springframework.org/sc [...]
+
<import resource="sts/cxf-sts.xml" />
- <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTS" implementor="#stsProviderBean" address="https://localhost:${testutil.ports.StaxSTSServer}/SecurityTokenService/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Port" depends-on="ClientAuthHttpsSettings">
+ <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" implementor="#stsProviderBean" address="https://localhost:${testutil.ports.StaxSTSServer}/SecurityTokenService/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Port" depends-on="StaxClientAuthHttpsSettings">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTS-realmB" implementor="#stsProviderBean" address="https://localhost:${testutil.ports.StaxSTSServer}/SecurityTokenService/b-issuer/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_SAML_Port" depends-on="ClientAuthHttpsSettings">
+ <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" implementor="#stsProviderBean" address="https://localhost:${testutil.ports.StaxSTSServer}/SecurityTokenService/b-issuer/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_SAML_Port" depends-on="StaxClientAuthHttpsSettings">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="stsKeystore.properties"/>
@@ -48,7 +42,7 @@
</jaxws:properties>
</jaxws:endpoint>
- <httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
+ <httpj:engine-factory id="StaxClientAuthHttpsSettings" bus="cxf">
<httpj:engine port="${testutil.ports.StaxSTSServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut-encrypted.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut-encrypted.xml
index 83470cb..41e9263 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut-encrypted.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut-encrypted.xml
@@ -18,21 +18,15 @@
under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:cxf="http://cxf.apache.org/core"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:test="http://apache.org/hello_world_soap_http"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd">
- <cxf:bus>
- <cxf:features>
- <cxf:logging/>
- </cxf:features>
- </cxf:bus>
-
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd">
+
<import resource="sts/cxf-sts.xml" />
-
- <!-- Override org.apache.cxf.sts.operation.TokenIssueOperation -->
+
+ <!-- Override org.apache.cxf.sts.operation.TokenIssueOperation -->
<bean id="issueDelegate" class="org.apache.cxf.sts.operation.TokenIssueOperation">
<property name="tokenProviders" ref="tokenProviders"/>
<property name="tokenValidators" ref="tokenValidators"/>
@@ -42,8 +36,8 @@
<property name="claimsManager" ref="claimsManager"/>
<property name="encryptIssuedToken" value="true"/>
</bean>
-
- <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="EncryptedUTSTS" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.StaxSTSServer.2}/SecurityTokenService/UTEncrypted" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UTEncrypted_Port">
+
+ <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.StaxSTSServer.2}/SecurityTokenService/UTEncrypted" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UTEncrypted_Port">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="stsKeystore.properties"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml
index d70cc32..c668291 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-ut.xml
@@ -18,21 +18,15 @@
under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:cxf="http://cxf.apache.org/core"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:test="http://apache.org/hello_world_soap_http"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
- xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd">
- <cxf:bus>
- <cxf:features>
- <cxf:logging/>
- </cxf:features>
- </cxf:bus>
-
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd">
+
<import resource="sts/cxf-sts.xml" />
- <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="UTSTS" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.StaxSTSServer.2}/SecurityTokenService/UT" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UT_Port">
+ <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.StaxSTSServer.2}/SecurityTokenService/UT" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:UT_Port">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="stsKeystore.properties"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml
index 55a4cc1..098939c 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/stax-cxf-x509.xml
@@ -38,7 +38,7 @@
<bean class="org.apache.cxf.systest.sts.username_onbehalfof.UsernameTokenValidator"/>
</util:list>
- <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="X509STS" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.StaxSTSServer.2}/SecurityTokenService/X509" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:X509_Port">
+ <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" implementor="#stsProviderBean" address="http://localhost:${testutil.ports.StaxSTSServer.2}/SecurityTokenService/X509" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/deployment/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:X509_Port">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="stsKeystore.properties"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/intermediary_transformation/cxf-intermediary-caching.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/intermediary_transformation/cxf-intermediary-caching.xml
index daa4aad..91a5502 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/intermediary_transformation/cxf-intermediary-caching.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/intermediary_transformation/cxf-intermediary-caching.xml
@@ -31,7 +31,7 @@
<cxf:logging/>
</cxf:features>
</cxf:bus>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml1endorsing" implementor="org.apache.cxf.systest.sts.intermediary_transformation.IntermediaryCachingPortTypeImpl" endpointName="s:DoubleItTransportSAML1EndorsingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.intermediary_transformation.IntermediaryCaching}/doubleit/services/doubleittransportsaml1endorsing" wsdlLocation="org [...]
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.intermediary_transformation.IntermediaryCachingPortTypeImpl" endpointName="s:DoubleItTransportSAML1EndorsingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml1endorsing" wsdlLocation="org/apache/cxf/systest/sts/intermediary_transformation/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -39,7 +39,7 @@
</jaxws:properties>
</jaxws:endpoint>
<httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.intermediary_transformation.IntermediaryCaching}">
+ <httpj:engine port="${testutil.ports.DoubleItServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/intermediary_transformation/cxf-intermediary.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/intermediary_transformation/cxf-intermediary.xml
index 7814214..0387ba2 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/intermediary_transformation/cxf-intermediary.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/intermediary_transformation/cxf-intermediary.xml
@@ -31,7 +31,7 @@
<cxf:logging/>
</cxf:features>
</cxf:bus>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml1endorsing" implementor="org.apache.cxf.systest.sts.intermediary_transformation.IntermediaryPortTypeImpl" endpointName="s:DoubleItTransportSAML1EndorsingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.intermediary_transformation.Intermediary}/doubleit/services/doubleittransportsaml1endorsing" wsdlLocation="org/apache/cxf/sy [...]
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.intermediary_transformation.IntermediaryPortTypeImpl" endpointName="s:DoubleItTransportSAML1EndorsingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml1endorsing" wsdlLocation="org/apache/cxf/systest/sts/intermediary_transformation/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -39,7 +39,7 @@
</jaxws:properties>
</jaxws:endpoint>
<httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.intermediary_transformation.Intermediary}">
+ <httpj:engine port="${testutil.ports.DoubleItServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
@@ -48,7 +48,6 @@
</httpj:tlsServerParameters>
</httpj:engine>
</httpj:engine-factory>
- <bean id="delegationCallbackHandler" class="org.apache.cxf.ws.security.trust.delegation.ReceivedTokenCallbackHandler"/>
<jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItTransportSAML2Port" createdFromAPI="true">
<jaxws:properties>
<entry key="security.sts.client">
@@ -57,7 +56,9 @@
<property name="wsdlLocation" value="https://localhost:8443/SecurityTokenService/Transport?wsdl"/>
<property name="serviceName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService"/>
<property name="endpointName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Transport_Port"/>
- <property name="onBehalfOf" ref="delegationCallbackHandler"/>
+ <property name="onBehalfOf">
+ <bean class="org.apache.cxf.ws.security.trust.delegation.ReceivedTokenCallbackHandler"/>
+ </property>
<property name="properties">
<map>
<entry key="security.username" value="bob"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/intermediary_transformation/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/intermediary_transformation/cxf-service.xml
index 3a6ffe6..a635692 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/intermediary_transformation/cxf-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/intermediary_transformation/cxf-service.xml
@@ -31,8 +31,8 @@
<cxf:logging/>
</cxf:features>
</cxf:bus>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2"
- implementor="org.apache.cxf.systest.sts.intermediary_transformation.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.intermediary_transformation.Server.2}/doubleit/services/doubleittransportsaml2" wsdlLocation="org/apache/cxf/systest/sts/intermediary_transformation/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt"
+ implementor="org.apache.cxf.systest.sts.intermediary_transformation.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings.2" address="https://localhost:${testutil.ports.DoubleItServer.2}/doubleit/services/doubleittransportsaml2" wsdlLocation="org/apache/cxf/systest/sts/intermediary_transformation/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -42,8 +42,8 @@
</entry>
</jaxws:properties>
</jaxws:endpoint>
- <httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.intermediary_transformation.Server.2}">
+ <httpj:engine-factory id="ClientAuthHttpsSettings.2" bus="cxf">
+ <httpj:engine port="${testutil.ports.DoubleItServer.2}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/DoubleIt.wsdl b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/DoubleIt.wsdl
index 84710c5..639ff39 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/DoubleIt.wsdl
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/DoubleIt.wsdl
@@ -114,7 +114,7 @@
<sp:RequireInternalReference/>
</wsp:Policy>
<sp:Issuer>
- <wsaw:Address>https://localhost:30101/SecurityTokenService/Transport</wsaw:Address>
+ <wsaw:Address>https://localhost:${testutil.ports.IssuerSTSServer}/SecurityTokenService/Transport</wsaw:Address>
<wsaw:Metadata xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512/">
<wsam:ServiceName EndpointName="Transport_Port">wst:SecurityTokenService</wsam:ServiceName>
</wsaw:Metadata>
@@ -178,12 +178,12 @@
<sp:RequireInternalReference/>
</wsp:Policy>
<sp:Issuer>
- <wsaw:Address>https://localhost:30101/SecurityTokenService/Transport</wsaw:Address>
+ <wsaw:Address>https://localhost:${testutil.ports.IssuerSTSServer}/SecurityTokenService/Transport</wsaw:Address>
<wsaw:Metadata>
<wsx:Metadata>
<wsx:MetadataSection>
<wsx:MetadataReference>
- <wsaw:Address>https://localhost:30101/SecurityTokenService/Transport/mex</wsaw:Address>
+ <wsaw:Address>https://localhost:${testutil.ports.IssuerSTSServer}/SecurityTokenService/Transport/mex</wsaw:Address>
</wsx:MetadataReference>
</wsx:MetadataSection>
</wsx:Metadata>
@@ -248,13 +248,13 @@
<sp:RequireInternalReference/>
</wsp:Policy>
<sp:Issuer>
- <!--<wsaw:Address>https://localhost:30101/SecurityTokenService/TransportSoap12</wsaw:Address>-->
+ <!--<wsaw:Address>https://localhost:${testutil.ports.IssuerSTSServer}/SecurityTokenService/TransportSoap12</wsaw:Address>-->
<wsaw:Address>http://www.w3.org/2005/08/addressing/anonymous</wsaw:Address>
<wsaw:Metadata>
<wsx:Metadata>
<wsx:MetadataSection>
<wsx:MetadataReference>
- <wsaw:Address>https://localhost:30101/SecurityTokenService/TransportSoap12/mex</wsaw:Address>
+ <wsaw:Address>https://localhost:${testutil.ports.IssuerSTSServer}/SecurityTokenService/TransportSoap12/mex</wsaw:Address>
</wsx:MetadataReference>
</wsx:MetadataSection>
</wsx:Metadata>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-issuer-sts-transport.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-issuer-sts-transport.xml
index a5bda33..acc5473 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-issuer-sts-transport.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-issuer-sts-transport.xml
@@ -18,7 +18,6 @@
under the License.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:cxf="http://cxf.apache.org/core"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:sec="http://cxf.apache.org/configuration/security"
xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
@@ -26,27 +25,22 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://www [...]
- <cxf:bus>
- <cxf:features>
- <cxf:logging/>
- </cxf:features>
- </cxf:bus>
-
+
<import resource="../deployment/sts/cxf-sts.xml" />
- <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTS" implementor="#stsProviderBean" address="https://localhost:30101/SecurityTokenService/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/issuer/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Port" depends-on="ClientAuthHttpsSettings">
+ <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTS" implementor="#stsProviderBean" address="https://localhost:${testutil.ports.IssuerSTSServer}/SecurityTokenService/Transport" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/issuer/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Port" depends-on="ClientAuthHttpsSettings">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTSSoap12" implementor="#stsProviderBean" address="https://localhost:30101/SecurityTokenService/TransportSoap12" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/issuer/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Soap12_Port" depends-on="ClientAuthHttpsSettings">
+ <jaxws:endpoint xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" id="transportSTSSoap12" implementor="#stsProviderBean" address="https://localhost:${testutil.ports.IssuerSTSServer}/SecurityTokenService/TransportSoap12" wsdlLocation="src/test/resources/org/apache/cxf/systest/sts/issuer/ws-trust-1.4-service.wsdl" serviceName="ns1:SecurityTokenService" endpointName="ns1:Transport_Soap12_Port" depends-on="ClientAuthHttpsSettings">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
</jaxws:properties>
</jaxws:endpoint>
<httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="30101">
+ <httpj:engine port="${testutil.ports.IssuerSTSServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-service.xml
index 1c1140a..a396d55 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/issuer/cxf-service.xml
@@ -26,7 +26,7 @@
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http: [...]
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.issuer.Server}/doubleit/services/doubleittransportsaml1" wsdlLocation="org/apache/cxf/systest/sts/issuer/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml1" wsdlLocation="org/apache/cxf/systest/sts/issuer/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -36,7 +36,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.issuer.Server}/doubleit/services/doubleittransportsaml2" wsdlLocation="org/apache/cxf/systest/sts/issuer/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml2" wsdlLocation="org/apache/cxf/systest/sts/issuer/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -45,7 +45,7 @@
</entry>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2soap12" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2Soap12Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.issuer.Server}/doubleit/services/doubleittransportsaml2soap12" wsdlLocation="org/apache/cxf/systest/sts/issuer/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2soap12" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2Soap12Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml2soap12" wsdlLocation="org/apache/cxf/systest/sts/issuer/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -55,7 +55,7 @@
</jaxws:properties>
</jaxws:endpoint>
<httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.issuer.Server}">
+ <httpj:engine port="${testutil.ports.DoubleItServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/jaas/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/jaas/cxf-service.xml
index 521cde5..1560782 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/jaas/cxf-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/jaas/cxf-service.xml
@@ -28,10 +28,10 @@
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configurat [...]
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
- <bean id="roleClaimsCallbackHandler"
+ <bean id="roleClaimsCallbackHandler"
class="org.apache.cxf.ws.security.trust.claims.RoleClaimsCallbackHandler" />
-
- <bean id="stsClient" class="org.apache.cxf.ws.security.trust.STSClient">
+
+ <bean id="stsClient" class="org.apache.cxf.ws.security.trust.STSClient">
<constructor-arg ref="cxf"/>
<property name="wsdlLocation" value="https://localhost:${testutil.ports.STSServer}/SecurityTokenService/Transport?wsdl"/>
<property name="serviceName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService"/>
@@ -47,8 +47,8 @@
value="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0"/>
<property name="keyType"
value="http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer"/>
- </bean>
-
+ </bean>
+
<bean id="authorizationInterceptor"
class="org.apache.cxf.interceptor.security.SimpleAuthorizingInterceptor">
<property name="methodRolesMap">
@@ -63,7 +63,7 @@
</bean>
<!-- JAX-WS service -->
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitut" implementor="org.apache.cxf.systest.sts.jaas.DoubleItPortTypeImpl" endpointName="s:DoubleItUTPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.jaas.Server}/doubleit/services/doubleitut" wsdlLocation="org/apache/cxf/systest/sts/jaas/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.jaas.DoubleItPortTypeImpl" endpointName="s:DoubleItUTPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitut" wsdlLocation="org/apache/cxf/systest/sts/jaas/DoubleIt.wsdl">
<jaxws:properties>
<entry key="ws-security.validate.token" value="false"/>
<entry key="security.sts.client" value-ref="stsClient"/>
@@ -78,7 +78,7 @@
<property name="contextName" value="sts_standalone"/>
</bean>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitut2" implementor="org.apache.cxf.systest.sts.jaas.DoubleItPortTypeImpl" endpointName="s:DoubleItUTPort2" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.jaas.Server}/doubleit/services/doubleitut2" wsdlLocation="org/apache/cxf/systest/sts/jaas/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.jaas.DoubleItPortTypeImpl" endpointName="s:DoubleItUTPort2" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitut2" wsdlLocation="org/apache/cxf/systest/sts/jaas/DoubleIt.wsdl">
<jaxws:properties>
<entry key="ws-security.validate.token" value="false"/>
</jaxws:properties>
@@ -92,7 +92,7 @@
<property name="contextName" value="sts_standalone_passthrough"/>
</bean>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitut3" implementor="org.apache.cxf.systest.sts.jaas.DoubleItPortTypeImpl" endpointName="s:DoubleItUTPort3" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.jaas.Server}/doubleit/services/doubleitut3" wsdlLocation="org/apache/cxf/systest/sts/jaas/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.jaas.DoubleItPortTypeImpl" endpointName="s:DoubleItUTPort3" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitut3" wsdlLocation="org/apache/cxf/systest/sts/jaas/DoubleIt.wsdl">
<jaxws:properties>
<entry key="ws-security.validate.token" value="false"/>
</jaxws:properties>
@@ -103,7 +103,7 @@
</jaxws:endpoint>
<!-- JAX-RS service -->
- <jaxrs:server modelRef="classpath:org/apache/cxf/systest/sts/jaas/jaxrs.xml" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.jaas.Server}/doubleit/services/doubleit-rs">
+ <jaxrs:server modelRef="classpath:org/apache/cxf/systest/sts/jaas/jaxrs.xml" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleit-rs">
<jaxrs:properties>
<entry key="security.sts.client" value-ref="stsClient"/>
</jaxrs:properties>
@@ -113,7 +113,7 @@
</jaxrs:inInterceptors>
</jaxrs:server>
- <jaxrs:server modelRef="classpath:org/apache/cxf/systest/sts/jaas/jaxrs.xml" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.jaas.Server}/doubleit/services/doubleit-rs3">
+ <jaxrs:server modelRef="classpath:org/apache/cxf/systest/sts/jaas/jaxrs.xml" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleit-rs3">
<jaxrs:inInterceptors>
<ref bean="authenticationInterceptor3"/>
<ref bean="authorizationInterceptor"/>
@@ -121,7 +121,7 @@
</jaxrs:server>
<httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.jaas.Server}">
+ <httpj:engine port="${testutil.ports.DoubleItServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/jaas/cxf-service2.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/jaas/cxf-service2.xml
index 085fb2b..18ed71b 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/jaas/cxf-service2.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/jaas/cxf-service2.xml
@@ -29,11 +29,11 @@
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
<!-- JAX-WS service -->
- <bean id="authenticationInterceptor" class="org.apache.cxf.interceptor.security.JAASLoginInterceptor">
+ <bean id="authenticationInterceptor.2" class="org.apache.cxf.interceptor.security.JAASLoginInterceptor">
<property name="contextName" value="sts_standalone_config"/>
</bean>
- <bean id="authorizationInterceptor"
+ <bean id="authorizationInterceptor.2"
class="org.apache.cxf.interceptor.security.SimpleAuthorizingInterceptor">
<property name="methodRolesMap">
<map>
@@ -42,26 +42,26 @@
</property>
</bean>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitut" implementor="org.apache.cxf.systest.sts.jaas.DoubleItPortTypeImpl" endpointName="s:DoubleItUTPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.jaas.Server2}/doubleit/services/doubleitut" wsdlLocation="org/apache/cxf/systest/sts/jaas/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.jaas.DoubleItPortTypeImpl" endpointName="s:DoubleItUTPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings.2" address="https://localhost:${testutil.ports.DoubleItServer.2}/doubleit/services/doubleitut" wsdlLocation="org/apache/cxf/systest/sts/jaas/DoubleIt.wsdl">
<jaxws:properties>
<entry key="ws-security.validate.token" value="false"/>
</jaxws:properties>
<jaxws:inInterceptors>
- <ref bean="authenticationInterceptor"/>
- <ref bean="authorizationInterceptor"/>
+ <ref bean="authenticationInterceptor.2"/>
+ <ref bean="authorizationInterceptor.2"/>
</jaxws:inInterceptors>
</jaxws:endpoint>
<!-- JAX-RS service -->
- <jaxrs:server modelRef="classpath:org/apache/cxf/systest/sts/jaas/jaxrs.xml" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.jaas.Server2}/doubleit/services/doubleit-rs">
+ <jaxrs:server modelRef="classpath:org/apache/cxf/systest/sts/jaas/jaxrs.xml" depends-on="ClientAuthHttpsSettings.2" address="https://localhost:${testutil.ports.DoubleItServer.2}/doubleit/services/doubleit-rs">
<jaxrs:inInterceptors>
- <ref bean="authenticationInterceptor"/>
- <ref bean="authorizationInterceptor"/>
+ <ref bean="authenticationInterceptor.2"/>
+ <ref bean="authorizationInterceptor.2"/>
</jaxrs:inInterceptors>
</jaxrs:server>
- <httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.jaas.Server2}">
+ <httpj:engine-factory id="ClientAuthHttpsSettings.2" bus="cxf">
+ <httpj:engine port="${testutil.ports.DoubleItServer.2}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-intermediary.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-intermediary.xml
index cdd997f..54fd52b 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-intermediary.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-intermediary.xml
@@ -32,15 +32,15 @@
</cxf:features>
</cxf:bus>
<bean id="doubleItImpl" class="org.apache.cxf.systest.sts.sendervouches.DoubleItPortTypeImpl">
- <property name="port" value="${testutil.ports.sendervouches.Server.2}"/>
+ <property name="port" value="${testutil.ports.DoubleItServer.2}"/>
</bean>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportut" implementor="#doubleItImpl" endpointName="s:DoubleItTransportUTPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.sendervouches.Intermediary}/doubleit/services/doubleittransportut" wsdlLocation="org/apache/cxf/systest/sts/sendervouches/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="#doubleItImpl" endpointName="s:DoubleItTransportUTPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportut" wsdlLocation="org/apache/cxf/systest/sts/sendervouches/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
</jaxws:properties>
</jaxws:endpoint>
<httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.sendervouches.Intermediary}">
+ <httpj:engine port="${testutil.ports.DoubleItServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-service.xml
index 18f68fb..23b54cc 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-service.xml
@@ -31,14 +31,14 @@
<cxf:logging/>
</cxf:features>
</cxf:bus>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2supporting" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2SupportingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.sendervouches.Server.2}/doubleit/services/doubleittransportsaml2supporting" wsdlLocation="org/apache/cxf/systest/sts/sendervouches/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2SupportingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer.2}/doubleit/services/doubleittransportsaml2supporting" wsdlLocation="org/apache/cxf/systest/sts/sendervouches/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.encryption.properties" value="serviceKeystore.properties"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
</jaxws:properties>
</jaxws:endpoint>
<httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.sendervouches.Server.2}">
+ <httpj:engine port="${testutil.ports.DoubleItServer.2}">
<httpj:tlsServerParameters>
<sec:trustManagers>
<sec:keyStore type="jks" password="stsspass" resource="keys/stsstore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-stax-intermediary.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-stax-intermediary.xml
index 739a424..6d18bdd 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-stax-intermediary.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-stax-intermediary.xml
@@ -31,17 +31,17 @@
<cxf:logging/>
</cxf:features>
</cxf:bus>
- <bean id="doubleItImpl" class="org.apache.cxf.systest.sts.sendervouches.DoubleItPortTypeImpl">
- <property name="port" value="${testutil.ports.sendervouches.StaxServer.2}"/>
+ <bean id="staxDoubleItImpl" class="org.apache.cxf.systest.sts.sendervouches.DoubleItPortTypeImpl">
+ <property name="port" value="${testutil.ports.StaxDoubleItServer.2}"/>
</bean>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportut" implementor="#doubleItImpl" endpointName="s:DoubleItTransportUTPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.sendervouches.StaxIntermediary}/doubleit/services/doubleittransportut" wsdlLocation="org/apache/cxf/systest/sts/sendervouches/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="#staxDoubleItImpl" endpointName="s:DoubleItTransportUTPort" serviceName="s:DoubleItService" depends-on="StaxClientAuthHttpsSettings" address="https://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleittransportut" wsdlLocation="org/apache/cxf/systest/sts/sendervouches/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.sendervouches.StaxIntermediary}">
+ <httpj:engine-factory id="StaxClientAuthHttpsSettings" bus="cxf">
+ <httpj:engine port="${testutil.ports.StaxDoubleItServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-stax-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-stax-service.xml
index c97a80c..0e05a6b 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-stax-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/sendervouches/cxf-stax-service.xml
@@ -31,15 +31,15 @@
<cxf:logging/>
</cxf:features>
</cxf:bus>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2supporting" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2SupportingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.sendervouches.StaxServer.2}/doubleit/services/doubleittransportsaml2supporting" wsdlLocation="org/apache/cxf/systest/sts/sendervouches/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2SupportingPort" serviceName="s:DoubleItService" depends-on="StaxClientAuthHttpsSettings" address="https://localhost:${testutil.ports.StaxDoubleItServer.2}/doubleit/services/doubleittransportsaml2supporting" wsdlLocation="org/apache/cxf/systest/sts/sendervouches/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.encryption.properties" value="serviceKeystore.properties"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.sendervouches.StaxServer.2}">
+ <httpj:engine-factory id="StaxClientAuthHttpsSettings" bus="cxf">
+ <httpj:engine port="${testutil.ports.StaxDoubleItServer.2}">
<httpj:tlsServerParameters>
<sec:trustManagers>
<sec:keyStore type="jks" password="stsspass" resource="keys/stsstore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/stsclient/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/stsclient/cxf-service.xml
index 8380e96..82d4680 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/stsclient/cxf-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/stsclient/cxf-service.xml
@@ -26,14 +26,14 @@
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http: [...]
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.stsclient.Server}/doubleit/services/doubleittransportsaml1" wsdlLocation="org/apache/cxf/systest/sts/stsclient/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml1" wsdlLocation="org/apache/cxf/systest/sts/stsclient/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
</jaxws:properties>
</jaxws:endpoint>
<httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.stsclient.Server}">
+ <httpj:engine port="${testutil.ports.DoubleItServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/symmetric/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/symmetric/cxf-service.xml
index 7ca07ce..f28a5f6 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/symmetric/cxf-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/symmetric/cxf-service.xml
@@ -31,35 +31,35 @@
<property name="enforcePrincipal" value="false"/>
</bean>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.symmetric.Server}/doubleit/services/doubleitsymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitsymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.symmetric.Server}/doubleit/services/doubleitsymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitsymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2protecttokens" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2ProtectTokensPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.symmetric.Server}/doubleit/services/doubleitsymmetricsaml2protecttokens" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2ProtectTokensPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitsymmetricsaml2protecttokens" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml1encrypted" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1EncryptedPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.symmetric.Server}/doubleit/services/doubleitsymmetricsaml1encrypted" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1EncryptedPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitsymmetricsaml1encrypted" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2secureconv" implementor="#doubleItNoSecurity" endpointName="s:DoubleItSymmetricSAML2SecureConversationPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.symmetric.Server}/doubleit/services/doubleitsymmetricsaml2SecureConversation" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="#doubleItNoSecurity" endpointName="s:DoubleItSymmetricSAML2SecureConversationPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitsymmetricsaml2SecureConversation" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/symmetric/cxf-stax-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/symmetric/cxf-stax-service.xml
index b10a344..bad7f28 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/symmetric/cxf-stax-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/symmetric/cxf-stax-service.xml
@@ -31,7 +31,7 @@
<property name="enforcePrincipal" value="false"/>
</bean>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.symmetric.StaxServer}/doubleit/services/doubleitsymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleitsymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -39,7 +39,7 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.symmetric.StaxServer}/doubleit/services/doubleitsymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleitsymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -47,7 +47,7 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2protecttokens" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2ProtectTokensPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.symmetric.StaxServer}/doubleit/services/doubleitsymmetricsaml2protecttokens" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2ProtectTokensPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleitsymmetricsaml2protecttokens" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -55,7 +55,7 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml1encrypted" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1EncryptedPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.symmetric.StaxServer}/doubleit/services/doubleitsymmetricsaml1encrypted" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1EncryptedPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleitsymmetricsaml1encrypted" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -63,7 +63,7 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2secureconv" implementor="#doubleItNoSecurity" endpointName="s:DoubleItSymmetricSAML2SecureConversationPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.symmetric.StaxServer}/doubleit/services/doubleitsymmetricsaml2SecureConversation" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="#doubleItNoSecurity" endpointName="s:DoubleItSymmetricSAML2SecureConversationPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleitsymmetricsaml2SecureConversation" wsdlLocation="org/apache/cxf/systest/sts/symmetric/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/template/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/template/cxf-service.xml
index 55486e1..2ba4df3 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/template/cxf-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/template/cxf-service.xml
@@ -26,14 +26,14 @@
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http: [...]
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml1PublicKey" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1PublicKeyPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.template.Server}/doubleit/services/doubleittransportsaml1publickey" wsdlLocation="org/apache/cxf/systest/sts/template/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1PublicKeyPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml1publickey" wsdlLocation="org/apache/cxf/systest/sts/template/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2PublicKey" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2PublicKeyPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.template.Server}/doubleit/services/doubleittransportsaml2publickey" wsdlLocation="org/apache/cxf/systest/sts/template/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2PublicKeyPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml2publickey" wsdlLocation="org/apache/cxf/systest/sts/template/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -41,7 +41,7 @@
</jaxws:properties>
</jaxws:endpoint>
<httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.template.Server}">
+ <httpj:engine port="${testutil.ports.DoubleItServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/template/cxf-stax-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/template/cxf-stax-service.xml
index 4a83db6..a23dd90 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/template/cxf-stax-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/template/cxf-stax-service.xml
@@ -26,7 +26,7 @@
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http: [...]
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml1PublicKey" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1PublicKeyPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.template.StaxServer}/doubleit/services/doubleittransportsaml1publickey" wsdlLocation="org/apache/cxf/systest/sts/template/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1PublicKeyPort" serviceName="s:DoubleItService" depends-on="StaxClientAuthHttpsSettings" address="https://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleittransportsaml1publickey" wsdlLocation="org/apache/cxf/systest/sts/template/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -34,7 +34,7 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2PublicKey" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2PublicKeyPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.template.StaxServer}/doubleit/services/doubleittransportsaml2publickey" wsdlLocation="org/apache/cxf/systest/sts/template/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2PublicKeyPort" serviceName="s:DoubleItService" depends-on="StaxClientAuthHttpsSettings" address="https://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleittransportsaml2publickey" wsdlLocation="org/apache/cxf/systest/sts/template/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -42,8 +42,8 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.template.StaxServer}">
+ <httpj:engine-factory id="StaxClientAuthHttpsSettings" bus="cxf">
+ <httpj:engine port="${testutil.ports.StaxDoubleItServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/transport/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/transport/cxf-service.xml
index c27b1a1..18c0bf5 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/transport/cxf-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/transport/cxf-service.xml
@@ -26,7 +26,7 @@
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http: [...]
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.transport.Server}/doubleit/services/doubleittransportsaml1" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml1" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -36,7 +36,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.transport.Server}/doubleit/services/doubleittransportsaml2" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml2" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -45,28 +45,28 @@
</entry>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml1endorsing" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1EndorsingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.transport.Server}/doubleit/services/doubleittransportsaml1endorsing" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1EndorsingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml1endorsing" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2x509" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2X509EndorsingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.transport.Server}/doubleit/services/doubleittransportsaml2x509endorsing" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2X509EndorsingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml2x509endorsing" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="stsKeystore.properties"/>
<entry key="ws-security.enable.timestamp.cache" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2symmetric" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2SymmetricEndorsingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.transport.Server}/doubleit/services/doubleittransportsaml2symmetricendorsing" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2SymmetricEndorsingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml2symmetricendorsing" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
<entry key="ws-security.enable.timestamp.cache" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2symmetricderived" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2SymmetricEndorsingDerivedPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.transport.Server}/doubleit/services/doubleittransportsaml2symmetricendorsingderived" wsdlLocation="org/apache/cxf/systest/sts/ [...]
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2SymmetricEndorsingDerivedPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleittransportsaml2symmetricendorsingderived" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -74,7 +74,7 @@
</jaxws:properties>
</jaxws:endpoint>
<httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.transport.Server}">
+ <httpj:engine port="${testutil.ports.DoubleItServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/transport/cxf-stax-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/transport/cxf-stax-service.xml
index 675f523..620269b 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/transport/cxf-stax-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/transport/cxf-stax-service.xml
@@ -26,7 +26,7 @@
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http: [...]
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.transport.StaxServer}/doubleit/services/doubleittransportsaml1" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1Port" serviceName="s:DoubleItService" depends-on="StaxClientAuthHttpsSettings" address="https://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleittransportsaml1" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -37,7 +37,7 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2Port" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.transport.StaxServer}/doubleit/services/doubleittransportsaml2" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2Port" serviceName="s:DoubleItService" depends-on="StaxClientAuthHttpsSettings" address="https://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleittransportsaml2" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -47,7 +47,7 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml1endorsing" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1EndorsingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.transport.StaxServer}/doubleit/services/doubleittransportsaml1endorsing" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML1EndorsingPort" serviceName="s:DoubleItService" depends-on="StaxClientAuthHttpsSettings" address="https://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleittransportsaml1endorsing" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -55,7 +55,7 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2x509endorsing" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2X509EndorsingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.transport.StaxServer}/doubleit/services/doubleittransportsaml2x509endorsing" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2X509EndorsingPort" serviceName="s:DoubleItService" depends-on="StaxClientAuthHttpsSettings" address="https://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleittransportsaml2x509endorsing" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="stsKeystore.properties"/>
@@ -64,7 +64,7 @@
<entry key="ws-security.enable.timestamp.cache" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2symmetricendorsing" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2SymmetricEndorsingPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.transport.StaxServer}/doubleit/services/doubleittransportsaml2symmetricendorsing" wsdlLocation="org/apache/cxf/systest/sts/transpor [...]
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2SymmetricEndorsingPort" serviceName="s:DoubleItService" depends-on="StaxClientAuthHttpsSettings" address="https://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleittransportsaml2symmetricendorsing" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -73,7 +73,7 @@
<entry key="ws-security.enable.timestamp.cache" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleittransportsaml2symmetricendorsingderived" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2SymmetricEndorsingDerivedPort" serviceName="s:DoubleItService" depends-on="ClientAuthHttpsSettings" address="https://localhost:${testutil.ports.transport.StaxServer}/doubleit/services/doubleittransportsaml2symmetricendorsingderived" wsdlLocation="org/apache/cxf [...]
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItTransportSAML2SymmetricEndorsingDerivedPort" serviceName="s:DoubleItService" depends-on="StaxClientAuthHttpsSettings" address="https://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleittransportsaml2symmetricendorsingderived" wsdlLocation="org/apache/cxf/systest/sts/transport/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -82,8 +82,8 @@
<entry key="ws-security.enable.timestamp.cache" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <httpj:engine-factory id="ClientAuthHttpsSettings" bus="cxf">
- <httpj:engine port="${testutil.ports.transport.StaxServer}">
+ <httpj:engine-factory id="StaxClientAuthHttpsSettings" bus="cxf">
+ <httpj:engine port="${testutil.ports.StaxDoubleItServer}">
<httpj:tlsServerParameters>
<sec:keyManagers keyPassword="skpass">
<sec:keyStore type="jks" password="sspass" resource="keys/servicestore.jks"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-service.xml
index 75c04e2..104527c 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-service.xml
@@ -26,7 +26,7 @@
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http: [...]
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_actas.Server}/doubleit/services/doubleitasymmetricsaml2bearer" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitasymmetricsaml2bearer" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -38,7 +38,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort2" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_actas.Server}/doubleit/services/doubleitasymmetricsaml2bearer2" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort2" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitasymmetricsaml2bearer2" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -50,7 +50,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer3" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort3" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_actas.Server}/doubleit/services/doubleitasymmetricsaml2bearer3" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer3" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort3" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitasymmetricsaml2bearer3" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -62,7 +62,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer4" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort4" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_actas.Server}/doubleit/services/doubleitasymmetricsaml2bearer4" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer4" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort4" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitasymmetricsaml2bearer4" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -75,7 +75,7 @@
<entry key="security.validate.audience-restriction" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer5" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort5" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_actas.Server}/doubleit/services/doubleitasymmetricsaml2bearer5" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer5" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort5" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitasymmetricsaml2bearer5" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-service2.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-service2.xml
index f6d187e..0d1a044 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-service2.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-service2.xml
@@ -26,7 +26,7 @@
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http: [...]
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_actas.Server2}/doubleit/services/doubleitasymmetricsaml2bearer" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer.2}/doubleit/services/doubleitasymmetricsaml2bearer" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -38,7 +38,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort2" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_actas.Server2}/doubleit/services/doubleitasymmetricsaml2bearer2" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort2" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer.2}/doubleit/services/doubleitasymmetricsaml2bearer2" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -50,7 +50,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer3" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort3" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_actas.Server2}/doubleit/services/doubleitasymmetricsaml2bearer3" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer3" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort3" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer.2}/doubleit/services/doubleitasymmetricsaml2bearer3" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -62,7 +62,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer4" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort4" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_actas.Server2}/doubleit/services/doubleitasymmetricsaml2bearer4" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer4" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort4" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer.2}/doubleit/services/doubleitasymmetricsaml2bearer4" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -74,7 +74,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer5" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort5" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_actas.Server2}/doubleit/services/doubleitasymmetricsaml2bearer5" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer5" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2BearerPort5" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer.2}/doubleit/services/doubleitasymmetricsaml2bearer5" wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service.xml
index 756d348..3108b35 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service.xml
@@ -26,7 +26,7 @@
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http: [...]
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_onbehalfof.Server}/doubleit/services/doubleitasymmetricsaml2bearerobo" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitasymmetricsaml2bearerobo" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -38,7 +38,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort2" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_onbehalfof.Server}/doubleit/services/doubleitasymmetricsaml2bearerobo2" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort2" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitasymmetricsaml2bearerobo2" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -50,7 +50,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer3" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort3" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_onbehalfof.Server}/doubleit/services/doubleitasymmetricsaml2bearerobo3" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer3" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort3" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitasymmetricsaml2bearerobo3" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -62,7 +62,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer4" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort4" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_onbehalfof.Server}/doubleit/services/doubleitasymmetricsaml2bearerobo4" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer4" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort4" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitasymmetricsaml2bearerobo4" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -75,7 +75,7 @@
<entry key="security.validate.audience-restriction" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer5" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort5" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_onbehalfof.Server}/doubleit/services/doubleitasymmetricsaml2bearerobo5" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer5" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort5" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitasymmetricsaml2bearerobo5" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service2.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service2.xml
index d661770..6c3839d 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service2.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service2.xml
@@ -26,7 +26,7 @@
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://cxf.apache.org/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd http: [...]
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"/>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_onbehalfof.Server2}/doubleit/services/doubleitasymmetricsaml2bearerobo" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer.2}/doubleit/services/doubleitasymmetricsaml2bearerobo" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -38,7 +38,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort2" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_onbehalfof.Server2}/doubleit/services/doubleitasymmetricsaml2bearerobo2" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort2" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer.2}/doubleit/services/doubleitasymmetricsaml2bearerobo2" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -50,7 +50,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer3" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort3" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_onbehalfof.Server2}/doubleit/services/doubleitasymmetricsaml2bearerobo3" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer3" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort3" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer.2}/doubleit/services/doubleitasymmetricsaml2bearerobo3" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -62,7 +62,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer4" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort4" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_onbehalfof.Server2}/doubleit/services/doubleitasymmetricsaml2bearerobo4" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer4" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort4" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer.2}/doubleit/services/doubleitasymmetricsaml2bearerobo4" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
@@ -74,7 +74,7 @@
<entry key="ws-security.is-bsp-compliant" value="false"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer5" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort5" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.username_onbehalfof.Server2}/doubleit/services/doubleitasymmetricsaml2bearerobo5" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2bearer5" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItOBOAsymmetricSAML2BearerPort5" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer.2}/doubleit/services/doubleitasymmetricsaml2bearerobo5" wsdlLocation="org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-asymmetric-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-asymmetric-service.xml
index 5f6afc7..fff9746 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-asymmetric-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-asymmetric-service.xml
@@ -45,7 +45,7 @@
<bean id="customSecurityContextCreator"
class="org.apache.cxf.systest.sts.x509.CustomWSS4JSecurityContextCreator" />
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.AsymmetricServer}/doubleit/services/doubleitasymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleItAsymmetric.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItPortType}/doubleit/services/doubleitasymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleItAsymmetric.wsdl">
<jaxws:properties>
<entry key="security.signature.username" value="myservicekey"/>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-service.xml
index 6da0dbf..2a5d30b 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-service.xml
@@ -49,7 +49,7 @@
</property>
</bean>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.Server}/doubleit/services/doubleitsymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitsymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -59,7 +59,7 @@
</entry>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.Server}/doubleit/services/doubleitsymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitsymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -74,7 +74,7 @@
</entry>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2endorsing" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2EndorsingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.Server}/doubleit/services/doubleitsymmetricsaml2endorsing" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2EndorsingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitsymmetricsaml2endorsing" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -82,7 +82,7 @@
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2supporting" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2SupportingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.Server}/doubleit/services/doubleitsymmetricsaml2supporting" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2SupportingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.DoubleItServer}/doubleit/services/doubleitsymmetricsaml2supporting" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-stax-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-stax-service.xml
index 23dc938..f6a7d7e 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-stax-service.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-stax-service.xml
@@ -49,7 +49,7 @@
</property>
</bean>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.StaxServer}/doubleit/services/doubleitsymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleitsymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -65,7 +65,7 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.StaxServer}/doubleit/services/doubleitsymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleitsymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -76,7 +76,7 @@
<entry key="ws-security.enable.streaming" value="true"/>
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2endorsing" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2EndorsingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.StaxServer}/doubleit/services/doubleitsymmetricsaml2endorsing" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2EndorsingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleitsymmetricsaml2endorsing" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
@@ -85,7 +85,7 @@
</jaxws:properties>
</jaxws:endpoint>
- <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2supporting" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2SupportingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.StaxServer}/doubleit/services/doubleitsymmetricsaml2supporting" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2SupportingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.StaxDoubleItServer}/doubleit/services/doubleitsymmetricsaml2supporting" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
<jaxws:properties>
<entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
<entry key="security.signature.properties" value="serviceKeystore.properties"/>
[cxf] 02/02: cxf-rt-ws-addr: fix PMD rule: UnusedAssignment
Posted by bu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
buhhunyx pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit b341f7cd05a5130f53efd56c01d14136655afe35
Author: Alexey Markevich <bu...@gmail.com>
AuthorDate: Mon Mar 15 20:25:33 2021 +0300
cxf-rt-ws-addr: fix PMD rule: UnusedAssignment
---
.../java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java | 2 +-
.../main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java | 3 +--
.../addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java | 3 +--
.../src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java | 2 +-
4 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
index 8c46dac..6182ef0 100644
--- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
+++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
@@ -375,7 +375,7 @@ final class InternalContextUtils {
* @return the Action URI
*/
public static AttributedURIType getAction(Message message) {
- String action = null;
+ final String action;
LOG.fine("Determining action");
Exception fault = message.getContent(Exception.class);
diff --git a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
index d6f8278..a1f442a 100644
--- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
+++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
@@ -1061,8 +1061,7 @@ public class MAPAggregatorImpl extends MAPAggregator {
boolean isProviderContext,
boolean isOutbound) {
- AddressingProperties maps = null;
- maps = ContextUtils.retrieveMAPs(message,
+ AddressingProperties maps = ContextUtils.retrieveMAPs(message,
isProviderContext,
isOutbound);
LOG.log(Level.FINE, "MAPs retrieved from message {0}", maps);
diff --git a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
index eccbaf1..e605609 100644
--- a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
+++ b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/soap/MAPCodec.java
@@ -386,13 +386,12 @@ public class MAPCodec extends AbstractSoapInterceptor {
if (header == null) {
header = getHeaderFactory().getHeader(msg.getVersion());
}
- JAXBElement<?> jaxbEl = null;
if (o instanceof Element) {
Element e = (Element)o;
Node importedNode = header.getOwnerDocument().importNode(e, true);
header.appendChild(importedNode);
} else {
- jaxbEl = (JAXBElement<?>) o;
+ JAXBElement<?> jaxbEl = (JAXBElement<?>) o;
ctx.createMarshaller().marshal(jaxbEl, header);
}
diff --git a/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java b/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java
index 760e27d..b30fbf6 100644
--- a/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java
+++ b/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java
@@ -612,7 +612,7 @@ public class MAPCodecTest {
}
private boolean isReply(boolean exposedAsNative) {
- boolean isReply = false;
+ final boolean isReply;
if (exposedAsNative) {
isReply =
Names.WSA_RELATIONSHIP_REPLY.equals(