[jboss-svn-commits] JBL Code SVN: r29453 - in labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml: src/org/jboss/soa/esb/samples/quickstart/securitysaml and 2 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Sep 24 08:58:54 EDT 2009


Author: beve
Date: 2009-09-24 08:58:53 -0400 (Thu, 24 Sep 2009)
New Revision: 29453

Removed:
   labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/jbossesb-properties.xml
   labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/lib/
   labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/log4j.xml
   labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/PrintSubjectAction.java
   labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/test/SendMessage.java
   labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/test/soap_message_01.xml
   labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/test/soap_message_02.xml
Modified:
   labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/build.xml
   labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/login-config.xml
   labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/readme.txt
   labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/webservice/GoodbyeWorldWS.java
Log:
clean up.


Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/build.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/build.xml	2009-09-24 12:43:39 UTC (rev 29452)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/build.xml	2009-09-24 12:58:53 UTC (rev 29453)
@@ -43,13 +43,6 @@
 
 	<target name="runtest" depends="compile" description="sends a JMS message to queue/quickstart_security_saml_gw">
         <echo>Runs Test JMS Sender</echo>
-		<!--
-        <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.securitysaml.test.SendMessage" failonerror="true">
-            <arg value="01" />
-            <arg value="8767" />
-            <classpath refid="exec-classpath" />
-        </java>
-		-->
         <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.securitysaml.test.SendJMSMessage" failonerror="true">
             <arg value="queue/quickstart_security_saml_gw"/>
             <arg value="soap-request.xml"/>
@@ -57,28 +50,6 @@
         </java>
     </target>
 
-    <!--target name="runtest" depends="compile" description="run tests over jms, http, and socket">
-        <antcall target="saygoodbye_over_http" />
-    </target-->
-
-    <target name="saygoodbye_over_http" depends="compile">
-        <echo></echo>
-        <echo>Invoke JBR Gateway with successful login</echo>
-        <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.securitysaml.test.SendMessage" failonerror="true">
-            <arg value="01" />
-            <arg value="8765" />
-            <classpath refid="exec-classpath" />
-        </java>
-        <echo></echo>
-        <echo></echo>
-        <echo>Invoke JBR Gateway with unsuccessful login</echo>
-        <java fork="yes" classname="org.jboss.soa.esb.samples.quickstart.securitysaml.test.SendMessage" failonerror="true">
-            <arg value="02" />
-            <arg value="8765" />
-            <classpath refid="exec-classpath" />
-        </java>
-    </target>
-
 	<target name="quickstart-specific-deploys">
         <copy todir="${build.dir}" filtering="true" overwrite="true">
 

Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/jbossesb-properties.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/jbossesb-properties.xml	2009-09-24 12:43:39 UTC (rev 29452)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/jbossesb-properties.xml	2009-09-24 12:58:53 UTC (rev 29453)
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-  JBoss, Home of Professional Open Source
-  Copyright 2006, JBoss Inc., and others contributors as indicated 
-  by the @authors tag. All rights reserved. 
-  See the copyright.txt in the distribution for a
-  full listing of individual contributors. 
-  This copyrighted material is made available to anyone wishing to use,
-  modify, copy, or redistribute it subject to the terms and conditions
-  of the GNU Lesser General Public License, v. 2.1.
-  This program is distributed in the hope that it will be useful, but WITHOUT A 
-  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
-  PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
-  You should have received a copy of the GNU Lesser General Public License,
-  v.2.1 along with this distribution; if not, write to the Free Software
-  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
-  MA  02110-1301, USA.
-  
-  (C) 2005-2006,
-  @author JBoss Inc.
--->
-<!-- $Id: jbossesb-unittest-properties.xml $ -->
-<!--
-  These options are described in the JBossESB manual.
-  Defaults are provided here for convenience only.
- 
-  Please read through this file prior to using the system, and consider
-  updating the specified entries.
--->
-<esb
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:noNamespaceSchemaLocation="jbossesb-1_0.xsd">
-    <properties name="core">
-		<property name="org.jboss.soa.esb.jndi.server.context.factory" value="org.jnp.interfaces.NamingContextFactory"/>
-		<property name="org.jboss.soa.esb.jndi.server.url" value="${jboss.esb.bind.address}:1099"/>
-		<property name="org.jboss.soa.esb.persistence.connection.factory" 	value="org.jboss.internal.soa.esb.persistence.format.MessageStoreFactoryImpl"/>
-        <property name="org.jboss.soa.esb.loadbalancer.policy" value="org.jboss.soa.esb.listeners.ha.RoundRobin"/>
-        <property name="jboss.esb.invm.scope.default" value="NONE"/>
-    </properties>
-	 <properties name="security">
-		<property name="org.jboss.soa.esb.services.security.implementationClass" value="org.jboss.internal.soa.esb.services.security.JaasSecurityService"/>
-    </properties>
-    <properties name="registry">
-    	<property name="org.jboss.soa.esb.registry.queryManagerURI" value="org.apache.juddi.registry.local.InquiryService#inquire"/>
-    	<property name="org.jboss.soa.esb.registry.lifeCycleManagerURI" value="org.apache.juddi.registry.local.PublishService#publish"/>
-    	<property name="org.jboss.soa.esb.registry.implementationClass" value="org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.factoryClass" value="org.apache.ws.scout.registry.ConnectionFactoryImpl"/>
-    	<property name="org.jboss.soa.esb.registry.user" value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.registry.password" value="password"/>
-    	<!-- the following parameter is scout specific to set the type of communication between scout and the UDDI (embedded, rmi, soap) -->
-    	<property name="org.jboss.soa.esb.scout.proxy.transportClass" value="org.apache.ws.scout.transport.LocalTransport"/>
-    </properties>
-    <properties name="transports" depends="core">
-    	<property name="org.jboss.soa.esb.mail.smtp.host" value="localhost"/>
-    	<property name="org.jboss.soa.esb.mail.smtp.user" value="jbossesb"/>
-    	<property name="org.jboss.soa.esb.mail.smtp.password" value=""/>
-    	<property name="org.jboss.soa.esb.mail.smtp.port" value="25"/>
-    	<property name="org.jboss.soa.esb.mail.smtp.auth" value="true"/>
-    	<property name="org.jboss.soa.esb.ftp.localdir" value="/tmp"/>
-    	<property name="org.jboss.soa.esb.ftp.remotedir" value="/tmp"/>
-    	<property name="org.jboss.soa.esb.jms.connectionPool" value="20"/>
-    	<property name="org.jboss.soa.esb.jms.sessionSleep" value="30"/>
-    </properties>
-    <properties name="connection">
-    	<property name="min-pool-size" value="5"/>
-    	<property name="max-pool-size" value="10"/>
-    	<property name="blocking-timeout-millis" value="5000"/>
-    	<property name="abandoned-connection-timeout" value="10000"/>
-    	<property name="abandoned-connection-time-interval" value="30000"/>
-    </properties>
-    <properties name="dbstore">
-    	
-    	<!--  connection manager type -->
-	    <!-- <property name="org.jboss.soa.esb.persistence.db.conn.manager" 		value="org.jboss.internal.soa.esb.persistence.manager.StandaloneConnectionManager"/>	 -->    
-	     <property name="org.jboss.soa.esb.persistence.db.conn.manager" value="org.jboss.internal.soa.esb.persistence.manager.J2eeConnectionManager"/>
-	    
-	    <!-- this property is only used if using the j2ee connection manager -->
-	    <property name="org.jboss.soa.esb.persistence.db.datasource.name" 	value="java:/JBossESBDS"/>
-		
-		<!-- standalone connection pooling settings -->
-		<property name="org.jboss.soa.esb.persistence.db.connection.url" 	value="jdbc:hsqldb:hsql://localhost:9001/"/>
-		<property name="org.jboss.soa.esb.persistence.db.jdbc.driver" 		value="org.hsqldb.jdbcDriver"/>
-		<property name="org.jboss.soa.esb.persistence.db.user" 				value="sa"/>
-		<property name="org.jboss.soa.esb.persistence.db.pwd" 				value=""/>		
-		<property name="org.jboss.soa.esb.persistence.db.pool.initial.size"	value="2"/>
-		<property name="org.jboss.soa.esb.persistence.db.pool.min.size"		value="2"/>
-		<property name="org.jboss.soa.esb.persistence.db.pool.max.size"		value="5"/>
-		<!--table managed by pool to test for valid connections - created by pool automatically -->
-		<property name="org.jboss.soa.esb.persistence.db.pool.test.table"	value="pooltest"/>		
-		<property name="org.jboss.soa.esb.persistence.db.pool.timeout.millis"	value="5000"/> 
-		
-    </properties>    
-    <properties name="filters">
-    	<property name="org.jboss.soa.esb.filter.1" value="org.jboss.internal.soa.esb.message.filter.MetaDataFilter"/>
-    	<property name="org.jboss.soa.esb.filter.2" value="org.jboss.internal.soa.esb.message.filter.GatewayFilter"/>
-    </properties>
-</esb>

Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/log4j.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/log4j.xml	2009-09-24 12:43:39 UTC (rev 29452)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/log4j.xml	2009-09-24 12:58:53 UTC (rev 29453)
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  Log4j Configuration                                                  -->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<!-- $Id: log4j.xml,v 1.26.2.5 2005/09/15 09:31:02 dimitris Exp $ -->
-
-<!--
-   | For more configuration infromation and examples see the Jakarta Log4j
-   | owebsite: http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
-   <!-- ============================== -->
-   <!-- Append messages to the console -->
-   <!-- ============================== -->
-
-   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-      <param name="Target" value="System.out"/>
-
-      <layout class="org.apache.log4j.PatternLayout">
-         <!-- The default pattern: Date Priority [Category] Message\n -->
-         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%t][%c{1}] %m%n"/>
-      </layout>
-   </appender>
-
-   <!-- ================================= -->
-   <!-- Preserve messages in a local file -->
-   <!-- ================================= -->
-
-   <!-- A size based file rolling appender -->
-   <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
-     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
-     <param name="File" value="./listener.log"/>
-     <param name="Append" value="false"/>
-     <param name="MaxFileSize" value="500KB"/>
-     <param name="MaxBackupIndex" value="1"/>
-
-     <layout class="org.apache.log4j.PatternLayout">
-       <param name="ConversionPattern" value="%d %-5p [%t][%c] %m%n"/>
-     </layout>	    
-   </appender>
-
-   <!-- ================ -->
-   <!-- Limit categories -->
-   <!-- ================ -->
-
-   <category name="org.jboss">
-      <priority value="WARN"/>
-   </category>
-   <category name="org.jboss.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.jboss.internal.soa.esb">
-      <priority value="ERROR"/>
-   </category>
-   <category name="org.apache">
-      <priority value="ERROR"/>
-   </category>
-   <category name="quickstart">
-      <priority value="INFO"/>
-   </category>
-   <!-- ======================= -->
-   <!-- Setup the Root category -->
-   <!-- ======================= -->
-
-   <root>
-      <appender-ref ref="CONSOLE"/>
-      <appender-ref ref="FILE"/>
-   </root>
-
-</log4j:configuration>

Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/login-config.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/login-config.xml	2009-09-24 12:43:39 UTC (rev 29452)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/login-config.xml	2009-09-24 12:58:53 UTC (rev 29453)
@@ -1,15 +1,4 @@
-	<!-- Copy+Paste *into* <server>/<configname>/conf/login-config.xml -->
-
-	<application-policy name = "CertLogin">
-		<authentication>
-			 <login-module code = "org.jboss.soa.esb.services.security.auth.login.CertificateLoginModule" flag = "required" >
-				<module-option name = "keyStoreURL">file://@KEYSTORE_PATH@</module-option>
-				<module-option name = "keyStorePassword">storepassword</module-option>
-				<module-option name = "rolesPropertiesFile">file://@ROLES_FILE_PATH@</module-option>
-		  </login-module>
-		</authentication>
-	</application-policy>
-
+	<!-- Copy&Paste *into* <server>/<configname>/conf/login-config.xml -->
 	<application-policy name = "jbossesb-saml">
         <authentication>
             <login-module code="org.jboss.soa.esb.services.security.auth.login.JBossSTSLoginModule" flag="required">

Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/readme.txt
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/readme.txt	2009-09-24 12:43:39 UTC (rev 29452)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/readme.txt	2009-09-24 12:58:53 UTC (rev 29453)
@@ -3,36 +3,44 @@
   This quickstart demonstrates JBossESB support for SAML. The SAML support is provided by 
   using JBoss Security Token Service (JBossSTS).
 
-
   The following will be demonstrated by this quickstart:
-	* Using the JBossSTSAction to request a SAML Assertion from JBossSTS.
-	  This action would be used when a call to one or more internal or external
-	  service require a valid SAML Assertion. This would be called once and authentication
-	  would only be performed once.
+  * Using the JBossSTSAction to isssue a SAML Assertion from JBossSTS
+  * Injecting the SAML Assertion into a SOAP Message
+  * Calling a second service in the esb that is secured using the JBossSTSLoginModule which will validate the security token.
+  * Using SOAPProcessor to invoke an externa Web Service that is secured by JBossSTS.
 
-	* Injecting a SAML Assertion into a SOAP Message.
+  (Note that this quickstart only works with AS 5.1.0.GA or higher)
 
-	* Configuring a service to use JBossSTSLoginModule to validate a SAML Assertion.
-	  In JBossESB a service may be configured to use the JBossSTSLoginModule. This JAAS Login Module
-	  expects the caller to have a SAML Assertion in its AuthenticationRequest. 
-
-	* Calling an external, external to the ESB that is, web service that is secured using
-	  JBossSTS.
-
 Running this quickstart:
 ========================
   Please refer to 'ant help-quickstarts' for prerequisites about the quickstarts
   and a more detailed descripton of the different ways to run the quickstarts.
 
 To Run:
-===========================
+========================
   1. Type 'ant deploy'.
-  2. Copy+Paste the contents of *build*/login-config.xml *into* <server>/<configname>/conf/login-config.xml
-  3. Deploy jboss-sts.war to the application server by copying it into the deploy directory.
-  4. Start the server.
-  5. 'ant runtest' will send a HTTP request to a JBossRemoting Gatway
-  6. 'ant sendesb' will invoke the Service directly using the ServiceInvoker
+  2. Copy&Paste the contents of build/login-config.xml into <server>/<configname>/conf/login-config.xml
+  3. Start the server.
+  4. 'ant runtest' will send a HTTP request to a JBossRemoting Gatway
 
   # Please refer to the "Security" section of the ServiceGuide.pdf for more details on the security features of JBossESB.
 
 
+Quickstart content
+==================
+# jboss-sts.war
+The JBossSTS.war is the JBoss Identity WS-Trust Security Token Service implementation.
+
+# jboss-sts-client.properties
+The configuration for the JBossSTSAction and JBossSTSLoginModule.
+
+# login-config.xml
+The JBoss security configuration fragment required for this quickstart. This will be filtered by Ant
+and the outputted login-config.xml content in the build directory should be compied into the servers
+login-config.xml
+
+# soap-request.xml
+The soap request sent to the esb. 
+
+
+

Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/PrintSubjectAction.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/PrintSubjectAction.java	2009-09-24 12:43:39 UTC (rev 29452)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/PrintSubjectAction.java	2009-09-24 12:58:53 UTC (rev 29453)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated 
- * by the @authors tag. All rights reserved. 
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstart.securitysaml;
-
-
-import java.net.URL;
-import java.io.File;
-import java.io.FilePermission;
-import java.security.AccessControlContext;
-import java.security.AccessController;
-import java.security.CodeSource;
-import java.security.Permissions;
-import java.security.PermissionCollection;
-import java.security.Policy;
-
-import javax.security.auth.Subject;
-
-import org.jboss.soa.esb.ConfigurationException;
-import org.jboss.soa.esb.actions.AbstractActionLifecycle;
-import org.jboss.soa.esb.helpers.ConfigTree;
-import org.jboss.soa.esb.message.Message;
-import org.jboss.soa.esb.services.security.auth.login.SamlContext;
-import org.jboss.soa.esb.services.security.auth.login.SamlPrincipal;
-
-public class PrintSubjectAction extends AbstractActionLifecycle
-{
-    
-  protected ConfigTree	config;
-	  
-  public PrintSubjectAction(ConfigTree config) throws ConfigurationException
-  { 
-	  this.config = config; 
-  } 
-  
-  public Message process(Message message) throws Exception
-  {
-	  System.out.println("SecurityContext " + message.getProperties().getProperty("org.jboss.soa.esb.services.security.context"));
-	  System.out.println("Subject : " + Subject.getSubject(AccessController.getContext()));
-	  SamlPrincipal samlPrincipal = SamlContext.getContext();
-	  if (samlPrincipal != null)
-		  System.out.println("SamlAssertion : " + samlPrincipal.getAssertion());
-	  return message; 
-  }
-	
-}

Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/test/SendMessage.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/test/SendMessage.java	2009-09-24 12:43:39 UTC (rev 29452)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/test/SendMessage.java	2009-09-24 12:58:53 UTC (rev 29453)
@@ -1,123 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and others contributors as indicated 
- * by the @authors tag. All rights reserved. 
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors. 
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A 
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
- * MA  02110-1301, USA.
- * 
- * (C) 2005-2006,
- * @author JBoss Inc.
- */
-package org.jboss.soa.esb.samples.quickstart.securitysaml.test;
-
-import org.jboss.internal.soa.esb.util.StreamUtils;
-import org.jboss.remoting.InvokerLocator;
-import org.jboss.remoting.Client;
-
-import javax.jms.JMSException;
-import javax.jms.ObjectMessage;
-import javax.jms.Queue;
-import javax.jms.QueueConnection;
-import javax.jms.QueueConnectionFactory;
-import javax.jms.QueueSender;
-import javax.jms.QueueSession;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import java.net.InetAddress;
-
-import org.jboss.soa.esb.actions.StoreMessageToFile;
-
-public class SendMessage {
-    QueueConnection conn;
-    QueueSession session;
-    Queue que;
-
-    public void sendMessageOverJMS(String message) throws JMSException, NamingException {
-        QueueSender sender = null;
-
-    	setupJMSConnection();
-        try {
-            ObjectMessage tm = null;
-
-            sender = session.createSender(que);
-            tm = session.createObjectMessage(message);
-	    tm.setStringProperty(StoreMessageToFile.PROPERTY_JBESB_FILENAME, "WebServiceProducerTest.log");
-            sender.send(tm);
-        } finally {
-            if(sender != null) {
-                sender.close();
-            }
-            cleanupJMSConnection();
-        }
-    }
-
-    private void sendMessageToJBRListener(String protocol, int port, String message) throws Throwable {
-        String locatorURI = protocol + "://localhost:" + port;
-        InvokerLocator locator = new InvokerLocator(locatorURI);
-        System.out.println("Calling JBoss Remoting Listener using locator URI: " + locatorURI);
-
-        Client remotingClient = null;
-        try {
-            remotingClient = new Client(locator);
-            remotingClient.connect();
-
-            // Deliver the message to the listener...
-            Object response = remotingClient.invoke(message);
-            System.out.println("JBR Class: " + response.getClass().getName());
-            System.out.println("Response from JBoss Remoting Listener '" + locatorURI + "' was '" + response + "'.");
-        } finally {
-            if(remotingClient != null) {
-                remotingClient.disconnect();
-            }
-        }
-    }
-
-    public void setupJMSConnection() throws JMSException, NamingException
-    {
-    	InitialContext iniCtx = new InitialContext();
-    	Object tmp = iniCtx.lookup("ConnectionFactory");
-    	QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
-    	conn = qcf.createQueueConnection();
-    	que = (Queue) iniCtx.lookup("queue/quickstart_security_cert_secured_gw");
-    	session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
-    	conn.start();
-    }
-
-    public void cleanupJMSConnection() throws JMSException
-    {
-        conn.stop();
-        session.close();
-        conn.close();
-    }
-
-    private static String getMessage(String messageNum) {
-        String msg = new String(StreamUtils.readStream(SendMessage.class.getResourceAsStream("soap_message_" + messageNum + ".xml")));
-        return msg;
-    }
-
-    public static void main(String args[]) throws Throwable
-    {        	    	
-    	SendMessage sm = new SendMessage();
-        String msg = getMessage(args[0]);
-
-		try
-		{
-			sm.sendMessageToJBRListener("http", Integer.parseInt(args[1]), msg);
-		}
-		catch(final Exception e)
-		{
-			System.err.println("Call was not successful. See server.log for details. Exception was:");
-			e.printStackTrace();	
-		}
-    }
-}

Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/test/soap_message_01.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/test/soap_message_01.xml	2009-09-24 12:43:39 UTC (rev 29452)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/test/soap_message_01.xml	2009-09-24 12:58:53 UTC (rev 29453)
@@ -1,22 +0,0 @@
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:good="http://security_cert/goodbyeworld">
-   <soapenv:Header>
-	<wsse:Security xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'>
-			<wsse:BinarySecurityToken EncodingType='wsse:Base64Binary' ValueType='wsse:X509v3'>MIICVDCCAb0CBEj0PZ4wDQYJKoZIhvcNAQEEBQAwcTELMAkGA1UEBhMCU0UxEjAQBgNVBAgTCVN0
-b2NraG9sbTESMBAGA1UEBxMJU3RvY2tob2xtMRAwDgYDVQQKEwdSZWQgSGF0MQ4wDAYDVQQLEwVK
-Qm9zczEYMBYGA1UEAxMPRGFuaWVsIEJldmVuaXVzMB4XDTA4MTAxNDA2MzUxMFoXDTExMDcxMDA2
-MzUxMFowcTELMAkGA1UEBhMCU0UxEjAQBgNVBAgTCVN0b2NraG9sbTESMBAGA1UEBxMJU3RvY2to
-b2xtMRAwDgYDVQQKEwdSZWQgSGF0MQ4wDAYDVQQLEwVKQm9zczEYMBYGA1UEAxMPRGFuaWVsIEJl
-dmVuaXVzMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCPwfTNhUsBYIi+h5mt/tzcHRl2Uh//
-/alzFsGint0rlFRRa/LJ/6XSwviVbMXitpqUCw3Qknf6e4xRFJpfv35FALqyRJmwMjsgpy9GjWM9
-HHpCXetrpop7sWF3C8etwfv1T/mKk6jcQ4tX2So2Wjv1Lb3zqj/5Pgj8Pcy+oecZfwIDAQABMA0G
-CSqGSIb3DQEBBAUAA4GBADWjrmaDi01ZUAIAHim6hnNbuh9X+uszrkwglSjVDOKkuPjX8lgrlR9i
-jNP7gnwGg2+bQXW4P17BViwN9Kd00+hNkXw9smimPvUnGRAbX/I8ntQqfKs3dq1E3yBT4NZmb3Bc
-h6tJtOWrUv0mEl1pkOGFcDvP5Gsq70jAtwC/9Cge</wsse:BinarySecurityToken>
-		</wsse:Security>
-   </soapenv:Header>
-   <soapenv:Body>
-      <good:sayGoodbye>
-         <message>Goodbye!!</message>
-      </good:sayGoodbye>
-   </soapenv:Body>
-</soapenv:Envelope>

Deleted: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/test/soap_message_02.xml
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/test/soap_message_02.xml	2009-09-24 12:43:39 UTC (rev 29452)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/test/soap_message_02.xml	2009-09-24 12:58:53 UTC (rev 29453)
@@ -1,21 +0,0 @@
-<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:good="http://security_cert/goodbyeworld">
-	<soapenv:Header>
-    <wsse:Security xmlns:wsse='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'>
-            <wsse:BinarySecurityToken EncodingType='wsse:Base64Binary' ValueType='wsse:X509v3'>MIICIjCCAYsCBEj0TGMwDQYJKoZIhvcNAQEEBQAwWDELMAkGA1UEBhMCQkIxDDAKBgNVBAgTA0Jh
-ZDEMMAoGA1UEBxMDQmFkMQwwCgYDVQQKEwNCYWQxDDAKBgNVBAsTA0JhZDERMA8GA1UEAxMIQmFk
-IHVzZXIwHhcNMDgxMDE0MDczODExWhcNMTEwNzEwMDczODExWjBYMQswCQYDVQQGEwJCQjEMMAoG
-A1UECBMDQmFkMQwwCgYDVQQHEwNCYWQxDDAKBgNVBAoTA0JhZDEMMAoGA1UECxMDQmFkMREwDwYD
-VQQDEwhCYWQgdXNlcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAhlb/SagmAPrp5+CqSexB
-/X/GhdtaYXQHY0rKvyE/E2g5bKsXDcNAUu9ZwHmUHIPoyHTGTdQbYgQVbehOPys2RiyQr7MOP1L7
-X+H2YC6Fce55eydFliIFDKq9+991fmPSOZ6lz/vYnfN4fEwMuw4CbJ2Zlt+vb44AvVVyZHZpZykC
-AwEAATANBgkqhkiG9w0BAQQFAAOBgQB5fMiT7ApyoUoP3dq9rmpjrUxKIxBvbkWCWrR9KyN7kPT6
-/zDcqlmljjhVWZdOEQ6dTOmuA56fvNE8WO1xLq6F+OZZni3IDQ/cPgqEa/REOuv+tFGK08Te0WIe
-3Ff5vodp0s+H/X75X2Sy3ZbZMXCV115q5rASRbOjsxE5fVaRMw==</wsse:BinarySecurityToken>
-        </wsse:Security>
-   </soapenv:Header>
-   <soapenv:Body>
-      <good:sayGoodbyeWithoutResponse>
-         <message>Goodbye!!</message>
-      </good:sayGoodbyeWithoutResponse>
-   </soapenv:Body>
-</soapenv:Envelope>

Modified: labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/webservice/GoodbyeWorldWS.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/webservice/GoodbyeWorldWS.java	2009-09-24 12:43:39 UTC (rev 29452)
+++ labs/jbossesb/workspace/dbevenius/saml_support/product/samples/quickstarts/security_saml/src/org/jboss/soa/esb/samples/quickstart/securitysaml/webservice/GoodbyeWorldWS.java	2009-09-24 12:58:53 UTC (rev 29453)
@@ -12,22 +12,15 @@
 import org.jboss.soa.esb.actions.ActionUtils;
 import org.jboss.soa.esb.actions.soap.SOAPProcessor;
 
-/**
- * @author
- */
 @HandlerChain(file="handlerchain.xml")
 @WebService(name = "GoodbyeWorldWS", targetNamespace="http://security_saml/goodbyeworld")
 public class GoodbyeWorldWS {
 
     @WebMethod
     public String sayGoodbye(@WebParam(name="message") String message) {
-
         Message esbMessage = SOAPProcessor.getMessage();
-        if(esbMessage != null) {
-            System.out.println("**** SOAPRequest perhaps mediated by ESB:\n" + esbMessage.getBody().get());
-            // System.out.println("\n" + esbMessage.toString() + "\n");
-        }
-        System.out.println("Web Service Parameter - message=" + message);
+        System.out.println("Succesfully invoked WS!");
+		System.out.println("SOAPRequest perhaps mediated by ESB:\n" + esbMessage.getBody().get());
         return "... Ah Goodbye then!!!! - " + message;
     }
 
@@ -36,7 +29,6 @@
         Message esbMessage = SOAPProcessor.getMessage();
         if(esbMessage != null) {
             System.out.println("**** SOAPRequest perhaps mediated by ESB:\n" + esbMessage.getBody().get());
-            // System.out.println("\n" + esbMessage.toString() + "\n");
         }
         System.out.println("Web Service Parameter - message=" + message);
         return "... Adios Amigo!!!! - " + message;



More information about the jboss-svn-commits mailing list