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/03 18:39:47 UTC

svn commit: r749667 - in /cxf/sandbox/interopfest/wstrust10: build.xml pom.xml src/main/java/interop/client/Client.java src/main/resources/etc/client.xml src/style/makelocal.xsl

Author: dkulp
Date: Tue Mar  3 17:39:46 2009
New Revision: 749667

URL: http://svn.apache.org/viewvc?rev=749667&view=rev
Log:
Update to allow setting the hosts to get the wsdl from and the host to hit.

Modified:
    cxf/sandbox/interopfest/wstrust10/build.xml
    cxf/sandbox/interopfest/wstrust10/pom.xml
    cxf/sandbox/interopfest/wstrust10/src/main/java/interop/client/Client.java
    cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/client.xml
    cxf/sandbox/interopfest/wstrust10/src/style/makelocal.xsl

Modified: cxf/sandbox/interopfest/wstrust10/build.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wstrust10/build.xml?rev=749667&r1=749666&r2=749667&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wstrust10/build.xml (original)
+++ cxf/sandbox/interopfest/wstrust10/build.xml Tue Mar  3 17:39:46 2009
@@ -1,19 +1,20 @@
 <project name="wssec11" default="download">
     <property name="build.dir" location="target"/>
-    <property name="host" value="131.107.72.15"/>
+    <property name="wsdl.host" value="131.107.72.15"/>
+    <property name="target.host" value="${wsdl.host}"/>
    
     <target name="download.internal" if="needsToDownload">
         <mkdir dir="${build.dir}/generated/src/main/resources/certs"/>
         <mkdir dir="${build.dir}/wsdl"/>
         <get src="http://131.107.72.15/ilab/Certs/Certs.zip" dest="${build.dir}/Certs.zip"/>
-        <get src="http://${host}/Security_Federation_FederatedService_Indigo/Symmetric.svc?wsdl" dest="${build.dir}/wsdl/WsTrustSym.wsdl"/>
-        <get src="http://${host}/Security_Federation_FederatedService_Indigo/Symmetric.svc?wsdl=wsdl0" dest="${build.dir}/wsdl/WsTrustSym_policy.wsdl"/>
+        <get src="http://${wsdl.host}/Security_Federation_FederatedService_Indigo/Symmetric.svc?wsdl" dest="${build.dir}/wsdl/WsTrustSym.wsdl"/>
+        <get src="http://${wsdl.host}/Security_Federation_FederatedService_Indigo/Symmetric.svc?wsdl=wsdl0" dest="${build.dir}/wsdl/WsTrustSym_policy.wsdl"/>
 
-        <get src="http://${host}/Security_Federation_FederatedService_Indigo/Asymmetric.svc?wsdl" dest="${build.dir}/wsdl/WsTrustAsym.wsdl"/>
-        <get src="http://${host}/Security_Federation_FederatedService_Indigo/Asymmetric.svc?wsdl=wsdl0" dest="${build.dir}/wsdl/WsTrustAsym_policy.wsdl"/>
+        <get src="http://${wsdl.host}/Security_Federation_FederatedService_Indigo/Asymmetric.svc?wsdl" dest="${build.dir}/wsdl/WsTrustAsym.wsdl"/>
+        <get src="http://${wsdl.host}/Security_Federation_FederatedService_Indigo/Asymmetric.svc?wsdl=wsdl0" dest="${build.dir}/wsdl/WsTrustAsym_policy.wsdl"/>
 
-        <get src="http://${host}/Security_Federation_SecurityTokenService_Indigo/Asymmetric.svc?wsdl" dest="${build.dir}/wsdl/STSAsym.wsdl"/>
-        <get src="http://${host}/Security_Federation_SecurityTokenService_Indigo/Symmetric.svc?wsdl" dest="${build.dir}/wsdl/STSSym.wsdl"/>
+        <get src="http://${wsdl.host}/Security_Federation_SecurityTokenService_Indigo/Asymmetric.svc?wsdl" dest="${build.dir}/wsdl/STSAsym.wsdl"/>
+        <get src="http://${wsdl.host}/Security_Federation_SecurityTokenService_Indigo/Symmetric.svc?wsdl" dest="${build.dir}/wsdl/STSSym.wsdl"/>
 
 
         <antcall target="transform"/>
@@ -25,6 +26,8 @@
         <xslt basedir="${build.dir}/wsdl" destdir="${build.dir}/wsdl2"
             style="src/style/makelocal.xsl" extension=".xml">
             <mapper type="identity"/>
+            <param name="wsdl.host" expression="${wsdl.host}"/>
+            <param name="target.host" expression="${target.host}"/>
         </xslt>
     </target>
 

Modified: cxf/sandbox/interopfest/wstrust10/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wstrust10/pom.xml?rev=749667&r1=749666&r2=749667&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wstrust10/pom.xml (original)
+++ cxf/sandbox/interopfest/wstrust10/pom.xml Tue Mar  3 17:39:46 2009
@@ -7,6 +7,9 @@
     <properties>
         <cxf.version>2.2-SNAPSHOT</cxf.version>
         <test.method>A</test.method>
+
+        <wsdl.host>131.107.72.15</wsdl.host>
+        <target.host>131.107.72.15</target.host>
     </properties>
     <build>
         <resources>
@@ -46,6 +49,8 @@
                             <tasks>
                                 <ant inheritRefs="true" antfile="${basedir}/build.xml">
                                     <property value="${basedir}/target" name="build.dir" />
+                                    <property name="wsdl.host" value="${wsdl.host}"/>
+                                    <property name="target.host" value="${target.host}"/>
                                     <target name="download" />
                                 </ant>
                             </tasks>

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=749667&r1=749666&r2=749667&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 Tue Mar  3 17:39:46 2009
@@ -77,7 +77,7 @@
                 "Scenario_1_IssuedTokenOverTransport_UsernameOverTransport",
                 "Scenario_2_IssuedToken_MutualCertificate10",
                 "Scenario_5_IssuedTokenForCertificate_MutualCertificate11",
-                //"Scenario_6_IssuedTokenForCertificateSecureConversation_MutualCertificate11",        
+                //"Scenario_6_IssuedTokenForCertificateSecureConversation_MutualCertificate11", //[1]       
                                  
                 //"Scenario_7_IssuedTokenOverTransport_UsernameOverTransport", //[2]
                 //"Scenario_9_IssuedTokenForCertificate_MutualCertificate11", // [2]
@@ -132,7 +132,8 @@
 }
 
 /*
+[1] - Scenario 6 runs fine against the public service on 131.107.153.205, but not the service on 
+      131.107.72.15.  Not really sure why.   HOWEVER, Scenario 1 doesn't run against 131.107.153.205
+      due to the https services not running.
 [2] - RSA KeyValue / Public key thing (not supported by wss4j yet)
-[3] - 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/resources/etc/client.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/client.xml?rev=749667&r1=749666&r2=749667&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/client.xml (original)
+++ cxf/sandbox/interopfest/wstrust10/src/main/resources/etc/client.xml Tue Mar  3 17:39:46 2009
@@ -127,8 +127,8 @@
     	<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"/> 
+            	<entry key="ws-security.signature.properties" value="etc/wssip.properties"/> 
+            	<entry key="ws-security.encryption.properties" value="etc/wssip.properties"/> 
     		</map>
     	</property>
     </bean>

Modified: cxf/sandbox/interopfest/wstrust10/src/style/makelocal.xsl
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wstrust10/src/style/makelocal.xsl?rev=749667&r1=749666&r2=749667&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wstrust10/src/style/makelocal.xsl (original)
+++ cxf/sandbox/interopfest/wstrust10/src/style/makelocal.xsl Tue Mar  3 17:39:46 2009
@@ -4,45 +4,27 @@
     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:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"
+    xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust"
     xmlns:wsa="http://www.w3.org/2005/08/addressing">
     <xsl:output method="xml"/>
 
-    <!--xsl:template match="xs:import">
-        <xsl:copy>
-            <xsl:choose>
-                <xsl:when test="@schemaLocation='http://131.107.72.15/Security_WsSecurity_Service_Indigo/WsSecurity11.svc?xsd=xsd0'">
-                    <xsl:attribute name="schemaLocation">WsSecurity11_0.xsd</xsl:attribute>
-                </xsl:when>
-                <xsl:when test="@schemaLocation='http://131.107.72.15/Security_WsSecurity_Service_Indigo/WsSecurity11.svc?xsd=xsd1'">
-                    <xsl:attribute name="schemaLocation">WsSecurity11_1.xsd</xsl:attribute>
-                </xsl:when>
-                <xsl:when test="@schemaLocation='http://131.107.72.15/Security_WsSecurity_Service_Indigo/WsSecurity11.svc?xsd=xsd2'">
-                    <xsl:attribute name="schemaLocation">WsSecurity11_2.xsd</xsl:attribute>
-                </xsl:when>
-                <xsl:when test="@schemaLocation='http://131.107.72.15/Security_WsSecurity_Service_Indigo/WsSecurity11.svc?xsd=xsd3'">
-                    <xsl:attribute name="schemaLocation">WsSecurity11_3.xsd</xsl:attribute>
-                </xsl:when>
-                <xsl:otherwise>
-                    <xsl:attribute name="schemaLocation"><xsl:value-of select="@schemaLocation"/></xsl:attribute>
-                </xsl:otherwise>
-            </xsl:choose>
-            <xsl:apply-templates select="@namespace"/>
-            <xsl:apply-templates/>
-        </xsl:copy>
-    </xsl:template-->
+    <xsl:param name="target.host">131.107.72.15</xsl:param>
+    <xsl:param name="wsdl.host">131.107.72.15</xsl:param>
+
     <xsl:template match="wsdl:import">
         <xsl:copy>
             <xsl:choose>
-                <xsl:when test="@location='http://131.107.72.15/Security_Federation_FederatedService_Indigo/Symmetric.svc?wsdl'">
+                <xsl:when test="@location='http://$wsdl.host/Security_Federation_FederatedService_Indigo/Symmetric.svc?wsdl'">
                     <xsl:attribute name="location">WsTrustSym.wsdl</xsl:attribute>
                 </xsl:when>
-                <xsl:when test="@location='http://131.107.72.15/Security_Federation_FederatedService_Indigo/Symmetric.svc?wsdl=wsdl0'">
+                <xsl:when test="@location='http://$wsdl.host/Security_Federation_FederatedService_Indigo/Symmetric.svc?wsdl=wsdl0'">
                     <xsl:attribute name="location">WsTrustSym_policy.wsdl</xsl:attribute>
                 </xsl:when>
-                <xsl:when test="@location='http://131.107.72.15/Security_Federation_FederatedService_Indigo/Asymmetric.svc?wsdl'">
+                <xsl:when test="@location='http://$wsdl.host/Security_Federation_FederatedService_Indigo/Asymmetric.svc?wsdl'">
                     <xsl:attribute name="location">WsTrustAsym.wsdl</xsl:attribute>
                 </xsl:when>
-                <xsl:when test="@location='http://131.107.72.15/Security_Federation_FederatedService_Indigo/Asymmetric.svc?wsdl=wsdl0'">
+                <xsl:when test="@location='http://$wsdl.host/Security_Federation_FederatedService_Indigo/Asymmetric.svc?wsdl=wsdl0'">
                     <xsl:attribute name="location">WsTrustAsym_policy.wsdl</xsl:attribute>
                 </xsl:when>
                 <xsl:otherwise>
@@ -57,33 +39,27 @@
     <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,'http://ndgo-introp-s24/')">
-                    <xsl:attribute name="location">http://131.107.72.15/<xsl:value-of select="substring(@location,22)"/></xsl:attribute>
+                    <xsl:attribute name="location">http://<xsl:value-of select="$target.host"/>/<xsl:value-of select="substring(@location,22)"/></xsl:attribute>
                 </xsl:when>
                 <xsl:when test="starts-with(@location,'https://ndgo-introp-s24/')">
-                    <xsl:attribute name="location">https://131.107.72.15/<xsl:value-of select="substring(@location,23)"/></xsl:attribute>
+                    <xsl:attribute name="location">https://<xsl:value-of select="$target.host"/>/<xsl:value-of select="substring(@location,23)"/></xsl:attribute>
                 </xsl:when>
                 <xsl:when test="starts-with(@location,'https://ndgo-introp-s24:8443/')">
-                    <xsl:attribute name="location">https://131.107.72.15:8443/<xsl:value-of select="substring(@location,38)"/></xsl:attribute>
+                    <xsl:attribute name="location">https://<xsl:value-of select="$target.host"/>:8443/<xsl:value-of select="substring(@location,38)"/></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:attribute name="location">https://<xsl:value-of select="$target.host"/><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:attribute name="location">http://<xsl:value-of select="$target.host"/><xsl:value-of select="substring(@location,20)"/></xsl:attribute>
+                </xsl:when>
+                <xsl:when test="starts-with(@location,concat('https://',$wsdl.host))">
+                    <xsl:attribute name="location">https://<xsl:value-of select="$target.host"/><xsl:value-of select="substring(@location,string-length($wsdl.host)+9)"/></xsl:attribute>
+                </xsl:when>
+                <xsl:when test="starts-with(@location,concat('http://',$wsdl.host))">
+                    <xsl:attribute name="location">http://<xsl:value-of select="$target.host"/><xsl:value-of select="substring(@location,string-length($wsdl.host)+8)"/></xsl:attribute>
                 </xsl:when>
-
                 <xsl:otherwise>
                     <xsl:apply-templates select="@location"/>
                 </xsl:otherwise>
@@ -91,10 +67,11 @@
             <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="wsdl:port/wsa:EndpointReference"/>
+
+    <xsl:template match="xs:element[@ref='xs:schema']"/>
+
     <xsl:template match="@*">
         <xsl:copy/>
     </xsl:template>