You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ni...@apache.org on 2006/09/19 08:48:36 UTC
svn commit: r447765 - in /incubator/cxf/trunk/test: ./ performance/
performance/base/ performance/base/src/ performance/base/src/org/
performance/base/src/org/apache/ performance/base/src/org/apache/cxf/
performance/base/src/org/apache/cxf/pat/ perform...
Author: ningjiang
Date: Mon Sep 18 23:48:34 2006
New Revision: 447765
URL: http://svn.apache.org/viewvc?view=rev&rev=447765
Log:
[JIRA CXF-95] Port Celtix performance test to CXF
Please read the README.txt in the /test/performance for detail information
Added:
incubator/cxf/trunk/test/
incubator/cxf/trunk/test/performance/
incubator/cxf/trunk/test/performance/README.txt (with props)
incubator/cxf/trunk/test/performance/base/
incubator/cxf/trunk/test/performance/base/build.xml (with props)
incubator/cxf/trunk/test/performance/base/src/
incubator/cxf/trunk/test/performance/base/src/org/
incubator/cxf/trunk/test/performance/base/src/org/apache/
incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/
incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/
incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/
incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java (with props)
incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestResult.java (with props)
incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestRunner.java (with props)
incubator/cxf/trunk/test/performance/base/wsdl/
incubator/cxf/trunk/test/performance/basic_type/
incubator/cxf/trunk/test/performance/basic_type/bin/
incubator/cxf/trunk/test/performance/basic_type/bin/run_client (with props)
incubator/cxf/trunk/test/performance/basic_type/bin/run_client.bat (with props)
incubator/cxf/trunk/test/performance/basic_type/bin/run_server (with props)
incubator/cxf/trunk/test/performance/basic_type/bin/run_server.bat (with props)
incubator/cxf/trunk/test/performance/basic_type/build.xml (with props)
incubator/cxf/trunk/test/performance/basic_type/src/
incubator/cxf/trunk/test/performance/basic_type/src/org/
incubator/cxf/trunk/test/performance/basic_type/src/org/apache/
incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/
incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/
incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/
incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/client/
incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/client/Client.java (with props)
incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/
incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/Server.java (with props)
incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/ServerImpl.java (with props)
incubator/cxf/trunk/test/performance/basic_type/wsdl/
incubator/cxf/trunk/test/performance/basic_type/wsdl/basic_type.wsdl (with props)
incubator/cxf/trunk/test/performance/complex_type/
incubator/cxf/trunk/test/performance/complex_type/bin/
incubator/cxf/trunk/test/performance/complex_type/bin/run_client (with props)
incubator/cxf/trunk/test/performance/complex_type/bin/run_client.bat (with props)
incubator/cxf/trunk/test/performance/complex_type/bin/run_server (with props)
incubator/cxf/trunk/test/performance/complex_type/bin/run_server.bat (with props)
incubator/cxf/trunk/test/performance/complex_type/build.xml (with props)
incubator/cxf/trunk/test/performance/complex_type/src/
incubator/cxf/trunk/test/performance/complex_type/src/org/
incubator/cxf/trunk/test/performance/complex_type/src/org/apache/
incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/
incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/
incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/
incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/client/
incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/client/Client.java (with props)
incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/server/
incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/server/Server.java (with props)
incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/server/ServerImpl.java (with props)
incubator/cxf/trunk/test/performance/complex_type/wsdl/
incubator/cxf/trunk/test/performance/complex_type/wsdl/complex_type.wsdl (with props)
incubator/cxf/trunk/test/performance/etc/
incubator/cxf/trunk/test/performance/etc/common_build.xml (with props)
Added: incubator/cxf/trunk/test/performance/README.txt
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/README.txt?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/README.txt (added)
+++ incubator/cxf/trunk/test/performance/README.txt Mon Sep 18 23:48:34 2006
@@ -0,0 +1,47 @@
+Basic Setup for Building and Running the performance test case
+==============================================
+
+As described in the installation notes, extract the cxf
+binary distribution archive into an installation directory
+under the root drive. This creates the sub-directory celtixfire,
+which includes all of the product directories.
+
+1. setup the build Enviroment
+
+To build and run the performance test case , you must install
+the J2SE Development Kit (JDK) 5.0
+
+If you want to use ant to build and run the performance test case,
+you must install the Apache ant 1.6 build utility.
+
+The CXF_HOME system variable need to be set to the cxf binary install
+directory.
+
+
+ 2. Build the performance test case
+There are two types of test case in the performance test case
+directory. The one is basic_type testcase ,the othere is complex_type
+testcase. The base directory provide a simple testcase base class for
+the client to calculate the server reponse time and throughput. There
+for you should build the base directory first, and then build the
+ othere directory files.
+
+ cd base
+ ant
+ cd ../basic_type
+ ant
+ cd ../complex_type
+ ant
+
+ 3. to run the performance test
+You can cd to basic_type/bin or complex_type/bin to run the test
+run_server and run_server.bat just startup the server
+run_client and run_client.bat can take these argument:
+ -Operation to invoke the wsdl defined operation
+ -BasedOn Time setup the invoking count with time
+ -Amount define the invoke times , if based on time it means second
+ -PacketSize define the packet size which client send to server
+ -Threads define the thread number to run the perform test
+
+
+
Propchange: incubator/cxf/trunk/test/performance/README.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/README.txt
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/cxf/trunk/test/performance/base/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/base/build.xml?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/base/build.xml (added)
+++ incubator/cxf/trunk/test/performance/base/build.xml Mon Sep 18 23:48:34 2006
@@ -0,0 +1,24 @@
+<project name="cxf-performance-testcase-base" default="base.compile" basedir=".">
+ <import file="../etc/common_build.xml"/>
+ <property name="jar.name" value="performance_base.jar"/>
+ <target name="init">
+ <mkdir dir="${basedir}/build/classes"/>
+ </target>
+ <target name="base.compile" depends="init">
+ <javac srcdir="${basedir}/src" destdir="${basedir}/build/classes"
+ debug="true">
+ <classpath refid="cxf.classpath"/>
+ </javac>
+ </target>
+ <target name="base.deploy" depends="compile">
+ <jar destfile="${jar.name}" >
+ <fileset dir="${build.classes.dir}">
+ <include name="**/*.class" />
+ </fileset>
+ </jar>
+ </target>
+ <target name="clean">
+ <delete dir="${basedir}/build"/>
+ </target>
+</project>
+
Propchange: incubator/cxf/trunk/test/performance/base/build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/base/build.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/cxf/trunk/test/performance/base/build.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java (added)
+++ incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java Mon Sep 18 23:48:34 2006
@@ -0,0 +1,305 @@
+package org.apache.cxf.pat.internal;
+
+import java.util.*;
+
+
+
+public abstract class TestCaseBase {
+ private static boolean initialized;
+
+ protected String wsdlPath;
+
+ protected String serviceName;
+
+ protected String portName;
+
+ protected String operationName;
+
+ protected String hostname;
+
+ protected String hostport;
+
+ protected int packetSize = 1;
+
+ protected boolean usingTime;
+
+ protected int amount = 1;
+
+ protected String wsdlNameSpace;
+
+ protected List<TestResult> results = new ArrayList<TestResult>();
+
+ protected boolean usePipe;
+
+ private int numberOfThreads;
+
+ private String name;
+
+ private String[] args;
+
+ private String faultReason = "no error";
+
+
+
+ public TestCaseBase() {
+ this("DEFAULT TESTCASE", null);
+ }
+
+ public TestCaseBase(String cname) {
+ this(cname, null);
+ }
+
+ public TestCaseBase(String cname, String[] arg) {
+ this.name = cname;
+ this.args = arg;
+ }
+
+ public abstract void initTestData();
+
+ public void init() throws Exception {
+ initBus();
+ initTestData();
+ }
+
+ private void processArgs() {
+ int count = 0;
+ int argc = args.length;
+ while (count < argc) {
+ if ("-WSDL".equals(args[count])) {
+ wsdlPath = args[count + 1];
+ count += 2;
+ } else if ("-Service".equals(args[count])) {
+ serviceName = args[count + 1];
+ count += 2;
+ } else if ("-Pipe".equals(args[count])) {
+ usePipe = true;
+ count++;
+ } else if ("-Port".equals(args[count])) {
+ portName = args[count + 1];
+ count += 2;
+ } else if ("-Operation".equals(args[count])) {
+ operationName = args[count + 1];
+ count += 2;
+ } else if ("-BasedOn".equals(args[count])) {
+ if ("Time".equals(args[count + 1])) {
+ usingTime = true;
+ }
+ count += 2;
+ } else if ("-Amount".equals(args[count])) {
+ amount = Integer.parseInt(args[count + 1]);
+ count += 2;
+ } else if ("-Threads".equals(args[count])) {
+ numberOfThreads = Integer.parseInt(args[count + 1]);
+ count += 2;
+ } else if ("-HostName".equals(args[count])) {
+ hostname = args[count + 1];
+ count += 2;
+ } else if ("-HostPort".equals(args[count])) {
+ hostport = args[count + 1];
+ count += 2;
+ } else if ("-PacketSize".equals(args[count])) {
+ packetSize = Integer.parseInt(args[count + 1]);
+ count += 2;
+ } else {
+ count++;
+ }
+ }
+ }
+
+ private boolean validate() {
+ if (wsdlNameSpace == null || wsdlNameSpace.trim().equals("")) {
+ System.out.println("WSDL name space is not specified");
+ faultReason = "Missing WSDL name space";
+ return false;
+ }
+ if (serviceName == null || serviceName.trim().equals("")) {
+ System.out.println("Service name is not specified");
+ faultReason = "Missing Service name";
+ return false;
+ }
+ if (portName == null || portName.trim().equals("")) {
+ System.out.println("Port name is not specified");
+ faultReason = "Missing Port name";
+ return false;
+ }
+ if (wsdlPath == null || wsdlPath.trim().equals("")) {
+ System.out.println("WSDL path is not specifed");
+ faultReason = "Missing WSDL path";
+ return false;
+ }
+ return true;
+ }
+
+ // for the cxf init , here do nothing
+ private void initBus() {
+ }
+
+ public void tearDown() {
+ }
+
+ protected void setUp() throws Exception {
+
+ clearTestResults();
+ printTitle();
+ printSetting("Default Setting: ");
+ processArgs();
+ if (!validate()) {
+ System.out.println("Configure Exception!" + faultReason);
+ System.exit(1);
+ }
+ init();
+ printSetting("Runtime Setting: ");
+ }
+
+ public void initialize() {
+ try {
+ if (!initialized) {
+ setUp();
+ }
+ initialized = true;
+
+
+ System.out.println("TestCase " + name + " is warming up the jit. (5 sec/200 iterations)");
+ long endTime = System.currentTimeMillis() + 5000;
+ getPort();
+ int count = 0;
+ while (System.currentTimeMillis() < endTime || count < 200) {
+ count++;
+ doJob();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public abstract void doJob();
+
+ public abstract void getPort();
+
+ protected void internalTestRun(String caseName) throws Exception {
+ int numberOfInvocations = 0;
+ long startTime = System.currentTimeMillis();
+ long endTime = startTime + amount * 1000;
+ if (usingTime) {
+ while (System.currentTimeMillis() < endTime) {
+ doJob();
+ numberOfInvocations++;
+ }
+ } else {
+ for (int i = 0; i < amount; i++) {
+ doJob();
+ numberOfInvocations++;
+ }
+ }
+ endTime = System.currentTimeMillis();
+ TestResult testResult = new TestResult(caseName, this);
+ testResult.compute(startTime, endTime, numberOfInvocations);
+ addTestResult(testResult);
+ }
+
+ public void testRun() throws Exception {
+ if (numberOfThreads == 0) {
+ internalTestRun(name);
+ }
+ List<Thread> threadList = new ArrayList<Thread>();
+ for (int i = 0; i < numberOfThreads; i++) {
+ TestRunner runner = new TestRunner("No." + i + " TestRunner", this);
+ Thread thread = new Thread(runner, "RunnerThread No." + i);
+ thread.start();
+ threadList.add(thread);
+ }
+
+ for (Iterator iter = threadList.iterator(); iter.hasNext();) {
+ Thread thread = (Thread) iter.next();
+ try {
+ thread.join();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ public void run() {
+ try {
+ System.out.println("TestCase " + name + " is running");
+ testRun();
+ tearDown();
+ System.out.println("TestCase " + name + " is finished");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected void clearTestResults() {
+ results.clear();
+ }
+
+ protected void addTestResult(TestResult result) {
+ results.add(result);
+ }
+
+ public List getTestResults() {
+ return results;
+ }
+
+ public abstract void printUsage();
+
+ public void printSetting(String settingType) {
+ System.out.println(settingType + " [Service] -- > " + serviceName);
+ System.out.println(settingType + " [Port] -- > " + portName);
+ System.out.println(settingType + " [Operation] -- > " + operationName);
+ System.out.println(settingType + " [Threads] -- > " + numberOfThreads);
+ System.out.println(settingType + " [Packet Size] -- > " + packetSize
+ + " packet(s) ");
+ if (usingTime) {
+ System.out.println(settingType + " [Running] --> " + amount + " (secs)");
+ } else {
+ System.out.println(settingType + " [Running] --> " + amount
+ + " (invocations)");
+ }
+ }
+
+ public void printTitle() {
+ System.out.println(" ---------------------------------");
+ System.out.println(name + " Client (JAVA Version)");
+ System.out.println(" ---------------------------------");
+ }
+
+ public void setWSDLNameSpace(String nameSpace) {
+ this.wsdlNameSpace = nameSpace;
+ }
+
+ public void setWSDLPath(String wpath) {
+ this.wsdlPath = wsdlPath;
+ }
+
+ public void setServiceName(String sname) {
+ this.serviceName = sname;
+ }
+
+ public void setPortName(String pname) {
+ this.portName = pname;
+ }
+
+ public void setOperationName(String oname) {
+ this.operationName = oname;
+ }
+
+ public String getServiceName() {
+ return this.serviceName;
+ }
+
+ public String getPortName() {
+ return this.portName;
+ }
+
+ public String getOperationName() {
+ return this.operationName;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+
+}
Propchange: incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestResult.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestResult.java?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestResult.java (added)
+++ incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestResult.java Mon Sep 18 23:48:34 2006
@@ -0,0 +1,55 @@
+package org.apache.cxf.pat.internal;
+
+
+public class TestResult {
+ public static final String AVG_UNIT = "(ms)";
+ private static final String THROUGHPUT_UNIT = "(invocations/sec)";
+
+ private String name;
+ private TestCaseBase testCase;
+
+ private double avgResponseTime;
+ private double throughput;
+
+ public TestResult() {
+ this("Default Result");
+ }
+
+ public TestResult(String cname) {
+ this(cname, null);
+ }
+
+ public TestResult(String cname, TestCaseBase test) {
+ this.name = cname;
+ this.testCase = test;
+ }
+
+ public void compute(long startTime, long endTime, int numberOfInvocations) {
+ double numOfInvocations = (double)numberOfInvocations;
+ double duration = convertToSeconds(endTime - startTime);
+
+ throughput = numOfInvocations / duration;
+ avgResponseTime = duration / numOfInvocations;
+
+ System.out.println("Throughput: " + testCase.getOperationName() + " " + throughput + THROUGHPUT_UNIT);
+ System.out.println("AVG. response time: " + avgResponseTime * 1000 + AVG_UNIT);
+ System.out.println(numOfInvocations + " (invocations), running " + duration + " (sec) ");
+
+ }
+
+ private double convertToSeconds(double ms) {
+ return ms / 1000;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public double getAvgResponseTime() {
+ return avgResponseTime;
+ }
+
+ public double getThroughput() {
+ return throughput;
+ }
+}
Propchange: incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestResult.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestResult.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestRunner.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestRunner.java?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestRunner.java (added)
+++ incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestRunner.java Mon Sep 18 23:48:34 2006
@@ -0,0 +1,41 @@
+package org.apache.cxf.pat.internal;
+
+
+public class TestRunner implements Runnable {
+
+ protected TestCaseBase testCase;
+ private String name;
+
+
+ public TestRunner() {
+ this("Default runner");
+ }
+
+ public TestRunner(String cname) {
+ this(cname, null);
+ }
+
+ public TestRunner(String cname, TestCaseBase test) {
+ this.name = cname;
+ this.testCase = test;
+ }
+
+ public void run() {
+ System.out.println("TestRunner " + name + " is running");
+ try {
+ testCase.internalTestRun(name);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ System.out.println("TestRunner " + name + " is finished");
+ }
+
+ public void start() {
+ Thread thread = new Thread(this);
+ thread.start();
+ }
+
+ public String getName() {
+ return name;
+ }
+}
Propchange: incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestRunner.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/base/src/org/apache/cxf/pat/internal/TestRunner.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/cxf/trunk/test/performance/basic_type/bin/run_client
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/basic_type/bin/run_client?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/basic_type/bin/run_client (added)
+++ incubator/cxf/trunk/test/performance/basic_type/bin/run_client Mon Sep 18 23:48:34 2006
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+OPERARTION=echoString
+BASEDON=Time
+AMOUNT=30
+PACKETSIZE=1
+THREADS=0
+PIPE=
+
+cd ..
+
+for i in $@
+do
+ if [ "$i" = "-Operartion" ]
+ then
+ OPERARTION=$2
+ fi
+
+ if [ "$i" = "-BasedOn" ]
+ then
+ BASEDON=$2
+ fi
+
+ if [ "$i" = "-Amount" ]
+ then
+ AMOUNT=$2
+ fi
+
+ if [ "$i" = "-PacketSize" ]
+ then
+ PACKETSIZE=$2
+ fi
+
+ if [ "$i" = "-Threads" ]
+ then
+ THREADS=$2
+ fi
+
+ if [ "$i" = "-Pipe" ]
+ then
+ PIPE=-Dpipe=-Pipe
+ fi
+
+ shift
+
+done
+
+ant client -Dceltix.running.time=$AMOUNT -Dceltix.operation=$OPERARTION -Dceltix.basedon=$BASEDON -Dceltix.packet.size=$PACKETSIZE -Dceltix.threads=$THREADS $PIPE
+
+
+
Propchange: incubator/cxf/trunk/test/performance/basic_type/bin/run_client
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/cxf/trunk/test/performance/basic_type/bin/run_client.bat
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/basic_type/bin/run_client.bat?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/basic_type/bin/run_client.bat (added)
+++ incubator/cxf/trunk/test/performance/basic_type/bin/run_client.bat Mon Sep 18 23:48:34 2006
@@ -0,0 +1,26 @@
+@echo off
+@setlocal
+
+cd ..
+
+set BASEDON=Time
+set AMOUNT=3
+set OPERATION=echoString
+set PACKETSIZE=1
+set THREADS=1
+
+:Loop
+IF "%1"=="" GOTO Continue
+IF "%1"=="-BasedOn" (set BASEDON=%2)
+IF "%1"=="-Amount" (set AMOUNT=%2)
+IF "%1"=="-Operation" (set OPERATION=%2)
+IF "%1"=="-Threads" (set THREADS=%2)
+IF "%1"=="-PacketSize" (set PACKETSIZE=%2)
+SHIFT
+GOTO Loop
+
+:Continue
+
+ant client -Dceltix.running.time=%AMOUNT% -Dceltix.operation=%OPERATION% -Dceltix.basedon=%BASEDON% -Dceltix.packet.size=%PACKETSIZE% -Dceltix.threads=%THREADS%
+
+@endlocal
Propchange: incubator/cxf/trunk/test/performance/basic_type/bin/run_client.bat
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/cxf/trunk/test/performance/basic_type/bin/run_server
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/basic_type/bin/run_server?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/basic_type/bin/run_server (added)
+++ incubator/cxf/trunk/test/performance/basic_type/bin/run_server Mon Sep 18 23:48:34 2006
@@ -0,0 +1,2 @@
+cd ../
+ant server
Propchange: incubator/cxf/trunk/test/performance/basic_type/bin/run_server
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/cxf/trunk/test/performance/basic_type/bin/run_server.bat
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/basic_type/bin/run_server.bat?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/basic_type/bin/run_server.bat (added)
+++ incubator/cxf/trunk/test/performance/basic_type/bin/run_server.bat Mon Sep 18 23:48:34 2006
@@ -0,0 +1,2 @@
+cd ..
+ant server
\ No newline at end of file
Propchange: incubator/cxf/trunk/test/performance/basic_type/bin/run_server.bat
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/cxf/trunk/test/performance/basic_type/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/basic_type/build.xml?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/basic_type/build.xml (added)
+++ incubator/cxf/trunk/test/performance/basic_type/build.xml Mon Sep 18 23:48:34 2006
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<project name="test.basic_type" default="build" basedir=".">
+ <import file="../etc/common_build.xml"/>
+ <property name="wsdl.dir" location="${basedir}/wsdl"/>
+ <property name="wsdl.file" value="basic_type.wsdl"/>
+
+ <target name="client" description="run basic_type client">
+ <property name="param" value=""/>
+ <property name="pipe" value=""/>
+ <cxf.client.run classname="org.apache.cxf.performance.basic_type.client.Client" argline=
+ "-WSDL ${wsdl.dir}/${wsdl.file}
+ -Amount ${celtix.running.time}
+ -BasedOn ${celtix.basedon}
+ -Operation ${celtix.operation}
+ -PacketSize ${celtix.packet.size}
+ -Threads ${celtix.threads} ${pipe}"/>
+ </target>
+
+ <target name="server" description="run basic_type server">
+ <cxf.server.run classname="org.apache.cxf.performance.basic_type.server.Server" argline="-WSDL ${basedir}/wsdl/${wsdl.file}"/>
+ </target>
+
+ <target name="generate.code">
+ <echo level="info" message="Generating code using wsdl2java..."/>
+ <wsdl2java file="basic_type.wsdl"/>
+ </target>
+
+
+</project>
Propchange: incubator/cxf/trunk/test/performance/basic_type/build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/basic_type/build.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/cxf/trunk/test/performance/basic_type/build.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/client/Client.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/client/Client.java?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/client/Client.java (added)
+++ incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/client/Client.java Mon Sep 18 23:48:34 2006
@@ -0,0 +1,123 @@
+package org.apache.cxf.performance.basic_type.client;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+
+import org.apache.cxf.pat.internal.TestCaseBase;
+import org.apache.cxf.pat.internal.TestResult;
+import org.apache.cxf.performance.basic_type.BasicPortType;
+import org.apache.cxf.performance.basic_type.BasicService;
+import org.apache.cxf.performance.basic_type.server.Server;
+
+public final class Client extends TestCaseBase {
+
+ private static final QName SERVICE_NAME
+ = new QName("http://cxf.apache.org/performance/basic_type", "BasicService");
+
+ private static int opid;
+
+ private byte[] inputBase64 = new byte[100 * 1024];
+ private String inputString = new String();
+
+ private final int asciiCount = 1 * 1024;
+
+ private BasicService ss;
+ private BasicPortType port;
+
+ public Client(String[] args) {
+ super("Base TestCase", args);
+ serviceName = "BasicService";
+ portName = "BasicPortType";
+ operationName = "echoString";
+ amount = 30;
+ wsdlNameSpace = "http://cxf.apache.org/performance/basic_type";
+ }
+
+ public void initTestData() {
+ String temp = "abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+?><[]/0123456789";
+ for (int idx = 0; idx < 4 * packetSize; idx++) {
+ for (int jdx = 0; jdx < 256; jdx++) {
+ inputBase64[idx * 256 + jdx] = (byte)(jdx - 128);
+ }
+ }
+ for (int i = 0; i < asciiCount / temp.length() * packetSize; i++) {
+ inputString = inputString + temp;
+ }
+ }
+
+ public void printUsage() {
+ System.out.println("Syntax is: Client [-WSDL wsdllocation] operation [-operation args...]");
+ System.out.println(" operation is one of: ");
+ System.out.println(" echoBase64");
+ System.out.println(" echoString");
+ }
+
+ public static void main(String args[]) throws Exception {
+ Client client = new Client(args);
+ client.initialize();
+ if (client.getOperationName().equals("echoString")) {
+ opid = 0;
+ } else {
+ opid = 1;
+ }
+ client.run();
+ List results = client.getTestResults();
+ TestResult testResult = null;
+ for (Iterator iter = results.iterator(); iter.hasNext();) {
+ testResult = (TestResult)iter.next();
+ System.out.println("Throughput " + testResult.getThroughput());
+ System.out.println("AVG Response Time " + testResult.getAvgResponseTime());
+ }
+ System.out.println("cxf client is going to shutdown!");
+ //System.exit(0);
+ }
+
+ public void doJob() {
+ try {
+ switch(opid) {
+ case 0:
+ port.echoString(inputString);
+ break;
+ case 1:
+ port.echoBase64(inputBase64);
+ break;
+ default:
+ port.echoString(inputString);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void getPort() {
+ if (usePipe) {
+ try {
+ new Server("pipe://localhost:20000/performance/basic_type/SoapPort");
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ }
+ File wsdl = new File(wsdlPath);
+ try {
+ ss = new BasicService(wsdl.toURL(), SERVICE_NAME);
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+ port = ss.getSoapHttpPort();
+
+ if (usePipe) {
+ javax.xml.ws.BindingProvider provider = (javax.xml.ws.BindingProvider)port;
+ provider.getRequestContext().put(provider.ENDPOINT_ADDRESS_PROPERTY,
+ "pipe://localhost:20000/performance/basic_type/SoapPort");
+ }
+
+ }
+}
+
+
+
Propchange: incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/client/Client.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/client/Client.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/Server.java?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/Server.java (added)
+++ incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/Server.java Mon Sep 18 23:48:34 2006
@@ -0,0 +1,34 @@
+package org.apache.cxf.performance.basic_type.server;
+
+import javax.xml.ws.Endpoint;
+
+
+public class Server implements Runnable {
+
+
+ public Server(String address) throws Exception {
+ System.out.println("Starting Server");
+ Object implementor = new ServerImpl();
+ Endpoint.publish(address, implementor);
+ System.out.println("Server published");
+ }
+
+ public Server(String[] args) throws Exception {
+ this("http://localhost:20000/performance/basic_type/SoapPort");
+ }
+
+ public static void main(String args[]) throws Exception {
+ Server server = new Server(args);
+ server.run();
+ }
+
+ public void run() {
+ System.out.println("running server");
+ System.out.println(" READY ");
+
+ }
+
+ void shutdown(boolean wait) {
+ System.out.println("shutting down server");
+ }
+}
Propchange: incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/Server.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/Server.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/ServerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/ServerImpl.java?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/ServerImpl.java (added)
+++ incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/ServerImpl.java Mon Sep 18 23:48:34 2006
@@ -0,0 +1,29 @@
+package org.apache.cxf.performance.basic_type.server;
+
+import java.util.logging.Logger;
+
+import org.apache.cxf.performance.basic_type.BasicPortType;
+@javax.jws.WebService(portName = "SoapHttpPort", serviceName = "BasicService",
+ targetNamespace = "http://cxf.apache.org/performance/basic_type",
+ endpointInterface = "org.apache.cxf.performance.basic_type.BasicPortType")
+
+public class ServerImpl implements BasicPortType {
+
+ private static final Logger LOG =
+ Logger.getLogger(ServerImpl.class.getPackage().getName());
+
+ public byte[] echoBase64(byte[] inputBase64) {
+ //LOG.info("Executing operation echoBase64 ");
+ //System.out.println("Executing operation echoBase64");
+ //System.out.println("Message received: " + inputBase64 + "\n");
+ return inputBase64;
+ }
+
+ public String echoString(String inputString) {
+ //LOG.info("Executing operation echoString");
+ //System.out.println("Executing operation echoString\n");
+ //System.out.println("Message received: " + inputString + "\n");
+ return inputString;
+ }
+}
+
Propchange: incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/ServerImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/ServerImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/cxf/trunk/test/performance/basic_type/wsdl/basic_type.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/basic_type/wsdl/basic_type.wsdl?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/basic_type/wsdl/basic_type.wsdl (added)
+++ incubator/cxf/trunk/test/performance/basic_type/wsdl/basic_type.wsdl Mon Sep 18 23:48:34 2006
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions name="BaseService" targetNamespace="http://cxf.apache.org/performance/basic_type"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://cxf.apache.org/performance/basic_type"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:x1="http://cxf.apache.org/performance/basic_type/types"
+ >
+ <wsdl:types>
+ <schema targetNamespace="http://cxf.apache.org/performance/basic_type/types"
+ xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <element name="echoString">
+ <complexType>
+ <sequence>
+ <element name="RequestType" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="echoStringResponse">
+ <complexType>
+ <sequence>
+ <element name="ResponseType" type="xsd:string"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="echoBase64">
+ <complexType>
+ <sequence>
+ <element name="RequestType" type="xsd:base64Binary"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="echoBase64Response">
+ <complexType>
+ <sequence>
+ <element name="ResponseType" type="xsd:base64Binary"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+ <message name="echoBase64Request">
+ <part name="in" element="x1:echoBase64"/>
+ </message>
+ <message name="echoBase64Response">
+ <part name="out" element="x1:echoBase64Response"/>
+ </message>
+
+ <message name="echoStringRequest">
+ <part name="in" element="x1:echoString"/>
+ </message>
+ <message name="echoStringResponse">
+ <part name="out" element="x1:echoStringResponse"/>
+ </message>
+
+ <portType name="BasicPortType">
+ <operation name="echoBase64">
+ <input message="tns:echoBase64Request" name="echoBase64"/>
+ <output message="tns:echoBase64Response" name="echoBase64Response"/>
+ </operation>
+
+ <operation name="echoString">
+ <input message="tns:echoStringRequest" name="echoString"/>
+ <output message="tns:echoStringResponse" name="echoStringResponse"/>
+ </operation>
+
+ </portType>
+
+ <binding name="BasicPortBinding" type="tns:BasicPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="echoBase64">
+ <soap:operation soapAction="" style="document"/>
+ <input name="echoBase64">
+ <soap:body use="literal"/>
+ </input>
+ <output name="echoBase64Response">
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+
+ <operation name="echoString">
+ <soap:operation soapAction="" style="document"/>
+ <input name="echoString">
+ <soap:body use="literal"/>
+ </input>
+ <output name="echoStringResponse">
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ </binding>
+
+
+ <service name="BasicService">
+ <port binding="tns:BasicPortBinding" name="SoapHttpPort">
+ <soap:address
+ location="http://localhost:20000/performance/basic_type/SoapPort"/>
+ </port>
+ </service>
+
+</definitions>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Propchange: incubator/cxf/trunk/test/performance/basic_type/wsdl/basic_type.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/basic_type/wsdl/basic_type.wsdl
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/cxf/trunk/test/performance/basic_type/wsdl/basic_type.wsdl
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/cxf/trunk/test/performance/complex_type/bin/run_client
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/complex_type/bin/run_client?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/complex_type/bin/run_client (added)
+++ incubator/cxf/trunk/test/performance/complex_type/bin/run_client Mon Sep 18 23:48:34 2006
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+OPERARTION=sendReceiveData
+BASEDON=Time
+AMOUNT=30
+PACKETSIZE=1
+THREADS=1
+PIPE=
+
+for i in $@
+do
+ if [ "$i" = "-Operartion" ]
+ then
+ OPERARTION=$2
+ fi
+
+ if [ "$i" = "-BasedOn" ]
+ then
+ BASEDON=$2
+ fi
+
+ if [ "$i" = "-Amount" ]
+ then
+ AMOUNT=$2
+ fi
+
+ if [ "$i" = "-PacketSize" ]
+ then
+ PACKETSIZE=$2
+ fi
+
+ if [ "$i" = "-Threads" ]
+ then
+ THREADS=$2
+ fi
+
+ if [ "$i" = "-Pipe" ]
+ then
+ PIPE=-Dpipe=-Pipe
+ fi
+
+ shift
+done
+
+cd ..
+ant client -Dceltix.running.time=$AMOUNT -Dceltix.operation=$OPERARTION -Dceltix.basedon=$BASEDON -Dceltix.packet.size=$PACKETSIZE -Dceltix.threads=$THREADS $PIPE
Propchange: incubator/cxf/trunk/test/performance/complex_type/bin/run_client
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/cxf/trunk/test/performance/complex_type/bin/run_client.bat
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/complex_type/bin/run_client.bat?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/complex_type/bin/run_client.bat (added)
+++ incubator/cxf/trunk/test/performance/complex_type/bin/run_client.bat Mon Sep 18 23:48:34 2006
@@ -0,0 +1,26 @@
+@echo off
+@setlocal
+
+cd ..
+
+set BASEDON=Time
+set AMOUNT=3
+set OPERATION=sendReceiveData
+set PACKETSIZE=1
+set THREADS=1
+
+:Loop
+IF "%1"=="" GOTO Continue
+IF "%1"=="-BasedOn" (set BASEDON=%2)
+IF "%1"=="-Amount" (set AMOUNT=%2)
+IF "%1"=="-Operation" (set OPERATION=%2)
+IF "%1"=="-Threads" (set THREADS=%2)
+IF "%1"=="-PacketSize" (set PACKETSIZE=%2)
+SHIFT
+GOTO Loop
+
+:Continue
+
+ant client -Dceltix.running.time=%AMOUNT% -Dceltix.operation=%OPERATION% -Dceltix.basedon=%BASEDON% -Dceltix.packet.size=%PACKETSIZE% -Dceltix.threads=%THREADS%
+
+@endlocal
\ No newline at end of file
Propchange: incubator/cxf/trunk/test/performance/complex_type/bin/run_client.bat
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/cxf/trunk/test/performance/complex_type/bin/run_server
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/complex_type/bin/run_server?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/complex_type/bin/run_server (added)
+++ incubator/cxf/trunk/test/performance/complex_type/bin/run_server Mon Sep 18 23:48:34 2006
@@ -0,0 +1,2 @@
+cd ../
+ant server
Propchange: incubator/cxf/trunk/test/performance/complex_type/bin/run_server
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/cxf/trunk/test/performance/complex_type/bin/run_server.bat
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/complex_type/bin/run_server.bat?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/complex_type/bin/run_server.bat (added)
+++ incubator/cxf/trunk/test/performance/complex_type/bin/run_server.bat Mon Sep 18 23:48:34 2006
@@ -0,0 +1,2 @@
+cd ..
+ant server
\ No newline at end of file
Propchange: incubator/cxf/trunk/test/performance/complex_type/bin/run_server.bat
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/cxf/trunk/test/performance/complex_type/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/complex_type/build.xml?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/complex_type/build.xml (added)
+++ incubator/cxf/trunk/test/performance/complex_type/build.xml Mon Sep 18 23:48:34 2006
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<project name="test.complex_type" default="build" basedir=".">
+
+ <import file="../etc/common_build.xml"/>
+
+ <property name="wsdl.dir" location="${basedir}/wsdl"/>
+ <property name="wsdl.file" value="complex_type.wsdl"/>
+
+ <target name="client" description="run complex_type client">
+ <property name="param" value=""/>
+ <property name="pipe" value=""/>
+
+ <cxf.client.run classname="org.apache.cxf.performance.complex_type.client.Client" argline="-WSDL ${wsdl.dir}/${wsdl.file}
+ -Amount ${celtix.running.time}
+ -BasedOn ${celtix.basedon}
+ -Operation ${celtix.operation}
+ -PacketSize ${celtix.packet.size}
+ -Threads ${celtix.threads} ${pipe}"/>
+ </target>
+
+ <target name="server" description="run complex_type server">
+ <cxf.server.run classname="org.apache.cxf.performance.complex_type.server.Server" argline="-WSDL ${basedir}/wsdl/${wsdl.file}"/>
+ </target>
+
+ <target name="generate.code">
+ <echo level="info" message="Generating code using wsdl2java..."/>
+ <wsdl2java file="complex_type.wsdl"/>
+ </target>
+
+</project>
Propchange: incubator/cxf/trunk/test/performance/complex_type/build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/complex_type/build.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/cxf/trunk/test/performance/complex_type/build.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/client/Client.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/client/Client.java?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/client/Client.java (added)
+++ incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/client/Client.java Mon Sep 18 23:48:34 2006
@@ -0,0 +1,136 @@
+package org.apache.cxf.performance.complex_type.client;
+
+import java.io.File;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.MalformedURLException;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.datatype.DatatypeConfigurationException;
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.pat.internal.TestCaseBase;
+import org.apache.cxf.pat.internal.TestResult;
+import org.apache.cxf.performance.complex_type.ComplexPortType;
+import org.apache.cxf.performance.complex_type.ComplexService;
+import org.apache.cxf.performance.complex_type.server.Server;
+import org.apache.cxf.performance.complex_type.types.ColourEnum;
+import org.apache.cxf.performance.complex_type.types.NestedComplexType;
+import org.apache.cxf.performance.complex_type.types.NestedComplexTypeSeq;
+import org.apache.cxf.performance.complex_type.types.SimpleStruct;
+
+public final class Client extends TestCaseBase {
+ private static final QName SERVICE_NAME = new QName(
+ "http://cxf.apache.org/performance/complex_type",
+ "ComplexService");
+ private static final QName PORT_NAME = new QName(
+ "http://cxf.apache.org/performance/complex_type",
+ "ComplexPortType");
+ private ComplexService cs;
+ private ComplexPortType port;
+ private final NestedComplexTypeSeq complexTypeSeq = new NestedComplexTypeSeq();
+
+ public Client(String[] args) {
+ super("Base TestCase", args);
+ serviceName = "ComplexService";
+ portName = "ComplexPortType";
+ operationName = "sendReceiveData";
+ wsdlNameSpace = "http://cxf.apache.org/performance/complex_type";
+ amount = 30;
+ packetSize = 1;
+ }
+
+ public static void main(String args[]) throws Exception {
+
+ Client client = new Client(args);
+
+ client.initialize();
+
+ client.run();
+
+ List results = client.getTestResults();
+ TestResult testResult = null;
+ for (Iterator iter = results.iterator(); iter.hasNext();) {
+ testResult = (TestResult)iter.next();
+ System.out.println("Throughput " + testResult.getThroughput());
+ System.out.println("AVG Response Time " + testResult.getAvgResponseTime());
+ }
+ System.out.println("cxf client is going to shutdown!");
+ }
+
+ private SimpleStruct getSimpleStruct() throws DatatypeConfigurationException {
+ SimpleStruct ss = new SimpleStruct();
+ ss.setVarFloat(Float.MAX_VALUE);
+ ss.setVarShort(Short.MAX_VALUE);
+ ss.setVarByte(Byte.MAX_VALUE);
+ ss.setVarDecimal(new BigDecimal("3.1415926"));
+ ss.setVarDouble(Double.MAX_VALUE);
+ ss.setVarString("1234567890!@#$%^&*()abcdefghijk");
+ ss.setVarAttrString("1234567890!@#$%^&*()abcdefghijk");
+ ss.setVarDateTime(DatatypeFactory.newInstance().newXMLGregorianCalendar(2005, 12, 3, 0, 0, 9, 0, 0));
+ return ss;
+ }
+
+
+ public void initTestData() {
+ NestedComplexType complexType = new NestedComplexType();
+ complexType.setVarString("#12345ABc");
+ complexType.setVarUByte(Short.MAX_VALUE);
+ complexType.setVarUnsignedLong(new BigInteger("13691056728"));
+ complexType.setVarFloat(Float.MAX_VALUE);
+ complexType.setVarQName(new QName("return", "return"));
+ try {
+ complexType.setVarStruct(getSimpleStruct());
+ } catch (DatatypeConfigurationException e) {
+ e.printStackTrace();
+ }
+
+ complexType.setVarEnum(ColourEnum.RED);
+ byte[] binary = new byte[1024];
+ for (int idx = 0; idx < 4; idx++) {
+ for (int jdx = 0; jdx < 256; jdx++) {
+ binary[idx * 256 + jdx] = (byte)(jdx - 128);
+ }
+ }
+ complexType.setVarBase64Binary(binary);
+ complexType.setVarHexBinary(binary);
+
+ for (int i = 0; i < packetSize; i++) {
+ complexTypeSeq.getItem().add(complexType);
+ }
+ }
+
+ public void doJob() {
+ port.sendReceiveData(complexTypeSeq);
+ }
+
+ public void getPort() {
+ if (usePipe) {
+ try {
+ new Server("pipe://localhost:20000/performance/complex_type/ComplexPort");
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ }
+ } else {
+ System.out.println("not using pipe");
+ }
+ File wsdl = new File(wsdlPath);
+ try {
+ cs = new ComplexService(wsdl.toURL(), SERVICE_NAME);
+ } catch (MalformedURLException e) {
+ e.printStackTrace();
+ }
+ port = cs.getSoapPort();
+ if (usePipe) {
+ javax.xml.ws.BindingProvider provider = (javax.xml.ws.BindingProvider)port;
+ provider.getRequestContext().put(provider.ENDPOINT_ADDRESS_PROPERTY,
+ "pipe://localhost:20000/performance/complex_type/ComplexPort");
+ }
+ }
+
+ public void printUsage() {
+ System.out.println("Syntax is: Client [-WSDL wsdllocation] [-PacketSize packetnumber] ");
+ }
+}
Propchange: incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/client/Client.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/client/Client.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/server/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/server/Server.java?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/server/Server.java (added)
+++ incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/server/Server.java Mon Sep 18 23:48:34 2006
@@ -0,0 +1,36 @@
+package org.apache.cxf.performance.complex_type.server;
+
+import javax.xml.ws.Endpoint;
+
+
+
+public class Server implements Runnable {
+
+
+ public Server(String address) throws Exception {
+ System.out.println("Starting Server");
+ Object implementor = new ServerImpl();
+ Endpoint.publish(address, implementor);
+ System.out.println("Server published");
+ }
+
+ public Server(String[] args) throws Exception {
+ this("http://localhost:20003/performance/complex_type/SoapPort");
+ }
+
+ public static void main(String args[]) throws Exception {
+ Server server = new Server(args);
+ server.run();
+ }
+
+ public void run() {
+ System.out.println("running server");
+ System.out.println("READY");
+ }
+
+ void shutdown(boolean wait) {
+ System.out.println("shutting down server");
+ }
+
+
+}
Propchange: incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/server/Server.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/server/Server.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/server/ServerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/server/ServerImpl.java?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/server/ServerImpl.java (added)
+++ incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/server/ServerImpl.java Mon Sep 18 23:48:34 2006
@@ -0,0 +1,24 @@
+package org.apache.cxf.performance.complex_type.server;
+
+import java.util.logging.Logger;
+
+import org.apache.cxf.performance.complex_type.ComplexPortType;
+import org.apache.cxf.performance.complex_type.types.NestedComplexTypeSeq;
+
+@javax.jws.WebService(portName = "SoapPort", serviceName = "ComplexService",
+ targetNamespace = "http://cxf.apache.org/performance/complex_type",
+ endpointInterface = "org.apache.cxf.performance.complex_type.ComplexPortType")
+
+public class ServerImpl implements ComplexPortType {
+
+ private static final Logger LOG =
+ Logger.getLogger(ServerImpl.class.getPackage().getName());
+
+ public NestedComplexTypeSeq sendReceiveData(NestedComplexTypeSeq request) {
+ //LOG.info("Executing operation sendReceiveData opt");
+ //System.out.println("Executing operation sendReceiveData\n");
+ //System.out.println("Message received: " + request + "\n");
+ return request;
+ }
+}
+
Propchange: incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/server/ServerImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/complex_type/src/org/apache/cxf/performance/complex_type/server/ServerImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/cxf/trunk/test/performance/complex_type/wsdl/complex_type.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/complex_type/wsdl/complex_type.wsdl?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/complex_type/wsdl/complex_type.wsdl (added)
+++ incubator/cxf/trunk/test/performance/complex_type/wsdl/complex_type.wsdl Mon Sep 18 23:48:34 2006
@@ -0,0 +1,93 @@
+<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:tns="http://cxf.apache.org/performance/complex_type"
+ xmlns:x1="http://cxf.apache.org/performance/complex_type/types"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://cxf.apache.org/performance/complex_type" name="complex_type">
+ <wsdl:types>
+ <schema targetNamespace="http://cxf.apache.org/performance/complex_type/types" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <complexType name="SimpleStruct">
+ <sequence>
+ <element name="varFloat" type="xsd:float"/>
+ <element name="varShort" type="xsd:short"/>
+ <element name="varString" type="xsd:string"/>
+ <element name="varByte" type="xsd:byte"/>
+ <element name="varDecimal" type="xsd:decimal"/>
+ <element name="varDouble" type="xsd:double"/>
+ <element name="varDateTime" type="xsd:dateTime"/>
+ </sequence>
+ <attribute name="varAttrString" type="xsd:string"/>
+ </complexType>
+ <simpleType name="ColourEnum">
+ <restriction base="xsd:string">
+ <enumeration value="RED"/>
+ <enumeration value="GREEN"/>
+ <enumeration value="BLUE"/>
+ </restriction>
+ </simpleType>
+ <complexType name="NestedComplexType">
+ <sequence>
+ <element name="varString" type="xsd:string"/>
+ <element name="varUByte" type="xsd:unsignedByte"/>
+ <element name="varUnsignedLong" type="xsd:unsignedLong"/>
+ <element name="varFloat" type="xsd:float"/>
+ <element name="varQName" type="xsd:QName"/>
+ <element name="varBase64Binary" type="xsd:base64Binary"/>
+ <element name="varHexBinary" type="xsd:hexBinary"/>
+ <element name="varStruct" type="x1:SimpleStruct"/>
+ <element name="varEnum" type="x1:ColourEnum"/>
+ </sequence>
+ </complexType>
+ <complexType name="NestedComplexTypeSeq">
+ <sequence>
+ <element maxOccurs="unbounded" minOccurs="0" name="item" type="x1:NestedComplexType"/>
+ </sequence>
+ </complexType>
+ <element name="sendReceiveData">
+ <complexType>
+ <sequence>
+ <element name="RequestType" type="x1:NestedComplexTypeSeq"/>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="sendReceiveDataReponse">
+ <complexType>
+ <sequence>
+ <element name="ResponseType" type="x1:NestedComplexTypeSeq"/>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
+ </wsdl:types>
+ <wsdl:message name="sendReceiveDataRequest">
+ <wsdl:part name="in" element="x1:sendReceiveData"/>
+ </wsdl:message>
+ <wsdl:message name="sendReceiveDataResponse">
+ <wsdl:part name="out" element="x1:sendReceiveDataReponse"/>
+ </wsdl:message>
+ <wsdl:portType name="ComplexPortType">
+ <wsdl:operation name="sendReceiveData">
+ <wsdl:input name="SendReceiveDataRequest" message="tns:sendReceiveDataRequest"/>
+ <wsdl:output name="SendReceiveDataResponse" message="tns:sendReceiveDataResponse"/>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="ComplexSOAPBinding" type="tns:ComplexPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="sendReceiveData">
+ <soap:operation style="document"/>
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="ComplexService">
+ <wsdl:port name="SoapPort" binding="tns:ComplexSOAPBinding">
+ <soap:address location="http://localhost:20003/performance/complex_type/SoapPort"/>
+
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Propchange: incubator/cxf/trunk/test/performance/complex_type/wsdl/complex_type.wsdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/complex_type/wsdl/complex_type.wsdl
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/cxf/trunk/test/performance/complex_type/wsdl/complex_type.wsdl
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/cxf/trunk/test/performance/etc/common_build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/test/performance/etc/common_build.xml?view=auto&rev=447765
==============================================================================
--- incubator/cxf/trunk/test/performance/etc/common_build.xml (added)
+++ incubator/cxf/trunk/test/performance/etc/common_build.xml Mon Sep 18 23:48:34 2006
@@ -0,0 +1,253 @@
+<project name="CeltiXfire common build file" default="build">
+
+
+ <property environment="env"/>
+ <property name="build.dir" location ="${basedir}/build"/>
+ <property name="testbase.classes.dir" location ="${basedir}/../base/build/classes"/>
+ <property name="build.classes.dir" location ="${build.dir}/classes"/>
+ <property name="build.src.dir" location ="${build.dir}/src"/>
+ <property name="build.var.dir" location ="${build.dir}/var"/>
+ <property name="codegen.timestamp.file" value="${build.src.dir}/.CODEGEN_DONE"/>
+ <property name="wsdl.dir" location="${basedir}/wsdl"/>
+ <property name="war.dir" location="${build.dir}/war"/>
+
+
+ <!-- Setup for building in a source build -->
+ <condition property="srcbuild_paths.file" value="./srcbuild_paths.xml">
+ <available file="../../lib/cxf.jar"/>
+ </condition>
+ <!-- default setting -->
+ <property name="srcbuild_paths.file" value="../../../celtixfire-distribution/target/srcbuild_paths.xml"/>
+
+ <import file="${srcbuild_paths.file}" optional="true"/>
+ <property name="srcbuild.classpath" value=""/>
+
+ <uptodate property="codegen.notrequired" value="true">
+ <srcfiles dir="${wsdl.dir}" includes="*.wsdl"/>
+ <srcfiles dir="${wsdl.dir}" includes="*.xsd"/>
+ <mapper type="merge" to="${codegen.timestamp.file}"/>
+ </uptodate>
+
+ <!-- find the tools jar, which on darwin, tools.jar does not exist -->
+ <available property="tools.jar" value="$${env.JAVA_HOME}/lib/tools.jar"
+ file="${env.JAVA_HOME}/lib/tools.jar"/>
+ <path id="jdk.tools.classpath">
+ <pathelement location="${tools.jar}"/>
+ </path>
+
+ <condition property="is.java.version.15">
+ <equals arg1="${ant.java.version}" arg2="1.5"/>
+ </condition>
+
+ <fail message="CeltiXfire requires Java version 1.5 or higher. You are currently using Java version ${ant.java.version}."
+ unless="is.java.version.15"/>
+
+
+
+ <!-- Determine cxf.home, either from the environment variable CXF_HOME
+ - or using ../..
+ -->
+ <condition property="cxf.home" value="${env.CXF_HOME}">
+ <isset property="env.CXF_HOME"/>
+ </condition>
+ <property name="cxf.home" location="../.."/>
+ <property name="activemq.home" location="${cxf.home}/lib/activemq/3.2"/>
+ <property name="cxf.etc.dir" location="${cxf.home}/etc"/>
+
+
+ <path id="cxf.classpath">
+ <pathelement location="${build.classes.dir}"/>
+ <pathelement path="${srcbuild.classpath}"/>
+ <pathelement location="${cxf.home}/lib/cxf.jar"/>
+ <pathelement location="${testbase.classes.dir}"/>
+ </path>
+ <condition property="thirdparty.classpath" value="">
+ <not> <isset property="thirdparty.classpath"/> </not>
+ </condition>
+
+ <target name="maybe.generate.code" unless="codegen.notrequired">
+ <antcall target="generate.code"/>
+ <touch file="${codegen.timestamp.file}"/>
+ </target>
+
+ <target name="compile" depends="maybe.generate.code">
+ <javac destdir="${build.classes.dir}" debug="true">
+ <src path="${build.src.dir}"/>
+ <src path="${basedir}/src"/>
+ <classpath>
+ <path refid="cxf.classpath"/>
+ <pathelement path="${thirdparty.classpath}"/>
+ </classpath>
+ </javac>
+
+ <copy todir="${build.classes.dir}">
+ <fileset dir="${basedir}/src" includes="**/*.xml" />
+ <fileset dir="${build.src.dir}" includes="**/*.xml" />
+ </copy>
+ </target>
+
+ <target name="checkstyle">
+ <checkstyle config="${checkstyle.config.file}">
+ <fileset dir="${basedir}/src" includes="**/*.java"/>
+ <classpath>
+ <path refid="cxf.classpath"/>
+ <pathelement path="${thirdparty.classpath}"/>
+ </classpath>
+ </checkstyle>
+ </target>
+
+ <target name="clean">
+ <delete dir="${build.classes.dir}"/>
+ <delete dir="${build.src.dir}"/>
+ <delete file="${codegen.timestamp.file}"/>
+ <delete file="demo.log"/>
+ <delete file="${wsdl.dir}/async_binding.xml"/>
+ <delete dir="${build.var.dir}"/>
+ <delete dir="${activemq.home}/var"/>
+ </target>
+
+ <!-- Target to start JMS Broker for JMS samples -->
+ <target name="jmsbroker.start">
+ <property name="derby.system.home" location="${build.var.dir}"/>
+
+ <java classname="org.activemq.spring.Main" fork="yes" dir="${activemq.home}/bin">
+ <classpath>
+ <path refid="cxf.classpath"/>
+ </classpath>
+ <arg value="${activemq.home}/conf/activemq.xml"/>
+ <jvmarg value="-Dactivemq.home=${activemq.home}"/>
+ <jvmarg value="-Dderby.system.home=${derby.system.home}"/>
+ <jvmarg value="-Dderby.storage.fileSyncTransactionLog=true"/>
+ <jvmarg value="-Dderby.storage.dir=${build.var.dir}"/>
+ <sysproperty key="log4j.configuration" value="file:///${cxf.etc.dir}/log4j.properties"/>
+ </java>
+ </target>
+
+ <target name="build" depends="compile" description="build demo client and server"/>
+
+ <macrodef name="cxf.server.run">
+ <attribute name="classname"/>
+ <attribute name="argline" default=""/>
+ <sequential>
+ <java classname="@{classname}" fork="yes" maxMemory="512M" >
+ <jvmarg value="-Xms512M"/>
+ <classpath refid="cxf.classpath"/>
+ <arg line="@{argline}"/>
+ <sysproperty key="java.util.logging.config.file" value="${cxf.etc.dir}/logging.properties"/>
+ <sysproperty key="log4j.configuration" value="file:///${cxf.etc.dir}/log4j.properties"/>
+ </java>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="cxf.client.run">
+ <attribute name="classname"/>
+ <attribute name="argline" default=""/> <sequential>
+ <java classname="@{classname}" fork="yes" maxMemory="512M" >
+ <jvmarg value="-Xms256M"/>
+ <classpath refid="cxf.classpath"/>
+ <arg line="@{argline}"/>
+ <sysproperty key="java.util.logging.config.file" value="${cxf.etc.dir}/logging.properties"/>
+ <sysproperty key="log4j.configuration" value="file:///${cxf.etc.dir}/log4j.properties"/>
+ </java>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="cxfrun">
+ <attribute name="logging-properties-file" default="${cxf.etc.dir}/logging.properties"/>
+ <attribute name="classname"/>
+ <attribute name="param1" default=""/>
+ <attribute name="param2" default=""/>
+ <attribute name="param3" default=""/>
+ <attribute name="param4" default=""/>
+ <attribute name="param5" default=""/>
+ <attribute name="jvmarg1" default="-D"/>
+ <attribute name="jvmarg2" default="-D"/>
+ <attribute name="jvmarg3" default="-D"/>
+ <attribute name="jvmarg4" default="-D"/>
+ <attribute name="jvmarg5" default="-D"/>
+ <sequential>
+ <java classname="@{classname}" fork="yes">
+ <classpath>
+ <path refid="cxf.classpath"/>
+ <pathelement path="${thirdparty.classpath}"/>
+ </classpath>
+ <arg value="@{param1}"/>
+ <arg value="@{param2}"/>
+ <arg value="@{param3}"/>
+ <arg value="@{param4}"/>
+ <arg value="@{param5}"/>
+ <jvmarg value="@{jvmarg1}"/>
+ <jvmarg value="@{jvmarg2}"/>
+ <jvmarg value="@{jvmarg3}"/>
+ <jvmarg value="@{jvmarg4}"/>
+ <jvmarg value="@{jvmarg5}"/>
+ <assertions>
+ <enable package="org.apache.cxf"/>
+ </assertions>
+ <sysproperty key="java.util.logging.config.file" value="${cxf.etc.dir}/logging.properties"/>
+ <sysproperty key="log4j.configuration" value="file:///${cxf.etc.dir}/log4j.properties"/>
+ </java>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="wsdl2java">
+ <attribute name="srcdestdir" default="${build.src.dir}"/>
+ <attribute name="destdir" default="${build.classes.dir}"/>
+ <attribute name="file"/>
+ <attribute name="bindingfile" default=""/>
+ <attribute name="dir" default="${wsdl.dir}"/>
+ <attribute name="package" default="NOT_SPECIFIED"/>
+ <sequential>
+ <mkdir dir="@{destdir}"/>
+ <mkdir dir="@{srcdestdir}"/>
+ <condition property="package.arg.@{file}" value="-p @{package}">
+ <not>
+ <equals arg1="@{package}" arg2="NOT_SPECIFIED"/>
+ </not>
+ </condition>
+ <property name="package.arg.@{file}" value=""/>
+ <condition property="binding.arg" value="-b @{bindingfile}">
+ <not>
+ <equals arg1="@{bindingfile}" arg2=""/>
+ </not>
+ </condition>
+ <property name="binding.arg" value=""/>
+
+ <java failonerror="true" classname="org.apache.cxf.tools.wsdl2java.WSDLToJava" fork="yes">
+ <classpath>
+ <path refid="cxf.classpath" />
+ </classpath>
+ <sysproperty key="java.util.logging.config.file" value="${cxf.etc.dir}/logging.properties"/>
+ <arg line="${package.arg.@{file}}"/>
+ <arg line="${binding.arg}"/>
+ <arg value="-verbose"/>
+ <arg value="-d"/>
+ <arg value="@{srcdestdir}"/>
+ <arg value="@{dir}/@{file}"/>
+ </java>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="cxfwar">
+ <attribute name="filename"/>
+ <attribute name="wsdl"/>
+ <attribute name="dir" default="${war.dir}"/>
+ <attribute name="classesdir" default="${build.classes.dir}"/>
+ <sequential>
+ <mkdir dir="@{dir}"/>
+ <war destfile="@{dir}/@{filename}" webxml="${cxf.home}/etc/web.xml">
+ <classes dir="@{classesdir}"/>
+ <webinf dir="${wsdl.dir}">
+ <include name="cxf-servlet.xml"/>
+ </webinf>
+ <webinf dir="${wsdl.dir}/..">
+ <include name="wsdl/@{wsdl}"/>
+ </webinf>
+ <lib dir="${cxf.home}/lib">
+ <include name="*.jar"/>
+ </lib>
+ </war>
+ </sequential>
+ </macrodef>
+
+</project>
Propchange: incubator/cxf/trunk/test/performance/etc/common_build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/cxf/trunk/test/performance/etc/common_build.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/cxf/trunk/test/performance/etc/common_build.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml