riftsaw SVN: r690 - in trunk/stress-tests: src/test/java/org/jboss/soa and 9 other directories.
by riftsaw-commits@lists.jboss.org
Author: bbrodt
Date: 2010-06-01 16:24:20 -0400 (Tue, 01 Jun 2010)
New Revision: 690
Added:
trunk/stress-tests/src/test/java/org/jboss/soa/esb/
trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/
trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/
trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/TeargasConst.java
trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/message/
trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/message/generator/
trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/message/sender/
trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/qs/
trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/qs/QSRunner.java
Removed:
trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/qs/QSRunTest.java
trunk/stress-tests/src/test/resources/performance/bpel/SimpleInvoke.cbp
trunk/stress-tests/src/test/resources/performance/war/src/org/jboss/soa/esb/
Modified:
trunk/stress-tests/build.xml
trunk/stress-tests/pom.xml
trunk/stress-tests/src/test/java/org/jboss/soa/bpel/tests/performance/PerformanceTestCase.java
trunk/stress-tests/src/test/resources/performance/bpel/SimpleInvoke.wsdl
trunk/stress-tests/src/test/resources/performance/bpel/bpel-deploy.xml
trunk/stress-tests/src/test/resources/performance/build.xml
Log:
https://jira.jboss.org/browse/RIFTSAW-182
Fixed performance tests and refactored some classes which will be used for additional multithreaded tests
Modified: trunk/stress-tests/build.xml
===================================================================
--- trunk/stress-tests/build.xml 2010-06-01 11:32:25 UTC (rev 689)
+++ trunk/stress-tests/build.xml 2010-06-01 20:24:20 UTC (rev 690)
@@ -41,18 +41,20 @@
</target>
<target name="deploy-riftsaw" >
- <antcall target="replace.jdbc.files" />
- <ant antfile="build.xml"
- target="deploy"
- dir="${basedir}/../distribution/target/dist/riftsaw-${riftsaw.engine.version}/install">
+ <antcall target="replace.jdbc.files" />
+ <ant antfile="build.xml"
+ target="deploy"
+ dir="${basedir}/../distribution/target/dist/riftsaw-${riftsaw.engine.version}/install">
<property name="org.jboss.as.home" value="${org.jboss.as.home}" />
<property name="org.jboss.as.config" value="${org.jboss.as.config}" />
<property name="org.jboss.esb.home" value="${org.jboss.esb.home}" />
<property name="database" value="${database}" />
</ant>
+ <ant antfile="src/test/resources/performance/build.xml" target="deploy"/>
</target>
<target name="undeploy-riftsaw" >
+ <ant antfile="src/test/resources/performance/build.xml" target="undeploy"/>
<ant antfile="build.xml"
target="undeploy"
dir="${basedir}/../distribution/target/dist/riftsaw-${riftsaw.engine.version}/install">
Modified: trunk/stress-tests/pom.xml
===================================================================
--- trunk/stress-tests/pom.xml 2010-06-01 11:32:25 UTC (rev 689)
+++ trunk/stress-tests/pom.xml 2010-06-01 20:24:20 UTC (rev 690)
@@ -278,6 +278,7 @@
<additionalClasspathElements>
<additionalClasspathElement>${basedir}/src/test/resources/conf</additionalClasspathElement>
<additionalClasspathElement>${basedir}/target/rosetta.aop</additionalClasspathElement>
+ <additionalClasspathElement>${basedir}/bin</additionalClasspathElement>
</additionalClasspathElements>
<systemProperties>
<property>
Modified: trunk/stress-tests/src/test/java/org/jboss/soa/bpel/tests/performance/PerformanceTestCase.java
===================================================================
--- trunk/stress-tests/src/test/java/org/jboss/soa/bpel/tests/performance/PerformanceTestCase.java 2010-06-01 11:32:25 UTC (rev 689)
+++ trunk/stress-tests/src/test/java/org/jboss/soa/bpel/tests/performance/PerformanceTestCase.java 2010-06-01 20:24:20 UTC (rev 690)
@@ -1,49 +1,49 @@
package org.jboss.soa.bpel.tests.performance;
-import junit.framework.Test;
+import junit.framework.TestCase;
-import org.jboss.soa.bpel.tests.RiftSawTest;
-import org.jboss.soa.bpel.tests.RiftSawTestSetup;
-import org.jboss.soa.esb.qa.teargas.qs.QSRunTest;
+import org.jboss.soa.esb.qa.teargas.qs.QSRunner;
-public class PerformanceTestCase extends RiftSawTest {
+public class PerformanceTestCase extends TestCase {
- private static final String TEST_NAME = "Performance";
-
public PerformanceTestCase(String name) {
- super(TEST_NAME);
+ super(name);
}
-
- public static Test suite() {
- return(new RiftSawTestSetup(PerformanceTestCase.class,
- TEST_NAME, "")); // nothing to do here - jars and wars are already deployed
+
+ protected void setUp() throws Exception {
+ super.setUp();
}
-
- public void testRun() throws Exception {
- String resources = System.getProperty("resources.dir");
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testRunTest() throws Exception {
+ String resources = System.getenv("resources.dir");
int count = 1;
if (resources==null)
- resources = "src/test/resources";
+ resources = "src/test/resources/performance";
try
{
- count = Integer.parseInt(System.getProperty("count"));
+ System.out.println("System Property \"count\"=" + System.getenv("count"));
+ count = Integer.parseInt(System.getenv("count"));
}
catch(Exception ex)
{
- fail(ex.getMessage());
}
String[] args = new String[3];
- args[0] = "-message="+resources+"/performance/messages/hello_request1.xml";
+ args[0] = "-message="+resources+"/messages/hello_request1.xml";
args[1] = "-address=http://localhost:8080/SimpleInvoke";
args[2] = "-count="+count;
- QSRunTest qs = new QSRunTest();
+ QSRunner qs = new QSRunner();
qs.parseArguments(args);
if (!qs.validArguments()) {
System.out.println("Usage: QSRunTest -address=<WS URL> -message=<message file> -count=<number of messages>");
System.out.println("Additional properties for message sender can be specified using -D<property_name>=<value>");
} else {
+ System.out.println("Running performance test with "+count+" messages.");
qs.runTest();
}
}
Copied: trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/TeargasConst.java (from rev 681, trunk/stress-tests/src/test/resources/performance/war/src/org/jboss/soa/esb/qa/teargas/TeargasConst.java)
===================================================================
--- trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/TeargasConst.java (rev 0)
+++ trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/TeargasConst.java 2010-06-01 20:24:20 UTC (rev 690)
@@ -0,0 +1,38 @@
+/*
+ * 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-2008,
+ */
+
+package org.jboss.soa.esb.qa.teargas;
+
+/**
+ *
+ * @author mvecera
+ */
+public class TeargasConst {
+
+ public static final String MONITORING_QUEUE = "queue/teargas_jms_monitor";
+ public static final String STOP_MESSAGE_PROPERTY = "This_is_the_very_last_message";
+ public static final String PERFORMANCE_MESSAGE_PROPERTY = "Teargas_Performance";
+ public static final String TIME_MESSAGE_PROPERTY = "Teargas_Performance_Time";
+ public static final String COUNT_MESSAGE_PROPERTY = "Teargas_Performance_Count";
+ public static final String START_VALUE = "**START**";
+ public static final String STOP_VALUE = "**STOP**";
+ public static final String CHECK_POINT_VALUE = "**CHECK**";
+
+}
Copied: trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/message/generator (from rev 681, trunk/stress-tests/src/test/resources/performance/war/src/org/jboss/soa/esb/qa/teargas/message/generator)
Copied: trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/message/sender (from rev 681, trunk/stress-tests/src/test/resources/performance/war/src/org/jboss/soa/esb/qa/teargas/message/sender)
Copied: trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/qs (from rev 681, trunk/stress-tests/src/test/resources/performance/war/src/org/jboss/soa/esb/qa/teargas/qs)
Deleted: trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/qs/QSRunTest.java
===================================================================
--- trunk/stress-tests/src/test/resources/performance/war/src/org/jboss/soa/esb/qa/teargas/qs/QSRunTest.java 2010-05-28 20:37:17 UTC (rev 681)
+++ trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/qs/QSRunTest.java 2010-06-01 20:24:20 UTC (rev 690)
@@ -1,163 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY 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 along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.soa.esb.qa.teargas.qs;
-
-import java.io.BufferedReader;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.Hashtable;
-import java.util.Map.Entry;
-import java.util.Vector;
-import org.jboss.soa.esb.qa.teargas.message.generator.AbstractMessageGenerator;
-import org.jboss.soa.esb.qa.teargas.message.generator.QSMessageGenerator;
-import org.jboss.soa.esb.qa.teargas.message.sender.HTTPSender;
-import org.jboss.soa.esb.qa.teargas.message.sender.MessageSender;
-
-/**
- *
- * @author mvecera
- */
-public class QSRunTest {
- private Vector<String> params = new Vector<String>();
- private Hashtable<String, String> options = new Hashtable<String, String>();
- private Hashtable<String, String> properties = new Hashtable<String, String>();
-
- private int count;
- private StringBuilder sbMessage = new StringBuilder();
- private String address;
- private MessageSender sender = null;
-
- public void parseArguments(String[] args) {
- int paramIndex = 0;
- for (int i = 0; i < args.length; i++) {
- if (args[i].startsWith("-")) {
- if (args[i].startsWith("-D")) {
- int loc = args[i].indexOf("=");
- String key = (loc > 0) ? args[i].substring(2, loc) : args[i].substring(2);
- String value = (loc > 0) ? args[i].substring(loc + 1) : "";
- properties.put(key.toLowerCase(), value);
- } else {
- int loc = args[i].indexOf("=");
- String key = (loc > 0) ? args[i].substring(1, loc) : args[i].substring(1);
- String value = (loc > 0) ? args[i].substring(loc + 1) : "";
- options.put(key.toLowerCase(), value);
- }
- } else {
- params.addElement(args[i]);
- }
- }
- }
-
- private boolean hasOption(String opt) {
- return options.containsKey(opt.toLowerCase());
- }
-
- private String getOption(String opt) {
- return options.get(opt.toLowerCase());
- }
-
- public void runTest() throws Exception {
- AbstractMessageGenerator generator = new QSMessageGenerator();
- if (sender == null) {
- sender = new HTTPSender();
- }
-
- for (Entry<String, String> e: properties.entrySet()) {
- sender.setProperty(e.getKey(), e.getValue());
- generator.setProperty(e.getKey(), e.getValue());
- }
-
- generator.init(address, sender);
- generator.generate(sbMessage.toString(), count);
- generator.close();
- }
-
- private void loadMessage(String fileName) throws IOException {
- FileReader fr = new FileReader(fileName);
- BufferedReader br = new BufferedReader(fr);
-
- String line = "";
- while ((line = br.readLine()) != null) {
- sbMessage.append(line);
- }
-
- br.close();
- fr.close();
- }
-
- public boolean validArguments() {
- if (hasOption("message") && hasOption("address") && hasOption("count")) {
- try {
- count = Integer.parseInt(getOption("count"));
- } catch (NumberFormatException e) {
- System.err.println("Option count is not a valid number.");
- return false;
- }
-
- try {
- loadMessage(getOption("message"));
- } catch (IOException e) {
- System.err.println("Unable to read meesage file.");
- return false;
- }
-
- address = getOption("address");
- if (address == null || "".equals(address)) {
- System.err.println("Invalid address.");
- return false;
- }
- }
-
- if (hasOption("sender")) {
- String senderClass = "org.jboss.soa.esb.qa.teargas.message.sender." + getOption("sender");
-
- try {
- sender = (MessageSender) Class.forName(senderClass, false, this.getClass().getClassLoader()).newInstance();
- } catch (ClassNotFoundException e) {
- System.err.println("Unable to instantiate sender class - class not found: " + senderClass);
- return false;
- } catch (InstantiationException e) {
- System.err.println("Unable to instantiate sender class.");
- return false;
- } catch (IllegalAccessException e) {
- System.err.println("Unable to instantiate sender class.");
- return false;
- }
- }
-
- return true;
- }
-
- public static void main(String[] args) throws Exception {
- System.out.println("Teargas testing framework - QS Performance measurement");
-
- QSRunTest qs = new QSRunTest();
- qs.parseArguments(args);
- if (!qs.validArguments()) {
- System.out.println("Usage: QSRunTest -address=<WS URL> -message=<message file> -count=<number of messages>");
- System.out.println("Additional properties for message sender can be specified using -D<property_name>=<value>");
- } else {
- qs.runTest();
- }
- }
-
-}
Copied: trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/qs/QSRunner.java (from rev 681, trunk/stress-tests/src/test/resources/performance/war/src/org/jboss/soa/esb/qa/teargas/qs/QSRunTest.java)
===================================================================
--- trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/qs/QSRunner.java (rev 0)
+++ trunk/stress-tests/src/test/java/org/jboss/soa/esb/qa/teargas/qs/QSRunner.java 2010-06-01 20:24:20 UTC (rev 690)
@@ -0,0 +1,163 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.soa.esb.qa.teargas.qs;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Hashtable;
+import java.util.Map.Entry;
+import java.util.Vector;
+import org.jboss.soa.esb.qa.teargas.message.generator.AbstractMessageGenerator;
+import org.jboss.soa.esb.qa.teargas.message.generator.QSMessageGenerator;
+import org.jboss.soa.esb.qa.teargas.message.sender.HTTPSender;
+import org.jboss.soa.esb.qa.teargas.message.sender.MessageSender;
+
+/**
+ *
+ * @author mvecera
+ */
+public class QSRunner {
+ private Vector<String> params = new Vector<String>();
+ private Hashtable<String, String> options = new Hashtable<String, String>();
+ private Hashtable<String, String> properties = new Hashtable<String, String>();
+
+ private int count;
+ private StringBuilder sbMessage = new StringBuilder();
+ private String address;
+ private MessageSender sender = null;
+
+ public void parseArguments(String[] args) {
+ int paramIndex = 0;
+ for (int i = 0; i < args.length; i++) {
+ if (args[i].startsWith("-")) {
+ if (args[i].startsWith("-D")) {
+ int loc = args[i].indexOf("=");
+ String key = (loc > 0) ? args[i].substring(2, loc) : args[i].substring(2);
+ String value = (loc > 0) ? args[i].substring(loc + 1) : "";
+ properties.put(key.toLowerCase(), value);
+ } else {
+ int loc = args[i].indexOf("=");
+ String key = (loc > 0) ? args[i].substring(1, loc) : args[i].substring(1);
+ String value = (loc > 0) ? args[i].substring(loc + 1) : "";
+ options.put(key.toLowerCase(), value);
+ }
+ } else {
+ params.addElement(args[i]);
+ }
+ }
+ }
+
+ private boolean hasOption(String opt) {
+ return options.containsKey(opt.toLowerCase());
+ }
+
+ private String getOption(String opt) {
+ return options.get(opt.toLowerCase());
+ }
+
+ public void runTest() throws Exception {
+ AbstractMessageGenerator generator = new QSMessageGenerator();
+ if (sender == null) {
+ sender = new HTTPSender();
+ }
+
+ for (Entry<String, String> e: properties.entrySet()) {
+ sender.setProperty(e.getKey(), e.getValue());
+ generator.setProperty(e.getKey(), e.getValue());
+ }
+
+ generator.init(address, sender);
+ generator.generate(sbMessage.toString(), count);
+ generator.close();
+ }
+
+ private void loadMessage(String fileName) throws IOException {
+ FileReader fr = new FileReader(fileName);
+ BufferedReader br = new BufferedReader(fr);
+
+ String line = "";
+ while ((line = br.readLine()) != null) {
+ sbMessage.append(line);
+ }
+
+ br.close();
+ fr.close();
+ }
+
+ public boolean validArguments() {
+ if (hasOption("message") && hasOption("address") && hasOption("count")) {
+ try {
+ count = Integer.parseInt(getOption("count"));
+ } catch (NumberFormatException e) {
+ System.err.println("Option count is not a valid number.");
+ return false;
+ }
+
+ try {
+ loadMessage(getOption("message"));
+ } catch (IOException e) {
+ System.err.println("Unable to read meesage file.");
+ return false;
+ }
+
+ address = getOption("address");
+ if (address == null || "".equals(address)) {
+ System.err.println("Invalid address.");
+ return false;
+ }
+ }
+
+ if (hasOption("sender")) {
+ String senderClass = "org.jboss.soa.esb.qa.teargas.message.sender." + getOption("sender");
+
+ try {
+ sender = (MessageSender) Class.forName(senderClass, false, this.getClass().getClassLoader()).newInstance();
+ } catch (ClassNotFoundException e) {
+ System.err.println("Unable to instantiate sender class - class not found: " + senderClass);
+ return false;
+ } catch (InstantiationException e) {
+ System.err.println("Unable to instantiate sender class.");
+ return false;
+ } catch (IllegalAccessException e) {
+ System.err.println("Unable to instantiate sender class.");
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ public static void main(String[] args) throws Exception {
+ System.out.println("Teargas testing framework - QS Performance measurement");
+
+ QSRunner qs = new QSRunner();
+ qs.parseArguments(args);
+ if (!qs.validArguments()) {
+ System.out.println("Usage: QSRunTest -address=<WS URL> -message=<message file> -count=<number of messages>");
+ System.out.println("Additional properties for message sender can be specified using -D<property_name>=<value>");
+ } else {
+ qs.runTest();
+ }
+ }
+
+}
Deleted: trunk/stress-tests/src/test/resources/performance/bpel/SimpleInvoke.cbp
===================================================================
(Binary files differ)
Modified: trunk/stress-tests/src/test/resources/performance/bpel/SimpleInvoke.wsdl
===================================================================
--- trunk/stress-tests/src/test/resources/performance/bpel/SimpleInvoke.wsdl 2010-06-01 11:32:25 UTC (rev 689)
+++ trunk/stress-tests/src/test/resources/performance/bpel/SimpleInvoke.wsdl 2010-06-01 20:24:20 UTC (rev 690)
@@ -54,7 +54,7 @@
</wsdl:binding>
<wsdl:service name="SimpleInvoke_Service">
<wsdl:port name="SimpleInvoke_Port" binding="tns:SimpleInvoke_SoapBinding">
- <soap:address location="http://localhost:8080/bpel/processes/simpleInvoke"/>
+ <soap:address location="http://localhost:8080/SimpleInvoke"/>
</wsdl:port>
</wsdl:service>
Modified: trunk/stress-tests/src/test/resources/performance/bpel/bpel-deploy.xml
===================================================================
--- trunk/stress-tests/src/test/resources/performance/bpel/bpel-deploy.xml 2010-06-01 11:32:25 UTC (rev 689)
+++ trunk/stress-tests/src/test/resources/performance/bpel/bpel-deploy.xml 2010-06-01 20:24:20 UTC (rev 690)
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<!--
* JBoss, Home of Professional Open Source
* Copyright 2009, Red Hat Middleware LLC, and others contributors as indicated
Modified: trunk/stress-tests/src/test/resources/performance/build.xml
===================================================================
--- trunk/stress-tests/src/test/resources/performance/build.xml 2010-06-01 11:32:25 UTC (rev 689)
+++ trunk/stress-tests/src/test/resources/performance/build.xml 2010-06-01 20:24:20 UTC (rev 690)
@@ -1,4 +1,4 @@
-<project name="Quickstart_bpel_simple_invoke" default="deploy" basedir=".">
+<project name="Quickstart_bpel_simple_invoke" default="nothing" basedir=".">
<description>
${ant.project.name}
@@ -14,8 +14,9 @@
<property name="conf.dir" value="${server.dir}/conf"/>
<property name="deploy.dir" value="${server.dir}/deploy"/>
<property name="server.lib.dir" value="${server.dir}/lib"/>
- <property name="sample.jar.name" value="${ant.project.name}-${version}.jar" />
- <property name="test.dir" value="src/test/resources/performance"/>
+ <property name="bpel.jar.name" value="${ant.project.name}-${version}.jar" />
+ <property name="ws.war.name" value="${ant.project.name}.war" />
+ <property name="resources.dir" value="src/test/resources/performance"/>
<property name="war.build.dir" value="bin"/>
@@ -24,59 +25,67 @@
</path>
<property name="compile-classpath" refid="compile-classpath"/>
+ <target name="nothing" description="Nothing to do!"/>
+
<target name="makewar" description="make war">
<!-- Compile... -->
<mkdir dir="${war.build.dir}" />
- <javac srcdir="${test.dir}/war/src" destdir="${war.build.dir}" debug="true">
+ <javac srcdir="${resources.dir}/war/src" destdir="${war.build.dir}" debug="true">
<classpath>
<pathelement location="${war.build.dir}"/>
<pathelement path="${java.class.path}"/>
</classpath>
<classpath>
<path refid="compile-classpath" />
- <fileset dir="${test.dir}/war/resources/WEB-INF/lib" includes="*.jar" />
+ <fileset dir="${resources.dir}/war/resources/WEB-INF/lib" includes="*.jar" />
</classpath>
</javac>
<!-- War... -->
- <war warfile="${war.build.dir}/${ant.project.name}.war"
- webxml="${test.dir}/war/resources/WEB-INF/web.xml">
- <webinf dir="${test.dir}/war/resources/WEB-INF">
+ <war warfile="${war.build.dir}/${ws.war.name}"
+ webxml="${resources.dir}/war/resources/WEB-INF/web.xml">
+ <webinf dir="${resources.dir}/war/resources/WEB-INF">
<include name="jboss-web.xml"/>
</webinf>
<classes dir="${war.build.dir}" includes="**/*.class"/>
- <fileset dir="${test.dir}/war/view">
+ <fileset dir="${resources.dir}/war/view">
<include name="**/*"/>
</fileset>
- <classes dir="${test.dir}">
+ <classes dir="${resources.dir}">
<include name="juddi.properties"/>
</classes>
</war>
</target>
<target name="deploywar" depends="makewar" >
+ <echo>Deploy ${ws.war.name}</echo>
<copy todir="${deploy.dir}"
- file="${war.build.dir}/${ant.project.name}.war"/>
+ file="${war.build.dir}/${ws.war.name}"/>
</target>
<target name="undeploywar">
- <delete file="${deploy.dir}/${ant.project.name}.war"/>
+ <echo>Undeploy ${ws.war.name}</echo>
+ <delete file="${deploy.dir}/${ws.war.name}"/>
</target>
<target name="deploy" depends="deploywar" >
- <echo>Deploy ${ant.project.name}</echo>
- <jar basedir="${test.dir}/bpel" destfile="${deploy.dir}/${sample.jar.name}" />
+ <echo>Deploy ${bpel.jar.name}</echo>
+ <!-- <jar basedir="${resources.dir}/bpel" destfile="${deploy.dir}/${bpel.jar.name}" /> -->
+ <mkdir dir="${deploy.dir}/${bpel.jar.name}" />
+ <copy todir="${deploy.dir}/${bpel.jar.name}">
+ <fileset dir="${resources.dir}/bpel"/>
+ </copy>
</target>
<target name="undeploy" depends="undeploywar" >
- <echo>Undeploy ${ant.project.name}</echo>
- <delete file="${deploy.dir}/${sample.jar.name}" />
+ <echo>Undeploy ${bpel.jar.name}</echo>
+ <delete dir="${deploy.dir}/${bpel.jar.name}" />
</target>
<!-- this is executed from the PerformanceTestCase JUNIT test class
<target name="perf-ws" description="Performance test">
<path id="exec-classpath">
- <pathelement location="${deploy.dir}/${ant.project.name}.war" />
+ <pathelement location="${deploy.dir}/${ws.war.name}" />
</path>
<java fork="yes" classname="org.jboss.soa.esb.qa.teargas.qs.QSRunTest" failonerror="true">
<arg value="-message=messages/hello_request2.xml" />
@@ -91,7 +100,7 @@
<target name="perf-bpel" description="Performance test">
<path id="exec-classpath">
- <pathelement location="${deploy.dir}/${ant.project.name}.war" />
+ <pathelement location="${deploy.dir}/${ws.war.name}" />
</path>
<java fork="yes" classname="org.jboss.soa.esb.qa.teargas.qs.QSRunTest" failonerror="true">
<arg value="-message=messages/hello_request1.xml" />
14 years, 6 months
riftsaw SVN: r689 - trunk/docs/docbook/userguide/src/main/module.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2010-06-01 07:32:25 -0400 (Tue, 01 Jun 2010)
New Revision: 689
Modified:
trunk/docs/docbook/userguide/src/main/module/wsconfig.xml
Log:
Added further text on the implementor attribute.
Modified: trunk/docs/docbook/userguide/src/main/module/wsconfig.xml
===================================================================
--- trunk/docs/docbook/userguide/src/main/module/wsconfig.xml 2010-06-01 11:25:01 UTC (rev 688)
+++ trunk/docs/docbook/userguide/src/main/module/wsconfig.xml 2010-06-01 11:32:25 UTC (rev 689)
@@ -195,7 +195,16 @@
<para>
This example configures the web service to use username token and digital signature
authentication.
- </para>
+ </para>
+
+ <note>
+ <para>
+ The <emphasis>jaxws:endpoint</emphasis> element has an attribute called <emphasis>implementor</emphasis>
+ that defines the Java class implementing the JAXWS service. RiftSaw dynamically creates this
+ class, and therefore it is important that the attribute is set to the value <emphasis>@provider@</emphasis>
+ to enable the dynamically created Java class to be correctly configured during deployment.
+ </para>
+ </note>
</section>
<section>
14 years, 6 months
riftsaw SVN: r688 - trunk/docs/docbook/userguide/src/main/module.
by riftsaw-commits@lists.jboss.org
Author: objectiser
Date: 2010-06-01 07:25:01 -0400 (Tue, 01 Jun 2010)
New Revision: 688
Modified:
trunk/docs/docbook/userguide/src/main/module/wsconfig.xml
Log:
RIFTSAW-75 - added some documentation for how to provide cxf configuration details in the BPEL deployment.
Modified: trunk/docs/docbook/userguide/src/main/module/wsconfig.xml
===================================================================
--- trunk/docs/docbook/userguide/src/main/module/wsconfig.xml 2010-05-31 12:23:39 UTC (rev 687)
+++ trunk/docs/docbook/userguide/src/main/module/wsconfig.xml 2010-06-01 11:25:01 UTC (rev 688)
@@ -90,4 +90,226 @@
</section>
+ <section>
+ <title>Apache CXF Configuration</title>
+
+ <para>
+ RiftSaw integrates with JBossWS, using the JAX-WS standard API, to support the
+ following web service stacks: JBossWS native, Metro and Apache CXF. This section
+ explains how RiftSaw deployed BPEL processes can include additional configuration
+ specifically applicable to the Apache CXF web service stack - and is therefore
+ only relevant if the JBossAS application server has been configured to use this
+ stack. See the <emphasis>Getting Started Guide</emphasis> for information on how to
+ switch to the Apache CXF stack when installing RiftSaw.
+ </para>
+
+ <para>
+ This section will explain how web service endpoints, whether server (i.e. representing
+ the BPEL process) or client (i.e. being used to invoke external web services), are
+ configured using the Apache CXF configuration format. It will also discuss reasons
+ why you may wish to do this additional CXF specific configuration. However, for further
+ information on how to configure CXF, and the features that it offers, the reader is
+ referred to the Apache CXF website <ulink url="http://cxf.apache.org/">http://cxf.apache.org</ulink>.
+ </para>
+
+ <section>
+ <title>Configuring the Server endpoint</title>
+
+ <para>
+ To create a CXF configuration that will be used by the RiftSaw web service provider
+ (i.e. the server), it is simply a case of placing a file called
+ <filename>jbossws-cxf.xml</filename> into the root folder of the BPEL deployment
+ (along side the deployment descriptor).
+ </para>
+
+ <para>
+ This is the same filename as used by jbossws-cxf, when deploying a web service based
+ on the use of JAXWS annotations. An example of the file content is:
+ </para>
+
+ <informalexample>
+ <programlisting role="XML" ><![CDATA[
+<beans
+ xmlns='http://www.springframework.org/schema/beans'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xmlns:beans='http://www.springframework.org/schema/beans'
+ xmlns:jaxws='http://cxf.apache.org/jaxws'
+ xsi:schemaLocation='http://cxf.apache.org/core
+ http://cxf.apache.org/schemas/core.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+ http://cxf.apache.org/jaxws
+ http://cxf.apache.org/schemas/jaxws.xsd'>
+
+ <bean id="UsernameTokenSign_Request"
+ class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="UsernameToken Timestamp Signature"/>
+ <entry key="passwordType" value="PasswordDigest"/>
+ <entry key="user" value="serverx509v1"/>
+ <entry key="passwordCallbackClass"
+ value="org.jboss.test.ws.jaxws.samples.wsse.ServerUsernamePasswordCallback"/>
+ <entry key="signaturePropFile" value="etc/Server_SignVerf.properties"/>
+ <entry key="signatureKeyIdentifier" value="DirectReference"/>
+ </map>
+ </constructor-arg>
+ </bean>
+
+ <bean id="UsernameTokenSign_Response"
+ class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="UsernameToken Timestamp Signature"/>
+ <entry key="passwordType" value="PasswordText"/>
+ <entry key="user" value="serverx509v1"/>
+ <entry key="passwordCallbackClass"
+ value="org.jboss.test.ws.jaxws.samples.wsse.ServerUsernamePasswordCallback"/>
+ <entry key="signaturePropFile" value="etc/Server_Decrypt.properties"/>
+ <entry key="signatureKeyIdentifier" value="DirectReference"/>
+ <entry key="signatureParts"
+ value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body"/>
+ </map>
+ </constructor-arg>
+ </bean>
+
+ <jaxws:endpoint
+ id='SecureHelloWorldWS'
+ address='http://@jboss.bind.address@:8080/Quickstart_bpel_secure_serviceWS'
+ implementor='@provider@'>
+ <jaxws:inInterceptors>
+ <ref bean="UsernameTokenSign_Request"/>
+ <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
+ </jaxws:inInterceptors>
+ <jaxws:outInterceptors>
+ <ref bean="UsernameTokenSign_Response"/>
+ <bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/>
+ </jaxws:outInterceptors>
+ </jaxws:endpoint>
+
+
+</beans>
+ ]]></programlisting>
+ </informalexample>
+
+ <para>
+ This example configures the web service to use username token and digital signature
+ authentication.
+ </para>
+ </section>
+
+ <section>
+ <title>Configuring the Client endpoint</title>
+
+ <para>
+ When configuring client endpoints, representing web services invoked by a BPEL
+ process, the configuration is currently separated into different files on a per
+ port basis - similar to the approach used by the Axis2 ODE integration.
+ </para>
+
+ <para>
+ The file name is of the form <filename>jbossws-cxf-{portname_local_part}.xml</filename>,
+ where the <emphasis>portname_local_part</emphasis> represents the local part of
+ the portname of the web service being invoked. For example, if the WSDL for the invoked
+ web service is:
+ </para>
+
+ <informalexample>
+ <programlisting role="XML" ><![CDATA[
+<definitions name='SecureHelloWorldWSService'
+ targetNamespace='http://secure_invoke/helloworld' .... >
+ <portType name='SecureHelloWorld'>
+ ...
+ </portType>
+ <service name='SecureHelloWorldWSService'>
+ <port name='SecureHelloWorldPort' ... >
+ ...
+ </port>
+ </service>
+</definitions>
+ ]]></programlisting>
+ </informalexample>
+
+ <para>
+ then the CXF configuration file would be <filename>jbossws-cxf-SecureHelloWorldPort.xml</filename>.
+ </para>
+
+ <para>
+ The CXF configuration information within this file is associated with the CXF bus. For
+ example:
+ </para>
+
+ <informalexample>
+ <programlisting role="XML" ><![CDATA[
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:cxf="http://cxf.apache.org/core"
+ xmlns:wsa="http://cxf.apache.org/ws/addressing"
+ xmlns:http="http://cxf.apache.org/transports/http/configuration"
+ xmlns:wsrm-policy="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
+ xmlns:wsrm-mgr="http://cxf.apache.org/ws/rm/manager"
+ xmlns:beans='http://www.springframework.org/schema/beans'
+ xmlns:jaxws='http://cxf.apache.org/jaxws'
+ xmlns:ns1='http://secure_invoke/helloworld'
+ xsi:schemaLocation="
+ http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+ http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
+ http://schemas.xmlsoap.org/ws/2005/02/rm/policy http://schemas.xmlsoap.org/ws/2005/02/rm/wsrm-policy.xsd
+ http://cxf.apache.org/ws/rm/manager http://cxf.apache.org/schemas/configuration/wsrm-manager.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
+
+ <bean id="UsernameTokenSign_Request"
+ class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor" >
+ <constructor-arg>
+ <map>
+ <entry key="action" value="UsernameToken Timestamp Signature"/>
+ <entry key="passwordType" value="PasswordDigest"/>
+ <entry key="user" value="clientx509v1"/>
+ <entry key="passwordCallbackClass"
+ value="org.jboss.test.ws.jaxws.samples.wsse.ClientUsernamePasswordCallback"/>
+ <entry key="signaturePropFile" value="etc/Client_Sign.properties"/>
+ <entry key="signatureKeyIdentifier" value="DirectReference"/>
+ <entry key="signatureParts"
+ value="{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp;{Element}{http://schemas.xmlsoap.org/soap/envelope/}Body"/>
+ </map>
+ </constructor-arg>
+ </bean>
+
+ <bean id="UsernameTokenSign_Response"
+ class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor" >
+ <constructor-arg>
+ <map>
+ <entry key="action" value="UsernameToken Timestamp Signature"/>
+ <entry key="passwordType" value="PasswordText"/>
+ <entry key="user" value="serverx509v1"/>
+ <entry key="passwordCallbackClass"
+ value="org.jboss.test.ws.jaxws.samples.wsse.ClientUsernamePasswordCallback"/>
+ <entry key="signaturePropFile" value="etc/Client_Encrypt.properties"/>
+ <entry key="signatureKeyIdentifier" value="DirectReference"/>
+ </map>
+ </constructor-arg>
+ </bean>
+
+ <cxf:bus>
+ <cxf:outInterceptors>
+ <ref bean="UsernameTokenSign_Request"/>
+ <bean class="org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor"/>
+ </cxf:outInterceptors>
+ <cxf:inInterceptors>
+ <ref bean="UsernameTokenSign_Response"/>
+ <bean class="org.apache.cxf.binding.soap.saaj.SAAJInInterceptor"/>
+ </cxf:inInterceptors>
+ </cxf:bus>
+
+</beans>
+ ]]></programlisting>
+ </informalexample>
+
+ <para>
+ This example configures the web service client to use username token and digital signature
+ authentication.
+ </para>
+ </section>
+ </section>
</chapter>
14 years, 6 months