You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2009/03/02 18:36:47 UTC
svn commit: r749373 - in /cxf/sandbox/interopfest:
wssc/src/main/java/interop/client/ wstrust10/
wstrust10/src/main/java/interop/client/ wstrust10/src/main/resources/etc/
wstrust10/src/style/
Author: dkulp
Date: Mon Mar 2 17:36:46 2009
New Revision: 749373
URL: http://svn.apache.org/viewvc?rev=749373&view=rev
Log:
Update wstrust10 stuff to new setup
Added:
cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/wssip.properties (with props)
Removed:
cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/sts_policy_mut.xml
cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/sts_policy_ut.xml
Modified:
cxf/sandbox/interopfest/wssc/src/main/java/interop/client/Client.java
cxf/sandbox/interopfest/wstrust10/build.xml
cxf/sandbox/interopfest/wstrust10/src/main/java/interop/client/Client.java
cxf/sandbox/interopfest/wstrust10/src/main/java/interop/client/KeystorePasswordCallback.java
cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/alice.properties
cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/bob.properties
cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/client.xml
cxf/sandbox/interopfest/wstrust10/src/style/makelocal.xsl
Modified: cxf/sandbox/interopfest/wssc/src/main/java/interop/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssc/src/main/java/interop/client/Client.java?rev=749373&r1=749372&r2=749373&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssc/src/main/java/interop/client/Client.java (original)
+++ cxf/sandbox/interopfest/wssc/src/main/java/interop/client/Client.java Mon Mar 2 17:36:46 2009
@@ -58,7 +58,7 @@
if (argv.length < 1 || "".equals(argv[0]) || argv[0] == null) {
argv = new String[] {
- //"SecureConversation_UserNameOverTransport_IPingService", //cannot sign/endorse in transport binding yet
+ //"SecureConversation_UserNameOverTransport_IPingService", //service not running on the https port
"SecureConversation_MutualCertificate10SignEncrypt_IPingService",
"AC_IPingService",
"ADC_IPingService",
@@ -98,7 +98,7 @@
//"_KD-SEES_IPingService", //Kerberos token - not sure where the token comes from or how this works
};
}
- //argv = new String[] {argv[1]};
+ //argv = new String[] {argv[0]};
//argv = new String[] {"_X10_IPingService"};
new SpringBusFactory().createBus("etc/client.xml");
Modified: cxf/sandbox/interopfest/wstrust10/build.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wstrust10/build.xml?rev=749373&r1=749372&r2=749373&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wstrust10/build.xml (original)
+++ cxf/sandbox/interopfest/wstrust10/build.xml Mon Mar 2 17:36:46 2009
@@ -10,10 +10,10 @@
<get src="http://131.107.72.15/Security_Federation_FederatedService_Indigo/Asymmetric.svc?wsdl" dest="${build.dir}/wsdl/WsTrustAsym.wsdl"/>
<get src="http://131.107.72.15/Security_Federation_FederatedService_Indigo/Asymmetric.svc?wsdl=wsdl0" dest="${build.dir}/wsdl/WsTrustAsym_policy.wsdl"/>
- <!--get src="http://131.107.72.15/Security_WsSecurity_Service_Indigo/WsSecurity11.svc?xsd=xsd0" dest="${build.dir}/wsdl/WsSecurity11_0.xsd"/>
- <get src="http://131.107.72.15/Security_WsSecurity_Service_Indigo/WsSecurity11.svc?xsd=xsd1" dest="${build.dir}/wsdl/WsSecurity11_1.xsd"/>
- <get src="http://131.107.72.15/Security_WsSecurity_Service_Indigo/WsSecurity11.svc?xsd=xsd2" dest="${build.dir}/wsdl/WsSecurity11_2.xsd"/>
- <get src="http://131.107.72.15/Security_WsSecurity_Service_Indigo/WsSecurity11.svc?xsd=xsd3" dest="${build.dir}/wsdl/WsSecurity11_3.xsd"/-->
+ <get src="http://131.107.72.15/Security_Federation_SecurityTokenService_Indigo/Asymmetric.svc?wsdl" dest="${build.dir}/wsdl/STSAsym.wsdl"/>
+ <get src="http://131.107.72.15/Security_Federation_SecurityTokenService_Indigo/Symmetric.svc?wsdl" dest="${build.dir}/wsdl/STSSym.wsdl"/>
+
+
<antcall target="transform"/>
<unzip src="${build.dir}/Certs.zip" dest="${build.dir}/generated/src/main/resources/certs"/>
</target>
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=749373&r1=749372&r2=749373&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 Mar 2 17:36:46 2009
@@ -23,15 +23,21 @@
package interop.client;
+import java.util.ArrayList;
+import java.util.List;
+
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+import org.tempuri.AsymmetricFederatedService;
import org.tempuri.SymmetricFederatedService;
import org.apache.cxf.Bus;
import org.apache.cxf.bus.spring.SpringBusFactory;
import org.apache.cxf.endpoint.Endpoint;
import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.helpers.XMLUtils;
import org.apache.cxf.service.model.BindingOperationInfo;
import org.apache.cxf.transport.Conduit;
import org.apache.cxf.ws.policy.EffectivePolicy;
@@ -64,56 +70,72 @@
*/
public static void main(String argv[])
throws Exception {
- if (argv.length < 2) {
- argv = new String[] {"Scenario_1_IssuedTokenOverTransport_UsernameOverTransport",
- "/etc/sts_policy_ut.xml",
- "https://131.107.72.15/Scenario_1_IssuedTokenOverTransport_UsernameOverTransport"};
- }
-
- Bus b = new SpringBusFactory().createBus("etc/client.xml");
- final String portPrefix = argv[0];
+ if (argv.length < 1) {
+ argv = new String[] {
+ //"Scenario_1_IssuedTokenOverTransport_UsernameOverTransport", // [1]
+ "Scenario_2_IssuedToken_MutualCertificate10",
+ "Scenario_5_IssuedTokenForCertificate_MutualCertificate11",
+ //"Scenario_6_IssuedTokenForCertificateSecureConversation_MutualCertificate11", //[2]
+
+ //"Scenario_7_IssuedTokenOverTransport_UsernameOverTransport", //[3]
+ //"Scenario_9_IssuedTokenForCertificate_MutualCertificate11", // [3]
+ //"Scenario_10_IssuedTokenForCertificateSecureConversation_MutualCertificate11", //[3]
+ };
+ }
+ argv = new String[] {argv[2]};
- final SymmetricFederatedService svc = new SymmetricFederatedService();
- final IPingService port =
- svc.getPort(
- new QName(
- "http://tempuri.org/",
- portPrefix
- ),
- IPingService.class
- );
+ new SpringBusFactory().createBus("etc/client.xml");
+ List<String> results = new ArrayList<String>(argv.length);
- STSClient stsClient = new STSClient(b);
- PolicyBuilder pb = b.getExtension(PolicyBuilder.class);
- stsClient.setPolicy(pb.getPolicy(Client.class.getResourceAsStream(argv[1])));
- stsClient.setLocation(argv[2]);
-
- //TODO: get the Trust10 token out of the port
- PolicyEngine pe = b.getExtension(PolicyEngine.class);
- org.apache.cxf.endpoint.Client client = ClientProxy.getClient(port);
- for (PolicyAssertion as : pe.getClientEndpointPolicy(client.getEndpoint().getEndpointInfo(),
- client.getConduit()).getChosenAlternative()) {
- if (as instanceof Trust10) {
- stsClient.setTrust((Trust10)as);
- } else if (as instanceof Trust13) {
- stsClient.setTrust((Trust13)as);
+ for (String portPrefix : argv) {
+ try {
+ Service svc;
+ if (portPrefix.charAt(10) == '_' &&
+ portPrefix.charAt(9) < '7') {
+ svc = new SymmetricFederatedService();
+ } else {
+ svc = new AsymmetricFederatedService();
+ }
+
+ final IPingService port =
+ svc.getPort(
+ new QName(
+ "http://tempuri.org/",
+ portPrefix
+ ),
+ IPingService.class
+ );
+
+ final String output = port.echo(INPUT);
+ if (!INPUT.equals(output)) {
+ System.err.println(
+ "Expected " + INPUT + " but got " + output
+ );
+ results.add("Unexpected output " + output);
+ } else {
+ System.out.println("OK!");
+ results.add("OK!");
+ }
+ } catch (Throwable t) {
+ t.printStackTrace();
+ results.add("Exception: " + t);
}
}
+ for (int x = 0; x < argv.length; x++) {
+ System.out.println(argv[x] + ": " + results.get(x));
+ }
- SecurityToken responseToken = stsClient.requestSecurityToken();
- ((BindingProvider)port).getRequestContext().put(SecurityConstants.TOKEN, responseToken);
-
- //TODO: stick security token into the RequestContext/TokenStore
- final String output = port.echo(INPUT);
- if (!INPUT.equals(output)) {
- System.err.println(
- "Expected " + INPUT + " but got " + output
- );
- } else {
- System.out.println("OK!");
- }
}
}
+
+/*
+[1] - The STS is not return a SAML assertion. It's some bizarre "EncryptedData" element. Need to
+ investigate what to do.
+[2] - Mix of Trust and SC
+[3] - RSA KeyValue / Public key thing (not supported by wss4j yet)
+[4] - WSS4J or xml-sec is not able to validate the returned signature from the STS. The key ref
+ finds the wssip key/alias in the keystore, just the sig doesn't seem valid
+*/
\ No newline at end of file
Modified: cxf/sandbox/interopfest/wstrust10/src/main/java/interop/client/KeystorePasswordCallback.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wstrust10/src/main/java/interop/client/KeystorePasswordCallback.java?rev=749373&r1=749372&r2=749373&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wstrust10/src/main/java/interop/client/KeystorePasswordCallback.java (original)
+++ cxf/sandbox/interopfest/wstrust10/src/main/java/interop/client/KeystorePasswordCallback.java Mon Mar 2 17:36:46 2009
@@ -41,6 +41,8 @@
if (pass != null) {
pc.setPassword(pass);
return;
+ } else {
+ pc.setPassword("password");
}
}
}
Modified: cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/alice.properties
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/alice.properties?rev=749373&r1=749372&r2=749373&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/alice.properties (original)
+++ cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/alice.properties Mon Mar 2 17:36:46 2009
@@ -1,5 +1,4 @@
org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
-org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.type=PKCS12
org.apache.ws.security.crypto.merlin.keystore.password=password
-org.apache.ws.security.crypto.merlin.keystore.alias=Alice
-org.apache.ws.security.crypto.merlin.file=keys/alice.jks
+org.apache.ws.security.crypto.merlin.file=certs/alice.pfx
Modified: cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/bob.properties
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/bob.properties?rev=749373&r1=749372&r2=749373&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/bob.properties (original)
+++ cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/bob.properties Mon Mar 2 17:36:46 2009
@@ -1,5 +1,7 @@
org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
-org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.type=PKCS12
org.apache.ws.security.crypto.merlin.keystore.password=password
-org.apache.ws.security.crypto.merlin.keystore.alias=Bob
-org.apache.ws.security.crypto.merlin.file=keys/bob.jks
+# for some reason, bouncycastle has issues with bob.pfx
+org.apache.ws.security.crypto.merlin.keystore.provider=SunJSSE
+org.apache.ws.security.crypto.merlin.file=certs/bob.pfx
+
Modified: cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/client.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/client.xml?rev=749373&r1=749372&r2=749373&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/client.xml (original)
+++ cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/client.xml Mon Mar 2 17:36:46 2009
@@ -25,8 +25,12 @@
</cxf:features>
</cxf:bus>
- <bean id="default.sts-client" class="org.apache.cxf.ws.security.trust.STSClient" abstract="true">
- <property name="soap11" value="false"/>
+ <!-- Scenario 1 -->
+ <bean name="{http://tempuri.org/}Scenario_1_IssuedTokenOverTransport_UsernameOverTransport.sts-client"
+ class="org.apache.cxf.ws.security.trust.STSClient" abstract="true">
+ <property name="wsdlLocation" value="target/wsdl2/STSSym.wsdl"/>
+ <property name="serviceName" value="{http://tempuri.org/}SecurityTokenService"/>
+ <property name="endpointName" value="{http://tempuri.org/}CustomBinding_ISecurityTokenService"/>
<property name="properties">
<map>
<entry key="ws-security.username" value="Alice"/>
@@ -35,18 +39,107 @@
</property>
</bean>
+ <!-- Scenario 2 -->
+ <bean name="{http://tempuri.org/}Scenario_2_IssuedToken_MutualCertificate10.sts-client"
+ class="org.apache.cxf.ws.security.trust.STSClient" abstract="true">
+ <property name="wsdlLocation" value="target/wsdl2/STSSym.wsdl"/>
+ <property name="serviceName" value="{http://tempuri.org/}SecurityTokenService"/>
+ <property name="endpointName" value="{http://tempuri.org/}CustomBinding_ISecurityTokenService1"/>
+ <property name="properties">
+ <map>
+ <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
+ <entry key="ws-security.signature.properties" value="etc/alice.properties"/>
+ <entry key="ws-security.encryption.properties" value="etc/wssip.properties"/>
+ </map>
+ </property>
+ </bean>
- <http:conduit name="https://131.107.72.15/Security_Federation_FederatedService_Indigo/Symmetric.svc/Scenario_1_IssuedTokenOverTransport_UsernameOverTransport.*">
- <http:tlsClientParameters disableCNCheck="true">
- <sec:keyManagers keyPassword="password">
- <sec:keyStore type="pkcs12" password="password" resource="certs/alice.pfx"/>
- </sec:keyManagers>
- <sec:trustManagers>
- <sec:keyStore type="pkcs12" password="password" resource="certs/bob.pfx"/>
- </sec:trustManagers>
- </http:tlsClientParameters>
- </http:conduit>
- <http:conduit name="https://131.107.72.15/Security_Federation_SecurityTokenService_Indigo/Symmetric.svc/.*">
+ <!-- Scenario 5 -->
+ <bean name="{http://tempuri.org/}Scenario_5_IssuedTokenForCertificate_MutualCertificate11.sts-client"
+ class="org.apache.cxf.ws.security.trust.STSClient" abstract="true">
+ <property name="wsdlLocation" value="target/wsdl2/STSSym.wsdl"/>
+ <property name="serviceName" value="{http://tempuri.org/}SecurityTokenService"/>
+ <property name="endpointName" value="{http://tempuri.org/}CustomBinding_ISecurityTokenService1"/>
+ <property name="properties">
+ <map>
+ <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
+ <entry key="ws-security.signature.properties" value="etc/alice.properties"/>
+ <entry key="ws-security.encryption.properties" value="etc/wssip.properties"/>
+ </map>
+ </property>
+ </bean>
+ <jaxws:client name="{http://tempuri.org/}Scenario_5_IssuedTokenForCertificate_MutualCertificate11" createdFromAPI="true">
+ <jaxws:properties>
+ <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
+ <entry key="ws-security.encryption.properties" value="etc/bob.properties"/>
+ </jaxws:properties>
+ </jaxws:client>
+
+
+
+ <!-- Scenario 7 -->
+ <bean name="{http://tempuri.org/}Scenario_7_IssuedTokenOverTransport_UsernameOverTransport.sts-client"
+ class="org.apache.cxf.ws.security.trust.STSClient" abstract="true">
+ <property name="wsdlLocation" value="target/wsdl2/STSAsym.wsdl"/>
+ <property name="serviceName" value="{http://tempuri.org/}SecurityTokenService"/>
+ <property name="endpointName" value="{http://tempuri.org/}CustomBinding_ISecurityTokenService2"/>
+ <property name="properties">
+ <map>
+ <entry key="ws-security.username" value="Alice"/>
+ <entry key="ws-security.password" value="abcd!1234"/>
+ </map>
+ </property>
+ </bean>
+
+
+
+ <!-- Scenario 9 -->
+ <bean name="{http://tempuri.org/}Scenario_9_IssuedTokenForCertificate_MutualCertificate11.sts-client"
+ class="org.apache.cxf.ws.security.trust.STSClient" abstract="true">
+ <property name="wsdlLocation" value="target/wsdl2/STSAsym.wsdl"/>
+ <property name="serviceName" value="{http://tempuri.org/}SecurityTokenService"/>
+ <property name="endpointName" value="{http://tempuri.org/}WSHttpBinding_ISecurityTokenService2"/>
+ <property name="properties">
+ <map>
+ <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
+ <entry key="ws-security.signature.properties" value="etc/alice.properties"/>
+ <entry key="ws-security.encryption.properties" value="etc/bob.properties"/>
+ </map>
+ </property>
+ </bean>
+ <jaxws:client name="{http://tempuri.org/}Scenario_9_IssuedTokenForCertificate_MutualCertificate11" createdFromAPI="true">
+ <jaxws:properties>
+ <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
+ <entry key="ws-security.encryption.properties" value="etc/bob.properties"/>
+ </jaxws:properties>
+ </jaxws:client>
+
+
+ <!-- Scenario 10 -->
+ <bean name="{http://tempuri.org/}Scenario_10_IssuedTokenForCertificate_MutualCertificate11.sts-client"
+ class="org.apache.cxf.ws.security.trust.STSClient" abstract="true">
+ <property name="wsdlLocation" value="target/wsdl2/STSAsym.wsdl"/>
+ <property name="serviceName" value="{http://tempuri.org/}SecurityTokenService"/>
+ <property name="endpointName" value="{http://tempuri.org/}WSHttpBinding_ISecurityTokenService3"/>
+ <property name="properties">
+ <map>
+ <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
+ <entry key="ws-security.signature.properties" value="etc/alice.properties"/>
+ <entry key="ws-security.encryption.properties" value="etc/wssip.properties"/>
+ </map>
+ </property>
+ </bean>
+ <jaxws:client name="{http://tempuri.org/}Scenario_10_IssuedTokenForCertificate_MutualCertificate11" createdFromAPI="true">
+ <jaxws:properties>
+ <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
+ <entry key="ws-security.encryption.properties" value="etc/bob.properties"/>
+ </jaxws:properties>
+ </jaxws:client>
+
+
+
+
+ <http:conduit name="https://131.107.72.15/.*">
<http:tlsClientParameters disableCNCheck="true">
<sec:keyManagers keyPassword="password">
<sec:keyStore type="pkcs12" password="password" resource="certs/alice.pfx"/>
@@ -56,21 +149,14 @@
</sec:trustManagers>
</http:tlsClientParameters>
</http:conduit>
- <http:conduit name="https://131.107.72.15/.*">
+ <http:conduit name="https://131.107.153.205/.*">
<http:tlsClientParameters disableCNCheck="true">
<sec:keyManagers keyPassword="password">
<sec:keyStore type="pkcs12" password="password" resource="certs/alice.pfx"/>
</sec:keyManagers>
<sec:trustManagers>
- <sec:keyStore type="pkcs12" password="password" resource="certs/bob.pfx"/>
+ <sec:keyStore type="pkcs12" password="password" resource="certs/WssIP.pfx"/>
</sec:trustManagers>
</http:tlsClientParameters>
</http:conduit>
- <!-- jaxws:client name="{http://InteropBaseAddress/interop}A_IPingService" createdFromAPI="true">
- <jaxws:properties>
- <entry key="ws-security.callback-handler" value="interop.client.KeystorePasswordCallback"/>
- <entry key="ws-security.encryption.username" value="Bob"/>
- <entry key="ws-security.encryption.properties" value="etc/bob.properties"/>
- </jaxws:properties>
- </jaxws:client-->
</beans>
Added: cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/wssip.properties
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/wssip.properties?rev=749373&view=auto
==============================================================================
--- cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/wssip.properties (added)
+++ cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/wssip.properties Mon Mar 2 17:36:46 2009
@@ -0,0 +1,8 @@
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=PKCS12
+org.apache.ws.security.crypto.merlin.keystore.password=password
+# for some reason, bouncycastle has issues with WssIP.pfx
+org.apache.ws.security.crypto.merlin.keystore.provider=SunJSSE
+#org.apache.ws.security.crypto.merlin.keystore.provider=BC
+org.apache.ws.security.crypto.merlin.file=certs/WssIP.pfx
+#org.apache.ws.security.crypto.merlin.keystore.alias=WssIP's OASIS Interop Test CA ID
Propchange: cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/wssip.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/wssip.properties
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/wssip.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: cxf/sandbox/interopfest/wstrust10/src/style/makelocal.xsl
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wstrust10/src/style/makelocal.xsl?rev=749373&r1=749372&r2=749373&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wstrust10/src/style/makelocal.xsl (original)
+++ cxf/sandbox/interopfest/wstrust10/src/style/makelocal.xsl Mon Mar 2 17:36:46 2009
@@ -1,7 +1,10 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
- xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:wsa="http://www.w3.org/2005/08/addressing">
<xsl:output method="xml"/>
<!--xsl:template match="xs:import">
@@ -50,6 +53,36 @@
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
+
+ <xsl:template match="soap12:address|soap:address">
+ <xsl:copy>
+ <xsl:choose>
+ <xsl:when test="starts-with(@location,'http://ndgo-introp-s24/')">
+ <xsl:attribute name="location">http://131.107.153.205/<xsl:value-of select="substring(@location,24)"/></xsl:attribute>
+ </xsl:when>
+ <xsl:when test="starts-with(@location,'https://ndgo-introp-s24/')">
+ <xsl:attribute name="location">https://131.107.153.205/<xsl:value-of select="substring(@location,25)"/></xsl:attribute>
+ </xsl:when>
+ <xsl:when test="starts-with(@location,'https://ndgo-introp-s24:8443/')">
+ <xsl:attribute name="location">https://131.107.153.205:8443/<xsl:value-of select="substring(@location,30)"/></xsl:attribute>
+ </xsl:when>
+
+ <xsl:when test="starts-with(@location,'https://kirillgdev04')">
+ <xsl:attribute name="location">https://131.107.72.15<xsl:value-of select="substring(@location,21)"/></xsl:attribute>
+ </xsl:when>
+ <xsl:when test="starts-with(@location,'http://kirillgdev04')">
+ <xsl:attribute name="location">http://131.107.72.15<xsl:value-of select="substring(@location,20)"/></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="wsdl:port/wsa:EndpointReference">
+ </xsl:template>
<xsl:template match="xs:element[@ref='xs:schema']">
</xsl:template>
<xsl:template match="@*">