Author: dkulp
Date: Mon Dec 15 13:57:44 2008
New Revision: 726827
URL: http://svn.apache.org/viewvc?rev=726827&view=rev
Log:
Get WSTrust13 scenario 1 working!
Modified:
cxf/sandbox/interopfest/wstrust10/src/main/java/interop/client/Client.java
cxf/sandbox/interopfest/wstrust13/src/main/java/interop/client/Client.java
cxf/sandbox/interopfest/wstrust13/src/main/resources/etc/client.xml
cxf/sandbox/interopfest/wstrust13/src/style/makelocal.xsl
Modified:
cxf/sandbox/interopfest/wstrust10/src/main/java/interop/client/Client.java
URL:
http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wstrust10/src/main/java/interop/client/Client.java?rev=726827&r1=726826&r2=726827&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wstrust10/src/main/java/interop/client/Client.java
(original)
+++ cxf/sandbox/interopfest/wstrust10/src/main/java/interop/client/Client.java
Mon Dec 15 13:57:44 2008
@@ -103,6 +103,7 @@
}
SecurityToken responseToken = stsClient.requestSecurityToken();
+
((BindingProvider)port).getRequestContext().put(SecurityConstants.TRUST_TOKEN,
responseToken);
//TODO: stick security token into the RequestContext/TokenStore
final String output = port.echo(INPUT);
Modified:
cxf/sandbox/interopfest/wstrust13/src/main/java/interop/client/Client.java
URL:
http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wstrust13/src/main/java/interop/client/Client.java?rev=726827&r1=726826&r2=726827&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wstrust13/src/main/java/interop/client/Client.java
(original)
+++ cxf/sandbox/interopfest/wstrust13/src/main/java/interop/client/Client.java
Mon Dec 15 13:57:44 2008
@@ -67,7 +67,10 @@
public static void main(String argv[])
throws Exception {
if (argv.length < 2) {
- argv = new String[] {"CustomBinding_IPingServiceContract"};
+ //argv = new String[] {"CustomBinding_IPingServiceContract"};
+ //argv = new String[]
{"OasisScenario2Binding_IPingServiceContract"}; //NOT_WORKING
+
+
}
Bus b = new SpringBusFactory().createBus("etc/client.xml");
Modified: cxf/sandbox/interopfest/wstrust13/src/main/resources/etc/client.xml
URL:
http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wstrust13/src/main/resources/etc/client.xml?rev=726827&r1=726826&r2=726827&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wstrust13/src/main/resources/etc/client.xml
(original)
+++ cxf/sandbox/interopfest/wstrust13/src/main/resources/etc/client.xml Mon Dec
15 13:57:44 2008
@@ -25,27 +25,20 @@
</cxf:features>
</cxf:bus>
- <bean id="Scenario_1_IssuedTokenOverTransport_UsernameOverTransport"
- class="org.apache.cxf.ws.security.trust.STSClient" abstract="true">
- <property name="soap11" value="false"/>
- <property name="properties">
- <map>
- <entry key="ws-security.username" value="Alice"/>
- <entry key="ws-security.password" value="abcd!1234"/>
- </map>
- </property>
- </bean>
- <bean id="Scenario_2_IssuedToken_MutualCertificate10"
+ <bean id="CustomBinding_IPingServiceContract"
class="org.apache.cxf.ws.security.trust.STSClient" abstract="true">
- <property name="soap11" value="false"/>
+ <property name="wsdlLocation" value="target/wsdl2/trust.wsdl"/>
+ <property name="serviceName"
value="{http://schemas.microsoft.com/ws/2008/06/identity/securitytokenservice}SecurityTokenService"/>
+ <property name="endpointName"
value="{http://schemas.microsoft.com/ws/2008/06/identity/securitytokenservice}CustomBinding_IWSTrust13Sync"/>
<property name="properties">
<map>
- <entry key="ws-security.username" value="Alice"/>
- <entry key="ws-security.password" value="abcd!1234"/>
+ <entry key="ws-security.username" value="joe"/>
+ <entry key="ws-security.password" value="eoj"/>
</map>
</property>
</bean>
- <bean id="CustomBinding_IPingServiceContract"
+
+ <bean id="OasisScenario2Binding_IPingServiceContract"
class="org.apache.cxf.ws.security.trust.STSClient" abstract="true">
<property name="wsdlLocation" value="target/wsdl2/trust.wsdl"/>
<property name="serviceName"
value="{http://schemas.microsoft.com/ws/2008/06/identity/securitytokenservice}SecurityTokenService"/>
Modified: cxf/sandbox/interopfest/wstrust13/src/style/makelocal.xsl
URL:
http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wstrust13/src/style/makelocal.xsl?rev=726827&r1=726826&r2=726827&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wstrust13/src/style/makelocal.xsl (original)
+++ cxf/sandbox/interopfest/wstrust13/src/style/makelocal.xsl Mon Dec 15
13:57:44 2008
@@ -26,7 +26,7 @@
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
- <xsl:template match="soap12:address">
+ <xsl:template match="soap12:address|soap:address">
<xsl:copy>
<xsl:choose>
<xsl:when
test="@location='https://kirillgdev04/Security_Federation_FederatedService_Indigo/Symmetric.svc/Scenario_1_IssuedTokenOverTransport_UsernameOverTransport'">
@@ -38,24 +38,11 @@
<xsl:when test="starts-with(@location,'https://localhost/')">
<xsl:attribute
name="location">https://131.107.72.15/<xsl:value-of
select="substring(@location,19)"/></xsl:attribute>
</xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="@location"/>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:template>
- <xsl:template match="soap:address">
- <xsl:copy>
- <xsl:choose>
- <xsl:when
test="@location='https://kirillgdev04/Security_Federation_FederatedService_Indigo/Symmetric.svc/Scenario_1_IssuedTokenOverTransport_UsernameOverTransport'">
- <xsl:attribute
name="location">https://131.107.72.15/Security_Federation_FederatedService_Indigo/Symmetric.svc/Scenario_1_IssuedTokenOverTransport_UsernameOverTransport</xsl:attribute>
- </xsl:when>
- <xsl:when test="starts-with(@location,'http://localhost/')">
- <xsl:attribute
name="location">http://131.107.72.15/<xsl:value-of
select="substring(@location,18)"/></xsl:attribute>
+ <xsl:when
test="starts-with(@location,'http://131.107.153.205/')">
+ <xsl:attribute
name="location">http://131.107.72.15/<xsl:value-of
select="substring(@location,24)"/></xsl:attribute>
</xsl:when>
- <xsl:when test="starts-with(@location,'https://localhost/')">
- <xsl:attribute
name="location">https://131.107.72.15/<xsl:value-of
select="substring(@location,19)"/></xsl:attribute>
+ <xsl:when
test="starts-with(@location,'https://131.107.153.205/')">
+ <xsl:attribute
name="location">https://131.107.72.15/<xsl:value-of
select="substring(@location,25)"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="@location"/>