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/02/17 23:01:10 UTC

svn commit: r745266 - in /cxf/sandbox/interopfest/wssc: 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 Feb 17 22:01:09 2009
New Revision: 745266

URL: http://svn.apache.org/viewvc?rev=745266&view=rev
Log:
Make it semi-easy to flip back and forth between the full test and the "signed only" version

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

Modified: cxf/sandbox/interopfest/wssc/build.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssc/build.xml?rev=745266&r1=745265&r2=745266&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssc/build.xml (original)
+++ cxf/sandbox/interopfest/wssc/build.xml Tue Feb 17 22:01:09 2009
@@ -1,15 +1,18 @@
 <project name="wssec11" default="download">
     <property name="build.dir" location="target"/>
+    <property name="baseLocation" value="http://131.107.153.205/Security_WsSecurity_Service_Indigo/WSSecureConversation.svc"/>
+    
+
     <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://131.107.153.205/Security_WsSecurity_Service_Indigo/WSSecureConversationSign.svc?wsdl" dest="${build.dir}/wsdl/WSSecureConversation.wsdl"/>
-        <get src="http://131.107.153.205/Security_WsSecurity_Service_Indigo/WSSecureConversationSign.svc?wsdl=wsdl0" dest="${build.dir}/wsdl/WSSecureConversation_policy.wsdl"/>
-        <get src="http://131.107.153.205/Security_WsSecurity_Service_Indigo/WSSecureConversationSign.svc?xsd=xsd0" dest="${build.dir}/wsdl/WSSecureConversation_0.xsd"/>
-        <get src="http://131.107.153.205/Security_WsSecurity_Service_Indigo/WSSecureConversationSign.svc?xsd=xsd1" dest="${build.dir}/wsdl/WSSecureConversation_1.xsd"/>
-        <get src="http://131.107.153.205/Security_WsSecurity_Service_Indigo/WSSecureConversationSign.svc?xsd=xsd2" dest="${build.dir}/wsdl/WSSecureConversation_2.xsd"/>
-        <get src="http://131.107.153.205/Security_WsSecurity_Service_Indigo/WSSecureConversationSign.svc?xsd=xsd3" dest="${build.dir}/wsdl/WSSecureConversation_3.xsd"/>
+        <get src="${baseLocation}?wsdl" dest="${build.dir}/wsdl/WSSecureConversation.wsdl"/>
+        <get src="${baseLocation}?wsdl=wsdl0" dest="${build.dir}/wsdl/WSSecureConversation_policy.wsdl"/>
+        <get src="${baseLocation}?xsd=xsd0" dest="${build.dir}/wsdl/WSSecureConversation_0.xsd"/>
+        <get src="${baseLocation}?xsd=xsd1" dest="${build.dir}/wsdl/WSSecureConversation_1.xsd"/>
+        <get src="${baseLocation}?xsd=xsd2" dest="${build.dir}/wsdl/WSSecureConversation_2.xsd"/>
+        <get src="${baseLocation}?xsd=xsd3" dest="${build.dir}/wsdl/WSSecureConversation_3.xsd"/>
         <antcall target="transform"/>
         <unzip src="${build.dir}/Certs.zip" dest="${build.dir}/generated/src/main/resources/certs"/>
     </target>

Modified: cxf/sandbox/interopfest/wssc/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssc/pom.xml?rev=745266&r1=745265&r2=745266&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssc/pom.xml (original)
+++ cxf/sandbox/interopfest/wssc/pom.xml Tue Feb 17 22:01:09 2009
@@ -7,6 +7,7 @@
     <properties>
         <cxf.version>2.2-SNAPSHOT</cxf.version>
         <test.method></test.method>
+        <baseLocation>http://131.107.153.205/Security_WsSecurity_Service_Indigo/WSSecureConversation.svc</baseLocation>
     </properties>
     <build>
         <resources>
@@ -46,6 +47,7 @@
                             <tasks>
                                 <ant inheritRefs="true" antfile="${basedir}/build.xml">
                                     <property value="${basedir}/target" name="build.dir" />
+                                    <property name="baseLocation" value="${baseLocation}"/>
                                     <target name="download" />
                                 </ant>
                             </tasks>
@@ -92,6 +94,12 @@
     </build>
     <profiles>
         <profile>
+            <id>signedOnly</id>
+            <properties>
+                <baseLocation>http://131.107.153.205/Security_WsSecurity_Service_Indigo/WSSecureConversationSign.svc</baseLocation>
+            </properties>
+        </profile>
+        <profile>
             <id>server</id>
             <build>
                 <defaultGoal>test</defaultGoal>

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=745266&r1=745265&r2=745266&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 Tue Feb 17 22:01:09 2009
@@ -32,10 +32,10 @@
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.xmlsoap.ping.Ping;
 
-import interopbaseaddress.interop.IPingServiceSign;
+import interopbaseaddress.interop.IPingService;
 import interopbaseaddress.interop.PingRequest;
 import interopbaseaddress.interop.PingResponse;
-import interopbaseaddress.interop.PingServiceSign;
+import interopbaseaddress.interop.PingService;
 
 public final class Client {
     
@@ -56,7 +56,7 @@
         if (argv.length < 1) {
             argv = new String[] {
                 //"SecureConversation_UserNameOverTransport_IPingServiceSign",  //Not getting token, not sure why
-                "SecureConversation_MutualCertificate10Sign_IPingService",
+                "SecureConversation_MutualCertificate10SignEncrypt_IPingService",
                 "AC_IPingService",
                 "ADC_IPingService",
                 "ADC-ES_IPingService",
@@ -98,14 +98,14 @@
         
         for (String portPrefix : argv) {
             try {
-                final PingServiceSign svc = new PingServiceSign();
-                final IPingServiceSign port = 
+                final PingService svc = new PingService();
+                final IPingService port = 
                     svc.getPort(
                         new QName(
                             "http://InteropBaseAddress/interop",
-                            portPrefix + "Sign"
+                            portPrefix
                         ),
-                        IPingServiceSign.class
+                        IPingService.class
                     );
                
                 /*

Modified: cxf/sandbox/interopfest/wssc/src/main/resources/etc/client.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssc/src/main/resources/etc/client.xml?rev=745266&r1=745265&r2=745266&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssc/src/main/resources/etc/client.xml (original)
+++ cxf/sandbox/interopfest/wssc/src/main/resources/etc/client.xml Tue Feb 17 22:01:09 2009
@@ -32,7 +32,6 @@
             <entry key="ws-security.callback-handler.sct" value="interop.client.UTPasswordCallback"/>
         </jaxws:properties>
     </jaxws:client>
-
     <jaxws:client name="{http://InteropBaseAddress/interop}SecureConversation_MutualCertificate10SignEncrypt_IPingService" createdFromAPI="true">
         <jaxws:properties>
             <entry key="ws-security.callback-handler.sct" value="interop.client.KeystorePasswordCallback"/>
@@ -40,13 +39,8 @@
             <entry key="ws-security.encryption.properties.sct" value="etc/bob.properties"/>
         </jaxws:properties>
     </jaxws:client>
-    <jaxws:client name="{http://InteropBaseAddress/interop}SecureConversation_MutualCertificate10Sign_IPingServiceSign" createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="ws-security.callback-handler.sct" value="interop.client.KeystorePasswordCallback"/>
-            <entry key="ws-security.signature.properties.sct" value="etc/alice.properties"/>
-            <entry key="ws-security.encryption.properties.sct" value="etc/bob.properties"/>
-        </jaxws:properties>
-    </jaxws:client>
+    
+    
     <jaxws:client name="{http://InteropBaseAddress/interop}AC_IPingService" createdFromAPI="true">
         <jaxws:properties>
             <entry key="ws-security.callback-handler.sct" value="interop.client.KeystorePasswordCallback"/>

Modified: cxf/sandbox/interopfest/wssc/src/style/makelocal.xsl
URL: http://svn.apache.org/viewvc/cxf/sandbox/interopfest/wssc/src/style/makelocal.xsl?rev=745266&r1=745265&r2=745266&view=diff
==============================================================================
--- cxf/sandbox/interopfest/wssc/src/style/makelocal.xsl (original)
+++ cxf/sandbox/interopfest/wssc/src/style/makelocal.xsl Tue Feb 17 22:01:09 2009
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
+<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:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
@@ -34,7 +34,9 @@
                     <xsl:attribute name="schemaLocation">WSSecureConversation_3.xsd</xsl:attribute>
                 </xsl:when>
                 <xsl:otherwise>
-                    <xsl:attribute name="schemaLocation"><xsl:value-of select="@schemaLocation"/></xsl:attribute>
+                    <xsl:attribute name="schemaLocation">
+                        <xsl:value-of select="@schemaLocation"/>
+                    </xsl:attribute>
                 </xsl:otherwise>
             </xsl:choose>
             <xsl:apply-templates select="@namespace"/>
@@ -60,6 +62,8 @@
     </xsl:template>
 
   
+
+
     <xsl:template match="soap12:address|soap:address">
         <xsl:copy>
             <xsl:choose>
@@ -83,6 +87,68 @@
         </xsl:copy>
     </xsl:template>
 
+    <xsl:template match="wsdl:portType[@name='IPingServiceSign']">
+        <xsl:copy>
+            <xsl:attribute name="name">IPingService</xsl:attribute>
+            <xsl:apply-templates/>
+        </xsl:copy>
+    </xsl:template>
+    <xsl:template match="wsdl:service[@name='PingServiceSign']">
+        <xsl:copy>
+            <xsl:attribute name="name">PingService</xsl:attribute>
+            <xsl:apply-templates/>
+        </xsl:copy>
+    </xsl:template>
+    <xsl:template match="wsdl:binding">
+        <xsl:copy>
+            <xsl:choose>
+                <xsl:when test="substring(@name, string-length(@name) - 3) = 'Sign'">
+                    <xsl:attribute name="name"><xsl:value-of select="substring(@name,1,string-length(@name) - 4)"/></xsl:attribute>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:apply-templates select="@name"/>
+                </xsl:otherwise>
+            </xsl:choose>
+            <xsl:choose>
+                <xsl:when test="substring(@type, string-length(@type) - 3) = 'Sign'">
+                    <xsl:attribute name="type"><xsl:value-of select="substring(@type,1,string-length(@type) - 4)"/></xsl:attribute>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:apply-templates select="@type"/>
+                </xsl:otherwise>
+            </xsl:choose>
+            <xsl:apply-templates/>
+        </xsl:copy>
+    </xsl:template>
+    <xsl:template match="wsdl:port">
+        <xsl:copy>
+            <xsl:choose>
+                <xsl:when test="substring(@binding, string-length(@binding) - 3) = 'Sign'">
+                    <xsl:attribute name="binding"><xsl:value-of select="substring(@binding,1,string-length(@binding) - 4)"/></xsl:attribute>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:apply-templates select="@binding"/>
+                </xsl:otherwise>
+            </xsl:choose>
+            <xsl:choose>
+                <xsl:when test="@name='SecureConversation_MutualCertificate10Sign_IPingServiceSign'">
+                    <xsl:attribute name="name">SecureConversation_MutualCertificate10SignEncrypt_IPingService</xsl:attribute>
+                </xsl:when>
+                <xsl:when test="substring(@name, string-length(@name) - 3) = 'Sign'">
+                    <xsl:attribute name="name">
+                        <xsl:value-of select="substring(@name,1,string-length(@name) - 4)"/>
+                    </xsl:attribute>
+                </xsl:when>
+                <xsl:when test="substring(@name, string-length(@name) - 4) = 'Sign1'">
+                    <xsl:attribute name="name"><xsl:value-of select="substring(@name,1,string-length(@name) - 5)"/>1</xsl:attribute>
+                </xsl:when>
+                <xsl:otherwise>
+                    <xsl:apply-templates select="@name"/>
+                </xsl:otherwise>
+            </xsl:choose>
+            <xsl:apply-templates/>
+        </xsl:copy>
+    </xsl:template>
 
     <xsl:template match="xs:element[@ref='xs:schema']">
     </xsl:template>