cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1421395 [1/2] - in /cxf/branches/2.5.x-fixes/services/sts/systests: advanced/src/test/java/org/apache/cxf/systest/sts/caching/ advanced/src/test/resources/org/apache/cxf/systest/sts/caching/ basic/src/test/java/org/apache/cxf/systest/sts/u...
Date Thu, 13 Dec 2012 17:27:32 GMT
Author: coheigea
Date: Thu Dec 13 17:27:30 2012
New Revision: 1421395

URL: http://svn.apache.org/viewvc?rev=1421395&view=rev
Log:
Merged revisions 1421387 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

........
  r1421387 | coheigea | 2012-12-13 17:12:30 +0000 (Thu, 13 Dec 2012) | 10 lines

  Merged revisions 1421358 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk

  ........
    r1421358 | coheigea | 2012-12-13 16:15:09 +0000 (Thu, 13 Dec 2012) | 2 lines

    Using different WSDL ports for various STS caching tests to try to stop random failures

  ........

........

Modified:
    cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
    cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/DoubleIt.wsdl
    cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml
    cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml
    cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
    cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
    cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl
    cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-client.xml
    cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-service.xml
    cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl
    cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-client.xml
    cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-service.xml

Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java?rev=1421395&r1=1421394&r2=1421395&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/CachingTest.java Thu Dec 13 17:27:30 2012
@@ -103,33 +103,33 @@ public class CachingTest extends Abstrac
         URL wsdl = CachingTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
         QName portQName = new QName(NAMESPACE, "DoubleItTransportSAML1Port");
-        DoubleItPortType transportSaml1Port = 
+        DoubleItPortType port = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(transportSaml1Port, PORT);
+        updateAddressPort(port, PORT);
         
         // Make a successful invocation
-        doubleIt(transportSaml1Port, 25);
+        doubleIt(port, 25);
         
         // Change the STSClient so that it can no longer find the STS
-        BindingProvider p = (BindingProvider)transportSaml1Port;
+        BindingProvider p = (BindingProvider)port;
         clearSTSClient(p);
         
         // This should succeed as the token is cached
-        doubleIt(transportSaml1Port, 30);
+        doubleIt(port, 30);
         
         // This should fail as the cached token is manually removed
-        Client client = ClientProxy.getClient(transportSaml1Port);
+        Client client = ClientProxy.getClient(port);
         Endpoint ep = client.getEndpoint();
         ep.remove(SecurityConstants.TOKEN_ID);
 
         try {
-            doubleIt(transportSaml1Port, 35);
+            doubleIt(port, 35);
             fail("Expected failure on clearing the cache");
         } catch (SOAPFaultException ex) {
             // Expected
         }
         
-        ((java.io.Closeable)transportSaml1Port).close();
+        ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
     
@@ -145,32 +145,32 @@ public class CachingTest extends Abstrac
 
         URL wsdl = CachingTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItTransportSAML1Port");
-        DoubleItPortType transportSaml1Port = 
+        QName portQName = new QName(NAMESPACE, "DoubleItTransportSAML1Port2");
+        DoubleItPortType port = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(transportSaml1Port, PORT);
+        updateAddressPort(port, PORT);
         
         // Disable storing tokens per-proxy
-        ((BindingProvider)transportSaml1Port).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             SecurityConstants.CACHE_ISSUED_TOKEN_IN_ENDPOINT, "false"
         );
         
         // Make a successful invocation
-        doubleIt(transportSaml1Port, 25);
+        doubleIt(port, 25);
         
         // Change the STSClient so that it can no longer find the STS
-        BindingProvider p = (BindingProvider)transportSaml1Port;
+        BindingProvider p = (BindingProvider)port;
         clearSTSClient(p);
         
         // This should fail as it can't get the token
         try {
-            doubleIt(transportSaml1Port, 35);
+            doubleIt(port, 35);
             fail("Expected failure");
         } catch (SOAPFaultException ex) {
             // Expected
         }
         
-        ((java.io.Closeable)transportSaml1Port).close();
+        ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
     
@@ -187,15 +187,15 @@ public class CachingTest extends Abstrac
         URL wsdl = CachingTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
         QName portQName = new QName(NAMESPACE, "DoubleItTransportSAML1AlternativePort");
-        DoubleItPortType transportSaml1Port = 
+        DoubleItPortType port = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(transportSaml1Port, PORT);
+        updateAddressPort(port, PORT);
         
         // Make an initial successful invocation
-        doubleIt(transportSaml1Port, 25);
+        doubleIt(port, 25);
         
         // Store the SAML Assertion that was obtained from the STS
-        Client client = ClientProxy.getClient(transportSaml1Port);
+        Client client = ClientProxy.getClient(port);
         Endpoint ep = client.getEndpoint();
         String id = (String)ep.get(SecurityConstants.TOKEN_ID);
         TokenStore store = (TokenStore)ep.getEndpointInfo().getProperty(TokenStore.class.getName());
@@ -212,16 +212,16 @@ public class CachingTest extends Abstrac
         // Try another invocation - this will fail as the STSClient on the server side is disabled
         // after the first invocation
         try {
-            doubleIt(transportSaml1Port, 30);
+            doubleIt(port, 30);
             fail("Failure expected as the STSClient on the server side is null");
         } catch (Throwable ex) {
             // expected
         }
         // Try again using the original SAML token - this should work as it should be cached by the service
         tok.setToken(storedToken);
-        doubleIt(transportSaml1Port, 35);
+        doubleIt(port, 35);
         
-        ((java.io.Closeable)transportSaml1Port).close();
+        ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
     

Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/DoubleIt.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/DoubleIt.wsdl?rev=1421395&r1=1421394&r2=1421395&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/DoubleIt.wsdl (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/DoubleIt.wsdl Thu Dec 13 17:27:30 2012
@@ -60,6 +60,22 @@
 			</wsdl:output>
 		</wsdl:operation>
 	</wsdl:binding>
+	<wsdl:binding name="DoubleItTransportSAML1Binding2" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItBindingTransportSAML1Policy" />
+        <soap:binding style="document"
+            transport="http://schemas.xmlsoap.org/soap/http" />
+        <wsdl:operation name="DoubleIt">
+            <soap:operation soapAction="" />
+            <wsdl:input>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Input_Policy" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
 	<wsdl:binding name="DoubleItAsymmetricBSTBinding" type="tns:DoubleItPortType">
 		<wsp:PolicyReference URI="#DoubleItBindingAsymmetricBSTPolicy" />
 		<soap:binding style="document"
@@ -86,6 +102,10 @@
 			<soap:address
 				location="https://localhost:8081/doubleit/services/doubleittransportsaml1" />
 		</wsdl:port>
+		<wsdl:port name="DoubleItTransportSAML1Port2" binding="tns:DoubleItTransportSAML1Binding2">
+            <soap:address
+                location="https://localhost:8081/doubleit/services/doubleittransportsaml12" />
+        </wsdl:port>
 		<wsdl:port name="DoubleItTransportSAML1AlternativePort" binding="tns:DoubleItTransportSAML1Binding">
             <soap:address
                 location="https://localhost:8081/doubleit/services/doubleittransportsaml1alternative" />

Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml?rev=1421395&r1=1421394&r2=1421395&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-client.xml Thu Dec 13 17:27:30 2012
@@ -63,6 +63,32 @@ http://cxf.apache.org/configuration/secu
        </jaxws:properties>
    </jaxws:client>
    
+   <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItTransportSAML1Port2" createdFromAPI="true">
+       <jaxws:properties>
+           <entry key="ws-security.sts.client">
+               <bean 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"/>
+                   <property name="endpointName" 
+                             value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}Transport_Port"/>
+                   <property name="properties">
+                       <map>
+                           <entry key="ws-security.username" value="alice"/>
+                           <entry key="ws-security.callback-handler" 
+                                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+                           <entry key="ws-security.sts.token.username" value="myclientkey"/>
+                           <entry key="ws-security.sts.token.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.sts.token.usecert" value="true"/> 
+                       </map>
+                   </property>
+               </bean>            
+           </entry> 
+       </jaxws:properties>
+   </jaxws:client>
+   
    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItTransportSAML1AlternativePort" 
                  createdFromAPI="true">
        <jaxws:properties>

Modified: cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml?rev=1421395&r1=1421394&r2=1421395&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/caching/cxf-service.xml Thu Dec 13 17:27:30 2012
@@ -58,6 +58,25 @@
       </jaxws:properties> 
    </jaxws:endpoint>
    
+   <jaxws:endpoint id="doubleittransportsaml12"
+      implementor="org.apache.cxf.systest.sts.caching.DoubleItPortTypeImpl"
+      endpointName="s:DoubleItTransportSAML1Port2"
+      serviceName="s:DoubleItService"
+      depends-on="ClientAuthHttpsSettings"
+      address="https://localhost:${testutil.ports.Server}/doubleit/services/doubleittransportsaml12"
+      wsdlLocation="org/apache/cxf/systest/sts/caching/DoubleIt.wsdl"
+      xmlns:s="http://www.example.org/contract/DoubleIt">
+        
+      <jaxws:properties>
+         <entry key="ws-security.callback-handler" 
+                value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+         <entry key="ws-security.signature.properties" value="serviceKeystore.properties"/>
+         <entry key="ws-security.saml1.validator">
+              <bean class="org.apache.cxf.ws.security.trust.STSTokenValidator"/>
+         </entry>
+      </jaxws:properties> 
+   </jaxws:endpoint>
+   
    <jaxws:endpoint id="doubleittransportsaml1alternative"
       implementor="org.apache.cxf.systest.sts.caching.DoubleItPortTypeImpl"
       endpointName="s:DoubleItTransportSAML1AlternativePort"

Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java?rev=1421395&r1=1421394&r2=1421395&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_actas/UsernameActAsTest.java Thu Dec 13 17:27:30 2012
@@ -97,40 +97,40 @@ public class UsernameActAsTest extends A
         URL wsdl = UsernameActAsTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
         QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSAML2BearerPort");
-        DoubleItPortType bearerPort = 
+        DoubleItPortType port = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(bearerPort, PORT);
+        updateAddressPort(port, PORT);
         if (standalone) {
-            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort, STSPORT2);
+            TokenTestUtils.updateSTSPort((BindingProvider)port, STSPORT2);
         }
         
         // Transport port
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
-        ((java.io.Closeable)bearerPort).close();
+        ((java.io.Closeable)port).close();
         
-        DoubleItPortType bearerPort2 = 
+        DoubleItPortType port2 = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(bearerPort2, PORT);
+        updateAddressPort(port2, PORT);
         if (standalone) {
-            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort2, STSPORT2);
+            TokenTestUtils.updateSTSPort((BindingProvider)port2, STSPORT2);
         }
         
-        ((BindingProvider)bearerPort2).getRequestContext().put(
+        ((BindingProvider)port2).getRequestContext().put(
             "ws-security.username", "eve"
         );
         // This time we expect a failure as the server validator doesn't accept "eve".
         try {
-            doubleIt(bearerPort2, 30);
+            doubleIt(port2, 30);
             fail("Failure expected on an unknown user");
         } catch (Exception ex) {
             // expected
         }
         
-        ((java.io.Closeable)bearerPort2).close();
+        ((java.io.Closeable)port2).close();
         bus.shutdown(true);
     }
     
@@ -149,53 +149,53 @@ public class UsernameActAsTest extends A
 
         URL wsdl = UsernameActAsTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSAML2BearerPort");
+        QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSAML2BearerPort2");
         
         //
         // Proxy no. 1
         // 
-        DoubleItPortType bearerPort = 
+        DoubleItPortType port = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(bearerPort, PORT);
+        updateAddressPort(port, PORT);
         if (standalone) {
-            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort, STSPORT2);
+            TokenTestUtils.updateSTSPort((BindingProvider)port, STSPORT2);
         }
         
         TokenStore tokenStore = new MemoryTokenStore();
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             TokenStore.class.getName(), tokenStore
         );
 
         // Make a successful invocation
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
         // Change the STSClient so that it can no longer find the STS
-        BindingProvider p = (BindingProvider)bearerPort;
+        BindingProvider p = (BindingProvider)port;
         clearSTSClient(p);
         
         // This invocation should be successful as the token is cached
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
         // 
         // Proxy no. 2
         //
-        DoubleItPortType bearerPort2 = 
+        DoubleItPortType port2 = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(bearerPort2, PORT);
+        updateAddressPort(port2, PORT);
         if (standalone) {
-            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort2, STSPORT2);
+            TokenTestUtils.updateSTSPort((BindingProvider)port2, STSPORT2);
         }
         
         // Change the STSClient so that it can no longer find the STS
-        p = (BindingProvider)bearerPort2;
+        p = (BindingProvider)port2;
         clearSTSClient(p);
         
         // This should fail as the cache is not being used
         try {
-            doubleIt(bearerPort2, 40);
+            doubleIt(port2, 40);
             fail("Failure expected as the token is not stored in the cache");
         } catch (Exception ex) {
             // expected
@@ -206,18 +206,18 @@ public class UsernameActAsTest extends A
         
         // Make another invocation - this should succeed as the token is cached
         p.getRequestContext().put("ws-security.username", "alice");
-        doubleIt(bearerPort2, 40);
+        doubleIt(port2, 40);
         
         // Reset the cache - this invocation should fail
         p.getRequestContext().put(TokenStore.class.getName(), new MemoryTokenStore());
         try {
-            doubleIt(bearerPort2, 40);
+            doubleIt(port2, 40);
             fail("Failure expected as the cache is reset");
         } catch (Exception ex) {
             // expected
         }
         
-        ((java.io.Closeable)bearerPort).close();
+        ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
     
@@ -236,61 +236,61 @@ public class UsernameActAsTest extends A
 
         URL wsdl = UsernameActAsTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSAML2BearerPort");
+        QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSAML2BearerPort3");
         
-        DoubleItPortType bearerPort = 
+        DoubleItPortType port = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(bearerPort, PORT);
+        updateAddressPort(port, PORT);
         if (standalone) {
-            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort, STSPORT2);
+            TokenTestUtils.updateSTSPort((BindingProvider)port, STSPORT2);
         }
         
         // Disable storing tokens per-proxy
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             SecurityConstants.CACHE_ISSUED_TOKEN_IN_ENDPOINT, "false"
         );
         
         // Make a successful invocation
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "bob"
         );
-        doubleIt(bearerPort, 30);
+        doubleIt(port, 30);
         
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "eve"
         );
         try {
-            doubleIt(bearerPort, 30);
+            doubleIt(port, 30);
             fail("Failure expected on a bad user");
         } catch (Exception ex) {
             //
         }
         
         // Change the STSClient so that it can no longer find the STS
-        BindingProvider p = (BindingProvider)bearerPort;
+        BindingProvider p = (BindingProvider)port;
         clearSTSClient(p);
         
         // Make a successful invocation
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "bob"
         );
-        doubleIt(bearerPort, 30);
+        doubleIt(port, 30);
         
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "eve2"
         );
         try {
-            doubleIt(bearerPort, 30);
+            doubleIt(port, 30);
             fail("Failure expected on a bad user");
         } catch (Exception ex) {
             //
@@ -298,17 +298,17 @@ public class UsernameActAsTest extends A
         
         // Reset the cache - this invocation should fail
         p.getRequestContext().put(TokenStore.class.getName(), new MemoryTokenStore());
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
         try {
-            doubleIt(bearerPort, 30);
+            doubleIt(port, 30);
             fail("Failure expected");
         } catch (Exception ex) {
             //
         }
         
-        ((java.io.Closeable)bearerPort).close();
+        ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
     
@@ -327,66 +327,66 @@ public class UsernameActAsTest extends A
 
         URL wsdl = UsernameActAsTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSAML2BearerPort");
+        QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSAML2BearerPort4");
         
-        DoubleItPortType bearerPort = 
+        DoubleItPortType port = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(bearerPort, PORT);
+        updateAddressPort(port, PORT);
         if (standalone) {
-            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort, STSPORT2);
+            TokenTestUtils.updateSTSPort((BindingProvider)port, STSPORT2);
         }
         
         // Disable storing tokens per-proxy
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             SecurityConstants.CACHE_ISSUED_TOKEN_IN_ENDPOINT, "false"
         );
         
         // Make a successful invocation
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
-        BindingProvider p = (BindingProvider)bearerPort;
+        BindingProvider p = (BindingProvider)port;
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
             "http://localhost:" + PORT + "/doubleit/services/doubleitasymmetricnew"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
         // Make a successful invocation
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "bob"
         );
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
             "http://localhost:" + PORT + "/doubleit/services/doubleitasymmetricnew2"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
         // Change the STSClient so that it can no longer find the STS
         clearSTSClient(p);
         
         // Make a successful invocation - should work as token is cached
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
             "http://localhost:" + PORT + "/doubleit/services/doubleitasymmetricnew"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
         // Make a successful invocation - should work as token is cached
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "bob"
         );
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
             "http://localhost:" + PORT + "/doubleit/services/doubleitasymmetricnew2"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
         // Change appliesTo - should fail
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
         p.getRequestContext().put(
@@ -394,13 +394,13 @@ public class UsernameActAsTest extends A
             "http://localhost:" + PORT + "/doubleit/services/doubleitasymmetricnew2"
         );
         try {
-            doubleIt(bearerPort, 30);
+            doubleIt(port, 30);
             fail("Failure expected");
         } catch (Exception ex) {
             //
         }
         
-        ((java.io.Closeable)bearerPort).close();
+        ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
     
@@ -419,48 +419,48 @@ public class UsernameActAsTest extends A
 
         URL wsdl = UsernameActAsTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSAML2BearerPort");
+        QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSAML2BearerPort5");
         
-        DoubleItPortType bearerPort = 
+        DoubleItPortType port = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(bearerPort, PORT);
+        updateAddressPort(port, PORT);
         if (standalone) {
-            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort, STSPORT2);
+            TokenTestUtils.updateSTSPort((BindingProvider)port, STSPORT2);
         }
         
         // Disable storing tokens per-proxy
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             SecurityConstants.CACHE_ISSUED_TOKEN_IN_ENDPOINT, "false"
         );
         
         // Make a successful invocation
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
         // Disable appliesTo
-        BindingProvider p = (BindingProvider)bearerPort;
+        BindingProvider p = (BindingProvider)port;
         STSClient stsClient = (STSClient)p.getRequestContext().get(SecurityConstants.STS_CLIENT);
         stsClient.setEnableAppliesTo(false);
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
         // Change the STSClient so that it can no longer find the STS
         clearSTSClient(p);
         
         // This should work
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
         // Bob should fail
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "bob"
         );
         try {
-            doubleIt(bearerPort, 30);
+            doubleIt(port, 30);
             fail("Failure expected");
         } catch (Exception ex) {
             //
         }
         
-        ((java.io.Closeable)bearerPort).close();
+        ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
     

Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java?rev=1421395&r1=1421394&r2=1421395&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/username_onbehalfof/UsernameOnBehalfOfTest.java Thu Dec 13 17:27:30 2012
@@ -96,39 +96,39 @@ public class UsernameOnBehalfOfTest exte
         URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
         QName portQName = new QName(NAMESPACE, "DoubleItOBOAsymmetricSAML2BearerPort");
-        DoubleItPortType bearerPort = 
+        DoubleItPortType port = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(bearerPort, PORT);
+        updateAddressPort(port, PORT);
         if (standalone) {
-            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort, STSPORT2);
+            TokenTestUtils.updateSTSPort((BindingProvider)port, STSPORT2);
         }
 
         // Transport port
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
-        ((java.io.Closeable)bearerPort).close();
+        ((java.io.Closeable)port).close();
         
-        DoubleItPortType bearerPort2 = 
+        DoubleItPortType port2 = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(bearerPort2, PORT);
+        updateAddressPort(port2, PORT);
         if (standalone) {
-            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort2, STSPORT2);
+            TokenTestUtils.updateSTSPort((BindingProvider)port2, STSPORT2);
         }
-        ((BindingProvider)bearerPort2).getRequestContext().put(
+        ((BindingProvider)port2).getRequestContext().put(
             "ws-security.username", "eve"
         );
         // This time we expect a failure as the server validator doesn't accept "eve".
         try {
-            doubleIt(bearerPort2, 30);
+            doubleIt(port2, 30);
             fail("Failure expected on an unknown user");
         } catch (Exception ex) {
             // expected
         }
         
-        ((java.io.Closeable)bearerPort2).close();
+        ((java.io.Closeable)port2).close();
         bus.shutdown(true);
     }
     
@@ -147,54 +147,54 @@ public class UsernameOnBehalfOfTest exte
 
         URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItOBOAsymmetricSAML2BearerPort");
+        QName portQName = new QName(NAMESPACE, "DoubleItOBOAsymmetricSAML2BearerPort2");
         
         //
         // Proxy no. 1
         // 
-        DoubleItPortType bearerPort = 
+        DoubleItPortType port = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(bearerPort, PORT);
+        updateAddressPort(port, PORT);
         if (standalone) {
-            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort, STSPORT2);
+            TokenTestUtils.updateSTSPort((BindingProvider)port, STSPORT2);
         }
         
         TokenStore tokenStore = new MemoryTokenStore();
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             TokenStore.class.getName(), tokenStore
         );
 
         // Make a successful invocation
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
         // Change the STSClient so that it can no longer find the STS
-        BindingProvider p = (BindingProvider)bearerPort;
+        BindingProvider p = (BindingProvider)port;
         clearSTSClient(p);
         
         // This invocation should be successful as the token is cached
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
-        ((java.io.Closeable)bearerPort).close();
+        ((java.io.Closeable)port).close();
         // 
         // Proxy no. 2
         //
-        DoubleItPortType bearerPort2 = 
+        DoubleItPortType port2 = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(bearerPort2, PORT);
+        updateAddressPort(port2, PORT);
         if (standalone) {
-            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort2, STSPORT2);
+            TokenTestUtils.updateSTSPort((BindingProvider)port2, STSPORT2);
         }
         
         // Change the STSClient so that it can no longer find the STS
-        p = (BindingProvider)bearerPort2;
+        p = (BindingProvider)port2;
         clearSTSClient(p);
         
         // This should fail as the cache is not being used
         try {
-            doubleIt(bearerPort2, 40);
+            doubleIt(port2, 40);
             fail("Failure expected as the token is not stored in the cache");
         } catch (Exception ex) {
             // expected
@@ -205,18 +205,18 @@ public class UsernameOnBehalfOfTest exte
         
         // Make another invocation - this should succeed as the token is cached
         p.getRequestContext().put("ws-security.username", "alice");
-        doubleIt(bearerPort2, 40);
+        doubleIt(port2, 40);
         
         // Reset the cache - this invocation should fail
         p.getRequestContext().put(TokenStore.class.getName(), new MemoryTokenStore());
         try {
-            doubleIt(bearerPort2, 40);
+            doubleIt(port2, 40);
             fail("Failure expected as the cache is reset");
         } catch (Exception ex) {
             // expected
         }
         
-        ((java.io.Closeable)bearerPort2).close();
+        ((java.io.Closeable)port2).close();
         bus.shutdown(true);
     }
     
@@ -235,61 +235,61 @@ public class UsernameOnBehalfOfTest exte
 
         URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItOBOAsymmetricSAML2BearerPort");
+        QName portQName = new QName(NAMESPACE, "DoubleItOBOAsymmetricSAML2BearerPort3");
         
-        DoubleItPortType bearerPort = 
+        DoubleItPortType port = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(bearerPort, PORT);
+        updateAddressPort(port, PORT);
         if (standalone) {
-            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort, STSPORT2);
+            TokenTestUtils.updateSTSPort((BindingProvider)port, STSPORT2);
         }
         
         // Disable storing tokens per-proxy
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             SecurityConstants.CACHE_ISSUED_TOKEN_IN_ENDPOINT, "false"
         );
         
         // Make a successful invocation
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "bob"
         );
-        doubleIt(bearerPort, 30);
+        doubleIt(port, 30);
         
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "eve"
         );
         try {
-            doubleIt(bearerPort, 30);
+            doubleIt(port, 30);
             fail("Failure expected on a bad user");
         } catch (Exception ex) {
             //
         }
         
         // Change the STSClient so that it can no longer find the STS
-        BindingProvider p = (BindingProvider)bearerPort;
+        BindingProvider p = (BindingProvider)port;
         clearSTSClient(p);
         
         // Make a successful invocation
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "bob"
         );
-        doubleIt(bearerPort, 30);
+        doubleIt(port, 30);
         
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "eve2"
         );
         try {
-            doubleIt(bearerPort, 30);
+            doubleIt(port, 30);
             fail("Failure expected on a bad user");
         } catch (Exception ex) {
             //
@@ -297,17 +297,17 @@ public class UsernameOnBehalfOfTest exte
         
         // Reset the cache - this invocation should fail
         p.getRequestContext().put(TokenStore.class.getName(), new MemoryTokenStore());
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
         try {
-            doubleIt(bearerPort, 30);
+            doubleIt(port, 30);
             fail("Failure expected");
         } catch (Exception ex) {
             //
         }
         
-        ((java.io.Closeable)bearerPort).close();
+        ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
     
@@ -326,66 +326,66 @@ public class UsernameOnBehalfOfTest exte
 
         URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItOBOAsymmetricSAML2BearerPort");
+        QName portQName = new QName(NAMESPACE, "DoubleItOBOAsymmetricSAML2BearerPort4");
         
-        DoubleItPortType bearerPort = 
+        DoubleItPortType port = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(bearerPort, PORT);
+        updateAddressPort(port, PORT);
         if (standalone) {
-            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort, STSPORT2);
+            TokenTestUtils.updateSTSPort((BindingProvider)port, STSPORT2);
         }
         
         // Disable storing tokens per-proxy
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             SecurityConstants.CACHE_ISSUED_TOKEN_IN_ENDPOINT, "false"
         );
         
         // Make a successful invocation
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
-        BindingProvider p = (BindingProvider)bearerPort;
+        BindingProvider p = (BindingProvider)port;
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
             "http://localhost:" + PORT + "/doubleit/services/doubleitasymmetricnew"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
         // Make a successful invocation
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "bob"
         );
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
             "http://localhost:" + PORT + "/doubleit/services/doubleitasymmetricnew2"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
         // Change the STSClient so that it can no longer find the STS
         clearSTSClient(p);
         
         // Make a successful invocation - should work as token is cached
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
             "http://localhost:" + PORT + "/doubleit/services/doubleitasymmetricnew"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
         // Make a successful invocation - should work as token is cached
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "bob"
         );
         p.getRequestContext().put(
             SecurityConstants.STS_APPLIES_TO, 
             "http://localhost:" + PORT + "/doubleit/services/doubleitasymmetricnew2"
         );
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
         // Change appliesTo - should fail
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
         p.getRequestContext().put(
@@ -393,13 +393,13 @@ public class UsernameOnBehalfOfTest exte
             "http://localhost:" + PORT + "/doubleit/services/doubleitasymmetricnew2"
         );
         try {
-            doubleIt(bearerPort, 30);
+            doubleIt(port, 30);
             fail("Failure expected");
         } catch (Exception ex) {
             //
         }
         
-        ((java.io.Closeable)bearerPort).close();
+        ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
     
@@ -418,48 +418,48 @@ public class UsernameOnBehalfOfTest exte
 
         URL wsdl = UsernameOnBehalfOfTest.class.getResource("DoubleIt.wsdl");
         Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItOBOAsymmetricSAML2BearerPort");
+        QName portQName = new QName(NAMESPACE, "DoubleItOBOAsymmetricSAML2BearerPort5");
         
-        DoubleItPortType bearerPort = 
+        DoubleItPortType port = 
             service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(bearerPort, PORT);
+        updateAddressPort(port, PORT);
         if (standalone) {
-            TokenTestUtils.updateSTSPort((BindingProvider)bearerPort, STSPORT2);
+            TokenTestUtils.updateSTSPort((BindingProvider)port, STSPORT2);
         }
         
         // Disable storing tokens per-proxy
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             SecurityConstants.CACHE_ISSUED_TOKEN_IN_ENDPOINT, "false"
         );
         
         // Make a successful invocation
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "alice"
         );
         // Disable appliesTo
-        BindingProvider p = (BindingProvider)bearerPort;
+        BindingProvider p = (BindingProvider)port;
         STSClient stsClient = (STSClient)p.getRequestContext().get(SecurityConstants.STS_CLIENT);
         stsClient.setEnableAppliesTo(false);
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
         // Change the STSClient so that it can no longer find the STS
         clearSTSClient(p);
         
         // This should work
-        doubleIt(bearerPort, 25);
+        doubleIt(port, 25);
         
         // Bob should fail
-        ((BindingProvider)bearerPort).getRequestContext().put(
+        ((BindingProvider)port).getRequestContext().put(
             "ws-security.username", "bob"
         );
         try {
-            doubleIt(bearerPort, 30);
+            doubleIt(port, 30);
             fail("Failure expected");
         } catch (Exception ex) {
             //
         }
         
-        ((java.io.Closeable)bearerPort).close();
+        ((java.io.Closeable)port).close();
         bus.shutdown(true);
     }
     

Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl?rev=1421395&r1=1421394&r2=1421395&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl Thu Dec 13 17:27:30 2012
@@ -44,6 +44,70 @@
 			</wsdl:output>
 		</wsdl:operation>
 	</wsdl:binding>
+	<wsdl:binding name="DoubleItAsymmetricSAML2BearerBinding2" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItBindingAsymmetricSAML2BearerPolicy" />
+        <soap:binding style="document"
+            transport="http://schemas.xmlsoap.org/soap/http" />
+        <wsdl:operation name="DoubleIt">
+            <soap:operation soapAction="" />
+            <wsdl:input>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Input_Policy" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="DoubleItAsymmetricSAML2BearerBinding3" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItBindingAsymmetricSAML2BearerPolicy" />
+        <soap:binding style="document"
+            transport="http://schemas.xmlsoap.org/soap/http" />
+        <wsdl:operation name="DoubleIt">
+            <soap:operation soapAction="" />
+            <wsdl:input>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Input_Policy" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="DoubleItAsymmetricSAML2BearerBinding4" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItBindingAsymmetricSAML2BearerPolicy" />
+        <soap:binding style="document"
+            transport="http://schemas.xmlsoap.org/soap/http" />
+        <wsdl:operation name="DoubleIt">
+            <soap:operation soapAction="" />
+            <wsdl:input>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Input_Policy" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="DoubleItAsymmetricSAML2BearerBinding5" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItBindingAsymmetricSAML2BearerPolicy" />
+        <soap:binding style="document"
+            transport="http://schemas.xmlsoap.org/soap/http" />
+        <wsdl:operation name="DoubleIt">
+            <soap:operation soapAction="" />
+            <wsdl:input>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Input_Policy" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
 
 	<wsdl:service name="DoubleItService">
 		<wsdl:port name="DoubleItAsymmetricSAML2BearerPort" 
@@ -51,6 +115,26 @@
 			<soap:address
 				location="http://localhost:8082/doubleit/services/doubleitasymmetricsaml2bearer" />
 		</wsdl:port>
+		<wsdl:port name="DoubleItAsymmetricSAML2BearerPort2" 
+                   binding="tns:DoubleItAsymmetricSAML2BearerBinding2">
+            <soap:address
+                location="http://localhost:8082/doubleit/services/doubleitasymmetricsaml2bearer2" />
+        </wsdl:port>
+        <wsdl:port name="DoubleItAsymmetricSAML2BearerPort3" 
+                   binding="tns:DoubleItAsymmetricSAML2BearerBinding3">
+            <soap:address
+                location="http://localhost:8082/doubleit/services/doubleitasymmetricsaml2bearer3" />
+        </wsdl:port>
+        <wsdl:port name="DoubleItAsymmetricSAML2BearerPort4" 
+                   binding="tns:DoubleItAsymmetricSAML2BearerBinding4">
+            <soap:address
+                location="http://localhost:8082/doubleit/services/doubleitasymmetricsaml2bearer4" />
+        </wsdl:port>
+        <wsdl:port name="DoubleItAsymmetricSAML2BearerPort5" 
+                   binding="tns:DoubleItAsymmetricSAML2BearerBinding5">
+            <soap:address
+                location="http://localhost:8082/doubleit/services/doubleitasymmetricsaml2bearer5" />
+        </wsdl:port>
 	</wsdl:service>
 	
 	<wsp:Policy wsu:Id="DoubleItBindingAsymmetricSAML2BearerPolicy">

Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-client.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-client.xml?rev=1421395&r1=1421394&r2=1421395&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-client.xml (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-client.xml Thu Dec 13 17:27:30 2012
@@ -37,7 +37,151 @@ http://cxf.apache.org/configuration/secu
     
     <bean id="delegationCallbackHandler" class="org.apache.cxf.ws.security.trust.delegation.WSSUsernameCallbackHandler" />
    
-   <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricSAML2BearerPort" 
+    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricSAML2BearerPort" 
+                  createdFromAPI="true">
+       <jaxws:properties>
+           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/>
+           <entry key="ws-security.signature.username" value="myclientkey"/>
+           <entry key="ws-security.callback-handler" 
+                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+           <entry key="ws-security.encryption.username" value="myservicekey"/>
+           <entry key="ws-security.sts.client">
+               <bean class="org.apache.cxf.ws.security.trust.STSClient">
+                   <constructor-arg ref="cxf"/>
+                   <property name="wsdlLocation" 
+                             value="http://localhost:8080/SecurityTokenService/X509?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/}X509_Port"/>
+                   <property name="actAs" ref="delegationCallbackHandler" />
+                   <property name="properties">
+                       <map>
+                           <entry key="ws-security.signature.username" value="myclientkey"/>
+                           <entry key="ws-security.callback-handler"
+                                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+                           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.username" value="mystskey"/>
+                           <entry key="ws-security.sts.token.username" value="myclientkey"/>
+                           <entry key="ws-security.sts.token.properties" value="clientKeystore.properties"/> 
+                       </map>
+                   </property>
+               </bean>            
+           </entry> 
+       </jaxws:properties>
+    </jaxws:client>
+   
+    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricSAML2BearerPort2" 
+                  createdFromAPI="true">
+       <jaxws:properties>
+           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/>
+           <entry key="ws-security.signature.username" value="myclientkey"/>
+           <entry key="ws-security.callback-handler" 
+                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+           <entry key="ws-security.encryption.username" value="myservicekey"/>
+           <entry key="ws-security.sts.client">
+               <bean class="org.apache.cxf.ws.security.trust.STSClient">
+                   <constructor-arg ref="cxf"/>
+                   <property name="wsdlLocation" 
+                             value="http://localhost:8080/SecurityTokenService/X509?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/}X509_Port"/>
+                   <property name="actAs" ref="delegationCallbackHandler" />
+                   <property name="properties">
+                       <map>
+                           <entry key="ws-security.signature.username" value="myclientkey"/>
+                           <entry key="ws-security.callback-handler"
+                                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+                           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.username" value="mystskey"/>
+                           <entry key="ws-security.sts.token.username" value="myclientkey"/>
+                           <entry key="ws-security.sts.token.properties" value="clientKeystore.properties"/> 
+                       </map>
+                   </property>
+               </bean>            
+           </entry> 
+       </jaxws:properties>
+   </jaxws:client>
+   
+    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricSAML2BearerPort3" 
+                  createdFromAPI="true">
+       <jaxws:properties>
+           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/>
+           <entry key="ws-security.signature.username" value="myclientkey"/>
+           <entry key="ws-security.callback-handler" 
+                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+           <entry key="ws-security.encryption.username" value="myservicekey"/>
+           <entry key="ws-security.sts.client">
+               <bean class="org.apache.cxf.ws.security.trust.STSClient">
+                   <constructor-arg ref="cxf"/>
+                   <property name="wsdlLocation" 
+                             value="http://localhost:8080/SecurityTokenService/X509?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/}X509_Port"/>
+                   <property name="actAs" ref="delegationCallbackHandler" />
+                   <property name="properties">
+                       <map>
+                           <entry key="ws-security.signature.username" value="myclientkey"/>
+                           <entry key="ws-security.callback-handler"
+                                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+                           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.username" value="mystskey"/>
+                           <entry key="ws-security.sts.token.username" value="myclientkey"/>
+                           <entry key="ws-security.sts.token.properties" value="clientKeystore.properties"/> 
+                       </map>
+                   </property>
+               </bean>            
+           </entry> 
+       </jaxws:properties>
+   </jaxws:client>
+   
+    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricSAML2BearerPort4" 
+                  createdFromAPI="true">
+       <jaxws:properties>
+           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/>
+           <entry key="ws-security.signature.username" value="myclientkey"/>
+           <entry key="ws-security.callback-handler" 
+                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+           <entry key="ws-security.encryption.username" value="myservicekey"/>
+           <entry key="ws-security.sts.client">
+               <bean class="org.apache.cxf.ws.security.trust.STSClient">
+                   <constructor-arg ref="cxf"/>
+                   <property name="wsdlLocation" 
+                             value="http://localhost:8080/SecurityTokenService/X509?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/}X509_Port"/>
+                   <property name="actAs" ref="delegationCallbackHandler" />
+                   <property name="properties">
+                       <map>
+                           <entry key="ws-security.signature.username" value="myclientkey"/>
+                           <entry key="ws-security.callback-handler"
+                                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+                           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.username" value="mystskey"/>
+                           <entry key="ws-security.sts.token.username" value="myclientkey"/>
+                           <entry key="ws-security.sts.token.properties" value="clientKeystore.properties"/> 
+                       </map>
+                   </property>
+               </bean>            
+           </entry> 
+       </jaxws:properties>
+   </jaxws:client>
+   
+    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricSAML2BearerPort5" 
                   createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.signature.properties" value="clientKeystore.properties"/>

Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-service.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-service.xml?rev=1421395&r1=1421394&r2=1421395&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-service.xml (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_actas/cxf-service.xml Thu Dec 13 17:27:30 2012
@@ -60,5 +60,89 @@
       </jaxws:properties> 
    </jaxws:endpoint>
    
+   <jaxws:endpoint id="doubleitasymmetricsaml2bearer2"
+      implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl"
+      endpointName="s:DoubleItAsymmetricSAML2BearerPort2"
+      serviceName="s:DoubleItService"
+      address="http://localhost:${testutil.ports.Server}/doubleit/services/doubleitasymmetricsaml2bearer2"
+      wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl"
+      xmlns:s="http://www.example.org/contract/DoubleIt">
+        
+      <jaxws:properties>
+         <entry key="ws-security.signature.username" value="myservicekey"/>
+         <entry key="ws-security.callback-handler" 
+                value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+         <entry key="ws-security.signature.properties" value="serviceKeystore.properties"/>
+         <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/>
+         <entry key="ws-security.saml2.validator">
+            <bean class="org.apache.cxf.systest.sts.username_actas.ActAsValidator"/>
+         </entry>
+         <entry key="ws-security.is-bsp-compliant" value="false"/>
+      </jaxws:properties> 
+   </jaxws:endpoint>
+   
+   <jaxws:endpoint id="doubleitasymmetricsaml2bearer3"
+      implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl"
+      endpointName="s:DoubleItAsymmetricSAML2BearerPort3"
+      serviceName="s:DoubleItService"
+      address="http://localhost:${testutil.ports.Server}/doubleit/services/doubleitasymmetricsaml2bearer3"
+      wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl"
+      xmlns:s="http://www.example.org/contract/DoubleIt">
+        
+      <jaxws:properties>
+         <entry key="ws-security.signature.username" value="myservicekey"/>
+         <entry key="ws-security.callback-handler" 
+                value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+         <entry key="ws-security.signature.properties" value="serviceKeystore.properties"/>
+         <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/>
+         <entry key="ws-security.saml2.validator">
+            <bean class="org.apache.cxf.systest.sts.username_actas.ActAsValidator"/>
+         </entry>
+         <entry key="ws-security.is-bsp-compliant" value="false"/>
+      </jaxws:properties> 
+   </jaxws:endpoint>
+   
+   <jaxws:endpoint id="doubleitasymmetricsaml2bearer4"
+      implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl"
+      endpointName="s:DoubleItAsymmetricSAML2BearerPort4"
+      serviceName="s:DoubleItService"
+      address="http://localhost:${testutil.ports.Server}/doubleit/services/doubleitasymmetricsaml2bearer4"
+      wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl"
+      xmlns:s="http://www.example.org/contract/DoubleIt">
+        
+      <jaxws:properties>
+         <entry key="ws-security.signature.username" value="myservicekey"/>
+         <entry key="ws-security.callback-handler" 
+                value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+         <entry key="ws-security.signature.properties" value="serviceKeystore.properties"/>
+         <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/>
+         <entry key="ws-security.saml2.validator">
+            <bean class="org.apache.cxf.systest.sts.username_actas.ActAsValidator"/>
+         </entry>
+         <entry key="ws-security.is-bsp-compliant" value="false"/>
+      </jaxws:properties> 
+   </jaxws:endpoint>
+   
+   <jaxws:endpoint id="doubleitasymmetricsaml2bearer5"
+      implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl"
+      endpointName="s:DoubleItAsymmetricSAML2BearerPort5"
+      serviceName="s:DoubleItService"
+      address="http://localhost:${testutil.ports.Server}/doubleit/services/doubleitasymmetricsaml2bearer5"
+      wsdlLocation="org/apache/cxf/systest/sts/username_actas/DoubleIt.wsdl"
+      xmlns:s="http://www.example.org/contract/DoubleIt">
+        
+      <jaxws:properties>
+         <entry key="ws-security.signature.username" value="myservicekey"/>
+         <entry key="ws-security.callback-handler" 
+                value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+         <entry key="ws-security.signature.properties" value="serviceKeystore.properties"/>
+         <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/>
+         <entry key="ws-security.saml2.validator">
+            <bean class="org.apache.cxf.systest.sts.username_actas.ActAsValidator"/>
+         </entry>
+         <entry key="ws-security.is-bsp-compliant" value="false"/>
+      </jaxws:properties> 
+   </jaxws:endpoint>
+   
 </beans>
 

Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl?rev=1421395&r1=1421394&r2=1421395&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/DoubleIt.wsdl Thu Dec 13 17:27:30 2012
@@ -44,6 +44,70 @@
 			</wsdl:output>
 		</wsdl:operation>
 	</wsdl:binding>
+	<wsdl:binding name="DoubleItAsymmetricSAML2BearerBinding2" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItBindingAsymmetricSAML2BearerPolicy" />
+        <soap:binding style="document"
+            transport="http://schemas.xmlsoap.org/soap/http" />
+        <wsdl:operation name="DoubleIt">
+            <soap:operation soapAction="" />
+            <wsdl:input>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Input_Policy" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="DoubleItAsymmetricSAML2BearerBinding3" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItBindingAsymmetricSAML2BearerPolicy" />
+        <soap:binding style="document"
+            transport="http://schemas.xmlsoap.org/soap/http" />
+        <wsdl:operation name="DoubleIt">
+            <soap:operation soapAction="" />
+            <wsdl:input>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Input_Policy" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="DoubleItAsymmetricSAML2BearerBinding4" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItBindingAsymmetricSAML2BearerPolicy" />
+        <soap:binding style="document"
+            transport="http://schemas.xmlsoap.org/soap/http" />
+        <wsdl:operation name="DoubleIt">
+            <soap:operation soapAction="" />
+            <wsdl:input>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Input_Policy" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="DoubleItAsymmetricSAML2BearerBinding5" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItBindingAsymmetricSAML2BearerPolicy" />
+        <soap:binding style="document"
+            transport="http://schemas.xmlsoap.org/soap/http" />
+        <wsdl:operation name="DoubleIt">
+            <soap:operation soapAction="" />
+            <wsdl:input>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Input_Policy" />
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal" />
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy" />
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
 
 	<wsdl:service name="DoubleItService">
 		<wsdl:port name="DoubleItOBOAsymmetricSAML2BearerPort" 
@@ -51,6 +115,26 @@
 			<soap:address
 				location="http://localhost:8082/doubleit/services/doubleitasymmetricsaml2bearerobo" />
 		</wsdl:port>
+		<wsdl:port name="DoubleItOBOAsymmetricSAML2BearerPort2" 
+                   binding="tns:DoubleItAsymmetricSAML2BearerBinding2">
+            <soap:address
+                location="http://localhost:8082/doubleit/services/doubleitasymmetricsaml2bearerobo2" />
+        </wsdl:port>
+        <wsdl:port name="DoubleItOBOAsymmetricSAML2BearerPort3" 
+                   binding="tns:DoubleItAsymmetricSAML2BearerBinding3">
+            <soap:address
+                location="http://localhost:8082/doubleit/services/doubleitasymmetricsaml2bearerobo3" />
+        </wsdl:port>
+        <wsdl:port name="DoubleItOBOAsymmetricSAML2BearerPort4" 
+                   binding="tns:DoubleItAsymmetricSAML2BearerBinding5">
+            <soap:address
+                location="http://localhost:8082/doubleit/services/doubleitasymmetricsaml2bearerobo4" />
+        </wsdl:port>
+        <wsdl:port name="DoubleItOBOAsymmetricSAML2BearerPort5" 
+                   binding="tns:DoubleItAsymmetricSAML2BearerBinding5">
+            <soap:address
+                location="http://localhost:8082/doubleit/services/doubleitasymmetricsaml2bearerobo5" />
+        </wsdl:port>
 	</wsdl:service>
 	
 	<wsp:Policy wsu:Id="DoubleItBindingAsymmetricSAML2BearerPolicy">

Modified: cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-client.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-client.xml?rev=1421395&r1=1421394&r2=1421395&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-client.xml (original)
+++ cxf/branches/2.5.x-fixes/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/username_onbehalfof/cxf-client.xml Thu Dec 13 17:27:30 2012
@@ -37,7 +37,151 @@ http://cxf.apache.org/configuration/secu
     
     <bean id="delegationCallbackHandler" class="org.apache.cxf.ws.security.trust.delegation.WSSUsernameCallbackHandler" />
    
-   <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItOBOAsymmetricSAML2BearerPort" 
+    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItOBOAsymmetricSAML2BearerPort" 
+                  createdFromAPI="true">
+       <jaxws:properties>
+           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/>
+           <entry key="ws-security.signature.username" value="myclientkey"/>
+           <entry key="ws-security.callback-handler" 
+                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+           <entry key="ws-security.encryption.username" value="myservicekey"/>
+           <entry key="ws-security.sts.client">
+               <bean class="org.apache.cxf.ws.security.trust.STSClient">
+                   <constructor-arg ref="cxf"/>
+                   <property name="wsdlLocation" 
+                             value="http://localhost:8080/SecurityTokenService/X509?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/}X509_Port"/>
+                   <property name="onBehalfOf" ref="delegationCallbackHandler" />
+                   <property name="properties">
+                       <map>
+                           <entry key="ws-security.signature.username" value="myclientkey"/>
+                           <entry key="ws-security.callback-handler" 
+                                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+                           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.username" value="mystskey"/>
+                           <entry key="ws-security.sts.token.username" value="myclientkey"/>
+                           <entry key="ws-security.sts.token.properties" value="clientKeystore.properties"/> 
+                       </map>
+                   </property>
+               </bean>            
+           </entry> 
+       </jaxws:properties>
+   </jaxws:client>
+   
+     <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItOBOAsymmetricSAML2BearerPort2" 
+                  createdFromAPI="true">
+       <jaxws:properties>
+           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/>
+           <entry key="ws-security.signature.username" value="myclientkey"/>
+           <entry key="ws-security.callback-handler" 
+                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+           <entry key="ws-security.encryption.username" value="myservicekey"/>
+           <entry key="ws-security.sts.client">
+               <bean class="org.apache.cxf.ws.security.trust.STSClient">
+                   <constructor-arg ref="cxf"/>
+                   <property name="wsdlLocation" 
+                             value="http://localhost:8080/SecurityTokenService/X509?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/}X509_Port"/>
+                   <property name="onBehalfOf" ref="delegationCallbackHandler" />
+                   <property name="properties">
+                       <map>
+                           <entry key="ws-security.signature.username" value="myclientkey"/>
+                           <entry key="ws-security.callback-handler" 
+                                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+                           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.username" value="mystskey"/>
+                           <entry key="ws-security.sts.token.username" value="myclientkey"/>
+                           <entry key="ws-security.sts.token.properties" value="clientKeystore.properties"/> 
+                       </map>
+                   </property>
+               </bean>            
+           </entry> 
+       </jaxws:properties>
+   </jaxws:client>
+   
+     <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItOBOAsymmetricSAML2BearerPort3" 
+                  createdFromAPI="true">
+       <jaxws:properties>
+           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/>
+           <entry key="ws-security.signature.username" value="myclientkey"/>
+           <entry key="ws-security.callback-handler" 
+                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+           <entry key="ws-security.encryption.username" value="myservicekey"/>
+           <entry key="ws-security.sts.client">
+               <bean class="org.apache.cxf.ws.security.trust.STSClient">
+                   <constructor-arg ref="cxf"/>
+                   <property name="wsdlLocation" 
+                             value="http://localhost:8080/SecurityTokenService/X509?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/}X509_Port"/>
+                   <property name="onBehalfOf" ref="delegationCallbackHandler" />
+                   <property name="properties">
+                       <map>
+                           <entry key="ws-security.signature.username" value="myclientkey"/>
+                           <entry key="ws-security.callback-handler" 
+                                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+                           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.username" value="mystskey"/>
+                           <entry key="ws-security.sts.token.username" value="myclientkey"/>
+                           <entry key="ws-security.sts.token.properties" value="clientKeystore.properties"/> 
+                       </map>
+                   </property>
+               </bean>            
+           </entry> 
+       </jaxws:properties>
+   </jaxws:client>
+   
+     <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItOBOAsymmetricSAML2BearerPort4" 
+                  createdFromAPI="true">
+       <jaxws:properties>
+           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/>
+           <entry key="ws-security.signature.username" value="myclientkey"/>
+           <entry key="ws-security.callback-handler" 
+                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+           <entry key="ws-security.encryption.username" value="myservicekey"/>
+           <entry key="ws-security.sts.client">
+               <bean class="org.apache.cxf.ws.security.trust.STSClient">
+                   <constructor-arg ref="cxf"/>
+                   <property name="wsdlLocation" 
+                             value="http://localhost:8080/SecurityTokenService/X509?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/}X509_Port"/>
+                   <property name="onBehalfOf" ref="delegationCallbackHandler" />
+                   <property name="properties">
+                       <map>
+                           <entry key="ws-security.signature.username" value="myclientkey"/>
+                           <entry key="ws-security.callback-handler" 
+                                  value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+                           <entry key="ws-security.signature.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.properties" value="clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.username" value="mystskey"/>
+                           <entry key="ws-security.sts.token.username" value="myclientkey"/>
+                           <entry key="ws-security.sts.token.properties" value="clientKeystore.properties"/> 
+                       </map>
+                   </property>
+               </bean>            
+           </entry> 
+       </jaxws:properties>
+   </jaxws:client>
+   
+   <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItOBOAsymmetricSAML2BearerPort5" 
                   createdFromAPI="true">
        <jaxws:properties>
            <entry key="ws-security.signature.properties" value="clientKeystore.properties"/>



Mime
View raw message