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

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Aug 23 08:52:34 EDT 2006


Author: heiko.braun at jboss.com
Date: 2006-08-23 08:52:29 -0400 (Wed, 23 Aug 2006)
New Revision: 808

Added:
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/Echo.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/EchoResponse.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/IPingServiceSign.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/Ping.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/PingResponseBody.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/PingService10Sign.java
   branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/SecurityTestCase.java
Log:
wsse 1.0 sign test case client

Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/Echo.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/Echo.java	2006-08-22 22:50:52 UTC (rev 807)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/Echo.java	2006-08-23 12:52:29 UTC (rev 808)
@@ -0,0 +1,26 @@
+// This class was generated by the JAXRPC SI, do not edit.
+// Contents subject to change without notice.
+// JAX-RPC Standard Implementation (1.1.3, build R1)
+// Generated source version: 1.1.3
+
+package org.jboss.test.ws.interop.microsoft.security.wsse10;
+
+
+public class Echo {
+    protected java.lang.String request;
+    
+    public Echo() {
+    }
+    
+    public Echo(java.lang.String request) {
+        this.request = request;
+    }
+    
+    public java.lang.String getRequest() {
+        return request;
+    }
+    
+    public void setRequest(java.lang.String request) {
+        this.request = request;
+    }
+}


Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/Echo.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/EchoResponse.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/EchoResponse.java	2006-08-22 22:50:52 UTC (rev 807)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/EchoResponse.java	2006-08-23 12:52:29 UTC (rev 808)
@@ -0,0 +1,26 @@
+// This class was generated by the JAXRPC SI, do not edit.
+// Contents subject to change without notice.
+// JAX-RPC Standard Implementation (1.1.3, build R1)
+// Generated source version: 1.1.3
+
+package org.jboss.test.ws.interop.microsoft.security.wsse10;
+
+
+public class EchoResponse {
+    protected java.lang.String echoResult;
+    
+    public EchoResponse() {
+    }
+    
+    public EchoResponse(java.lang.String echoResult) {
+        this.echoResult = echoResult;
+    }
+    
+    public java.lang.String getEchoResult() {
+        return echoResult;
+    }
+    
+    public void setEchoResult(java.lang.String echoResult) {
+        this.echoResult = echoResult;
+    }
+}


Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/EchoResponse.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/IPingServiceSign.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/IPingServiceSign.java	2006-08-22 22:50:52 UTC (rev 807)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/IPingServiceSign.java	2006-08-23 12:52:29 UTC (rev 808)
@@ -0,0 +1,13 @@
+// This class was generated by the JAXRPC SI, do not edit.
+// Contents subject to change without notice.
+// JAX-RPC Standard Implementation (1.1.3, build R1)
+// Generated source version: 1.1.3
+
+package org.jboss.test.ws.interop.microsoft.security.wsse10;
+
+public interface IPingServiceSign extends java.rmi.Remote {
+    public org.jboss.test.ws.interop.microsoft.security.wsse10.PingResponseBody ping(org.jboss.test.ws.interop.microsoft.security.wsse10.Ping ping) throws 
+         java.rmi.RemoteException;
+    public org.jboss.test.ws.interop.microsoft.security.wsse10.EchoResponse echo(org.jboss.test.ws.interop.microsoft.security.wsse10.Echo parameters) throws 
+         java.rmi.RemoteException;
+}


Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/IPingServiceSign.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/Ping.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/Ping.java	2006-08-22 22:50:52 UTC (rev 807)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/Ping.java	2006-08-23 12:52:29 UTC (rev 808)
@@ -0,0 +1,46 @@
+// This class was generated by the JAXRPC SI, do not edit.
+// Contents subject to change without notice.
+// JAX-RPC Standard Implementation (1.1.3, build R1)
+// Generated source version: 1.1.3
+
+package org.jboss.test.ws.interop.microsoft.security.wsse10;
+
+
+public class Ping {
+    protected java.lang.String scenario;
+    protected java.lang.String origin;
+    protected java.lang.String text;
+    
+    public Ping() {
+    }
+    
+    public Ping(java.lang.String scenario, java.lang.String origin, java.lang.String text) {
+        this.scenario = scenario;
+        this.origin = origin;
+        this.text = text;
+    }
+    
+    public java.lang.String getScenario() {
+        return scenario;
+    }
+    
+    public void setScenario(java.lang.String scenario) {
+        this.scenario = scenario;
+    }
+    
+    public java.lang.String getOrigin() {
+        return origin;
+    }
+    
+    public void setOrigin(java.lang.String origin) {
+        this.origin = origin;
+    }
+    
+    public java.lang.String getText() {
+        return text;
+    }
+    
+    public void setText(java.lang.String text) {
+        this.text = text;
+    }
+}


Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/Ping.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/PingResponseBody.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/PingResponseBody.java	2006-08-22 22:50:52 UTC (rev 807)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/PingResponseBody.java	2006-08-23 12:52:29 UTC (rev 808)
@@ -0,0 +1,46 @@
+// This class was generated by the JAXRPC SI, do not edit.
+// Contents subject to change without notice.
+// JAX-RPC Standard Implementation (1.1.3, build R1)
+// Generated source version: 1.1.3
+
+package org.jboss.test.ws.interop.microsoft.security.wsse10;
+
+
+public class PingResponseBody {
+    protected java.lang.String scenario;
+    protected java.lang.String origin;
+    protected java.lang.String text;
+    
+    public PingResponseBody() {
+    }
+    
+    public PingResponseBody(java.lang.String scenario, java.lang.String origin, java.lang.String text) {
+        this.scenario = scenario;
+        this.origin = origin;
+        this.text = text;
+    }
+    
+    public java.lang.String getScenario() {
+        return scenario;
+    }
+    
+    public void setScenario(java.lang.String scenario) {
+        this.scenario = scenario;
+    }
+    
+    public java.lang.String getOrigin() {
+        return origin;
+    }
+    
+    public void setOrigin(java.lang.String origin) {
+        this.origin = origin;
+    }
+    
+    public java.lang.String getText() {
+        return text;
+    }
+    
+    public void setText(java.lang.String text) {
+        this.text = text;
+    }
+}


Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/PingResponseBody.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/PingService10Sign.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/PingService10Sign.java	2006-08-22 22:50:52 UTC (rev 807)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/PingService10Sign.java	2006-08-23 12:52:29 UTC (rev 808)
@@ -0,0 +1,12 @@
+// This class was generated by the JAXRPC SI, do not edit.
+// Contents subject to change without notice.
+// JAX-RPC Standard Implementation (1.1.3, build R1)
+// Generated source version: 1.1.3
+
+package org.jboss.test.ws.interop.microsoft.security.wsse10;
+
+import javax.xml.rpc.*;
+
+public interface PingService10Sign extends javax.xml.rpc.Service {
+    public org.jboss.test.ws.interop.microsoft.security.wsse10.IPingServiceSign getMutualCertificate10Sign_IPingServiceSign() throws ServiceException;
+}


Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/PingService10Sign.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/SecurityTestCase.java
===================================================================
--- branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/SecurityTestCase.java	2006-08-22 22:50:52 UTC (rev 807)
+++ branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/SecurityTestCase.java	2006-08-23 12:52:29 UTC (rev 808)
@@ -0,0 +1,72 @@
+package org.jboss.test.ws.interop.microsoft.security.wsse10;
+
+import junit.framework.Test;
+import org.jboss.test.ws.JBossWSTest;
+import org.jboss.test.ws.JBossWSTestSetup;
+import org.jboss.test.ws.interop.microsoft.ClientScenario;
+import org.jboss.test.ws.interop.microsoft.InteropConfigFactory;
+
+import javax.naming.InitialContext;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.Stub;
+
+/**
+ * @author Heiko Braun, <heiko at openj.net>
+ * @since 07-Mar-2006
+ */
+public class SecurityTestCase extends JBossWSTest  {
+
+   IPingServiceSign port;
+   PingService10Sign service;
+
+   public static Test suite()
+   {
+      return JBossWSTestSetup.newTestSetup(SecurityTestCase.class, "jbossws-interop-wsse10-client.jar,jbossws-interop-wsse10Encrypt-client.jar");
+   }
+
+   protected void setUp() throws Exception
+   {
+      super.setUp();
+
+      if (port == null)
+      {
+         InitialContext iniCtx = getInitialContext();
+         Service signService = (Service)iniCtx.lookup("java:comp/env/service/interop/IPingServiceSign");
+         port = (IPingServiceSign)signService.getPort(IPingServiceSign.class);
+         configureClient();
+      }
+
+      System.setProperty("org.jboss.ws.wsse.keyStore", "resources/interop/microsoft/security/wsse10Shared/META-INF/alice.jks");
+      System.setProperty("org.jboss.ws.wsse.trustStore", "resources/interop/microsoft/security/wsse10Shared/META-INF/wsse10.truststore");
+      System.setProperty("org.jboss.ws.wsse.keyStorePassword", "password");
+      System.setProperty("org.jboss.ws.wsse.trustStorePassword", "password");
+      System.setProperty("org.jboss.ws.wsse.keyStoreType", "jks");
+      System.setProperty("org.jboss.ws.wsse.trustStoreType", "jks");
+   }
+
+   private void configureClient() {
+
+      InteropConfigFactory factory = InteropConfigFactory.newInstance();
+      ClientScenario scenario = factory.createClientScenario(System.getProperty("client.scenario"));
+      if(scenario!=null)
+      {
+         log.info("Using scenario: " + scenario);
+         ((Stub)port)._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, scenario.getTargetEndpoint().toString());
+      }
+      else
+      {
+         throw new IllegalStateException("Failed to load client scenario");
+      }
+   }
+
+   public void testSignOnly() throws Exception{
+
+      PingResponseBody pingResponse = port.ping(
+            new Ping("SignOnly", "JBossWS", "Hello World")
+      );
+      assertNotNull(pingResponse);
+
+      EchoResponse echoResponse = port.echo( new Echo("JBossWS Sign Only"));
+      assertNotNull(echoResponse);
+   }
+}


Property changes on: branches/jbossws-1.0/src/test/java/org/jboss/test/ws/interop/microsoft/security/wsse10/SecurityTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jboss-svn-commits mailing list