[jboss-svn-commits] JBossWS SVN: r814 - in branches/jbossws-1.0/src/test: ant java/org/jboss/test/ws/interop/microsoft java/org/jboss/test/ws/interop/microsoft/security/wsse10

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Aug 23 10:46:00 EDT 2006


Author: heiko.braun at jboss.com
Date: 2006-08-23 10:45:50 -0400 (Wed, 23 Aug 2006)
New Revision: 814

Modified:
   branches/jbossws-1.0/src/test/ant/build-interop-artifacts.xml
   branches/jbossws-1.0/src/test/ant/build-interop-jars.xml
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/ClientScenario.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/InteropClientConfig.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/InteropConfigFactory.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/SignTestCase.java
Log:
wsse 1.0 encrypt test case client

Modified: branches/jbossws-1.0/src/test/ant/build-interop-artifacts.xml
===================================================================
--- branches/jbossws-1.0/src/test/ant/build-interop-artifacts.xml	2006-08-23 14:43:30 UTC (rev 813)
+++ branches/jbossws-1.0/src/test/ant/build-interop-artifacts.xml	2006-08-23 14:45:50 UTC (rev 814)
@@ -61,7 +61,7 @@
          <wscompile
                keep="true"
                client="true"
-               base="${interop.classes.dir}"
+               base="${build.test.dir}/classes"
                sourceBase="${test.java.dir}"
                nonClassDir="${test.java.dir}/org/jboss/test/ws/interop/@{company}/@{module}"
                mapping="${test.resources.dir}/interop/@{company}/@{module}/WEB-INF/jaxrpc-mapping.xml"
@@ -102,7 +102,7 @@
                keep="true"
                import="@{import}"
                server="@{server}"
-               base="${interop.classes.dir}"
+               base="${build.test.dir}/classes"
                sourceBase="${test.java.dir}"
                nonClassDir="${test.java.dir}/org/jboss/test/ws/interop/@{company}/@{module}"
                mapping="${test.resources.dir}/interop/@{company}/@{module}/WEB-INF/jaxrpc-mapping.xml"
@@ -237,7 +237,7 @@
             features="rpcliteral,wsi"/>
 
       <antcall target="create-addressing"/>
-
+      <antcall target="create-security"/>
    </target>
 
    <target name="create-server" description="create the server side artifacts">
@@ -273,11 +273,23 @@
             verbose="false"/-->
    </target>
 
+   <target name="create-security">
+      <!--create-client
+          company="microsoft" module="security/wsse10"
+          features="documentliteral,wsi,useonewayoperations"
+          verbose="false"/>
+
+      <create-client
+          company="microsoft" module="security/wsse10Encrypt"
+          features="documentliteral,wsi,useonewayoperations"
+          verbose="false"/-->
+   </target>
+
    <!--
       COMMON BUILD TARGETS
    -->
 
-   <target name="build" depends="prepare-interop, compile">
+   <target name="build" depends="prepare-interop, copy-resources, compile">
       <ant antfile="${test.dir}/ant/build-interop-jars.xml" target="build-interop-jars"/>
    </target>
 
@@ -328,6 +340,13 @@
             <include name="*interop*.war"/>
          </fileset>
       </delete>
+
+      <delete>
+         <fileset dir="${build.test.dir}/libs">
+            <include name="*interop*"/>
+         </fileset>
+      </delete>
+
    </target>
 
 </project>

Modified: branches/jbossws-1.0/src/test/ant/build-interop-jars.xml
===================================================================
--- branches/jbossws-1.0/src/test/ant/build-interop-jars.xml	2006-08-23 14:43:30 UTC (rev 813)
+++ branches/jbossws-1.0/src/test/ant/build-interop-jars.xml	2006-08-23 14:45:50 UTC (rev 814)
@@ -37,7 +37,7 @@
          </metainf>
       </jar>
 
-        <!-- BaseDataTypesDocLitB_Service.war -->
+      <!-- BaseDataTypesDocLitB_Service.war -->
       <war warfile="${build.test.dir}/libs/jbossws-interop-BaseDataTypesDocLitB_Service.war"
            webxml="${test.resources.dir}/interop/microsoft/soapwsdl/BaseDataTypesDocLitB_Service/WEB-INF/web.xml">
          <classes dir="${build.test.dir}/classes">
@@ -280,6 +280,43 @@
       </war>
 
 
+      <!-- wsse10 client -->
+      <jar jarfile="${build.test.dir}/libs/jbossws-interop-wsse10-client.jar">
+         <fileset dir="${build.test.dir}/classes">
+            <include name="org/jboss/test/ws/interop/microsoft/security/**/*.class"/>
+            <include name="org/jboss/test/ws/interop/microsoft/*.class"/>
+         </fileset>
+         <metainf dir="${test.resources.dir}/interop/microsoft/security/wsse10/WEB-INF">
+            <include name="jaxrpc-mapping.xml"/>
+            <include name="wsdl/**"/>
+         </metainf>
+         <metainf dir="${test.resources.dir}/interop/microsoft/security/wsse10/META-INF">
+            <include name="application-client.xml"/>
+            <include name="jboss-client.xml"/>
+            <include name="jboss-wsse-client.xml"/>
+            <include name="scenarios.xml"/>
+         </metainf>
+      </jar>
+
+      <!-- wsse10Encrypt client -->
+      <jar jarfile="${build.test.dir}/libs/jbossws-interop-wsse10Encrypt-client.jar">
+         <fileset dir="${build.test.dir}/classes">
+            <include name="org/jboss/test/ws/interop/microsoft/security/**/*.class"/>
+            <include name="org/jboss/test/ws/interop/microsoft/*.class"/>
+         </fileset>
+         <metainf dir="${test.resources.dir}/interop/microsoft/security/wsse10Encrypt/WEB-INF">
+            <include name="jaxrpc-mapping.xml"/>
+            <include name="wsdl/**"/>
+         </metainf>
+         <metainf dir="${test.resources.dir}/interop/microsoft/security/wsse10Encrypt/META-INF">
+            <include name="application-client.xml"/>
+            <include name="jboss-client.xml"/>
+            <include name="jboss-wsse-client.xml"/>
+            <include name="scenarios.xml"/>
+         </metainf>
+      </jar>
+
+
    </target>
 
 </project>
\ No newline at end of file

Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/ClientScenario.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/ClientScenario.java	2006-08-23 14:43:30 UTC (rev 813)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/ClientScenario.java	2006-08-23 14:45:50 UTC (rev 814)
@@ -22,6 +22,8 @@
 package org.jboss.test.ws.interop.microsoft;
 
 import java.net.URL;
+import java.util.Map;
+import java.util.HashMap;
 
 /**
  * A particular interop test scenario.
@@ -35,21 +37,13 @@
    private String name;
    private String description;
    private URL targetEndpoint;
-   private URL detour;
+   private Map<String, String> parameterMap;
 
    public ClientScenario(String name, URL targetEndpoint) {
       this.name = name;
       this.targetEndpoint = targetEndpoint;
    }
 
-   public URL getDetour() {
-      return detour;
-   }
-
-   public void setDetour(URL detour) {
-      this.detour = detour;
-   }   
-
    public String getDescription() {
       return description;
    }
@@ -66,7 +60,19 @@
       return name;
    }
 
+   Map<String,String> getParameterMap() {
+      if(this.parameterMap == null)
+         parameterMap = new HashMap<String, String>();
+      return parameterMap;
+   }
+
+   public String getParameter(String key)
+   {
+      return getParameterMap().get(key);
+   }
+
    public String toString() {
-      return "ClientScenario {name="+name+", endpointURL="+targetEndpoint+"}";
+      return "ClientScenario {name="+name+", endpointURL="+targetEndpoint+", params="+getParameterMap()+"}";
    }
+
 }

Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/InteropClientConfig.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/InteropClientConfig.java	2006-08-23 14:43:30 UTC (rev 813)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/InteropClientConfig.java	2006-08-23 14:45:50 UTC (rev 814)
@@ -60,15 +60,15 @@
                URL endpointURL = new URL(targetEndpoint.getTextContent());
                cs = new ClientScenario(scenarioName, endpointURL);
 
-               // optional elements            
-               Element detour = DOMUtils.getFirstChildElement(child, "detour");
-               if(detour!=null)
+               // todo: add parameter element parsing here
+               Iterator parameter = DOMUtils.getChildElements(child, "param");
+               while(parameter.hasNext())
                {
-                  String s = detour.getTextContent();
-                  if(s!=null && s.length()>0)
-                     cs.setDetour( new URL(s));
+                  Element param = (Element)it.next();
+                  String key = DOMUtils.getAttributeValue(param, "name");
+                  String value = DOMUtils.getAttributeValue(param, "value");
+                  cs.getParameterMap().put(key, value);
                }
-
                break;
             }
          }

Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/InteropConfigFactory.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/InteropConfigFactory.java	2006-08-23 14:43:30 UTC (rev 813)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/InteropConfigFactory.java	2006-08-23 14:45:50 UTC (rev 814)
@@ -21,13 +21,13 @@
 */
 package org.jboss.test.ws.interop.microsoft;
 
-import org.jboss.util.xml.DOMUtils;
 import org.jboss.logging.Logger;
+import org.jboss.util.xml.DOMUtils;
 import org.w3c.dom.Element;
 
-import java.net.URLClassLoader;
-import java.net.URL;
 import java.io.IOException;
+import java.net.URL;
+import java.net.URLClassLoader;
 
 /**
  * Create an object model frpom test scenario descriptors.
@@ -77,9 +77,4 @@
 
       return sc;
    }
-
-   public InteropEndpointConfig createEndpointConfig()
-   {
-      return null;
-   }
 }

Modified: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/SignTestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/SignTestCase.java	2006-08-23 14:43:30 UTC (rev 813)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/SignTestCase.java	2006-08-23 14:45:50 UTC (rev 814)
@@ -21,7 +21,7 @@
 
    public static Test suite()
    {
-      return JBossWSTestSetup.newTestSetup(SignTestCase.class, "jbossws-interop-wsse10-client.jar,jbossws-interop-wsse10Encrypt-client.jar");
+      return JBossWSTestSetup.newTestSetup(SignTestCase.class, "jbossws-interop-wsse10-client.jar");
    }
 
    protected void setUp() throws Exception




More information about the jboss-svn-commits mailing list