You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by he...@apache.org on 2005/02/18 15:02:36 UTC
svn commit: r154283 - in webservices/axis/trunk/java: ./ etc/
modules/samples/ modules/samples/src/java/encoding/
modules/samples/src/java/encoding/sample1/
modules/samples/src/java/encoding/sample2/
modules/samples/src/java/encoding/sample2/benchMark/
modules/samples/src/test-resources/
modules/samples/src/test/org/apache/axis/integration/
Author: hemapani
Date: Fri Feb 18 06:02:31 2005
New Revision: 154283
URL: http://svn.apache.org/viewcvs?view=rev&rev=154283
Log:
build is almost done,90% of the test cases are done (all the critical ones are done) , there are few 3,4 need to included and and bit of cleanup is needed to done
Added:
webservices/axis/trunk/java/modules/samples/maven.xml
webservices/axis/trunk/java/modules/samples/src/java/encoding/
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/Collecter.java
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoImpl.java (with props)
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoProvider.java
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStruct.java (with props)
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStructEncoder.java
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStub.java
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EndToEndTest.java
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/LoadIncreaseTest.java
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/LoadTest.java
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/Sampler.java
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/service.xml (with props)
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/BenchProvider.java
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/Benchmark1Impl.java
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/Benchmark1PortType.java
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/bench.wsdl
webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/service.xml
webservices/axis/trunk/java/modules/samples/src/test-resources/soapmessage.xml
- copied unchanged from r154258, webservices/axis/trunk/archive/java/scratch/prototype2/src/test-resources/soapmessage.xml
Modified:
webservices/axis/trunk/java/etc/project.xml
webservices/axis/trunk/java/maven.xml
webservices/axis/trunk/java/modules/samples/src/test/org/apache/axis/integration/EchoTest.java
Modified: webservices/axis/trunk/java/etc/project.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/etc/project.xml?view=diff&r1=154282&r2=154283
==============================================================================
--- webservices/axis/trunk/java/etc/project.xml (original)
+++ webservices/axis/trunk/java/etc/project.xml Fri Feb 18 06:02:31 2005
@@ -151,13 +151,42 @@
<includes>
<include>**/*Test.java</include>
</includes>
+
<resources>
<resource>
<directory>${basedir}/src/test-resources</directory>
</resource>
- </resources>
-
+ <resource>
+ <directory>conf</directory>
+ <includes>
+ <include>**/*.properties</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src/java</directory>
+ <includes>
+ <include>**/*.properties</include>
+ <include>**/*.xml</include>
+ </includes>
+ </resource>
+ </resources>
</unitTest>
+
+ <resources>
+ <resource>
+ <directory>conf</directory>
+ <includes>
+ <include>**/*.properties</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src/java</directory>
+ <includes>
+ <include>**/*.properties</include>
+ <include>**/*.xml</include>
+ </includes>
+ </resource>
+ </resources>
</build>
Modified: webservices/axis/trunk/java/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/maven.xml?view=diff&r1=154282&r2=154283
==============================================================================
--- webservices/axis/trunk/java/maven.xml (original)
+++ webservices/axis/trunk/java/maven.xml Fri Feb 18 06:02:31 2005
@@ -17,4 +17,12 @@
*/
-->
<project default="multiproject:install">
+ <goal name="clean">
+ <delete dir="target"/>
+ <delete dir="modules/core/target"/>
+ <delete dir="modules/wsdl/target"/>
+ <delete dir="modules/deployment/target"/>
+ <delete dir="modules/samples/target"/>
+ <delete dir="modules/om/target"/>
+</goal>
</project>
Added: webservices/axis/trunk/java/modules/samples/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/maven.xml?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/maven.xml (added)
+++ webservices/axis/trunk/java/modules/samples/maven.xml Fri Feb 18 06:02:31 2005
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Revision: 1.21 $ $Date: 2004-10-27 20:54:09 +0600 (Wed, 27 Oct 2004) $ -->
+
+<project default="jar"
+ xmlns:j="jelly:core"
+ xmlns:maven="jelly:maven"
+ xmlns:deploy="deploy"
+ xmlns:ant="jelly:ant">
+ <postGoal name="test:compile">
+ <attainGoal name="samples"/>
+ </postGoal>
+ <goal name="samples">
+ <mkdir dir="target/test-resources/samples/services"/>
+ <mkdir dir="target/jar-code/sample1"/>
+ <mkdir dir="target/jar-code/sample1/META-INF"/>
+ <copy todir="target/jar-code/sample1">
+ <fileset dir="target/classes/">
+ <include name="encoding/sample1/**/*.class"/>
+ </fileset>
+ </copy>
+ <copy file="src/java/encoding/sample1/service.xml" tofile="target/jar-code/sample1/META-INF/service.xml"/>
+ <jar jarfile="target/test-resources/samples/services/echo.jar" basedir="target/jar-code/sample1" >
+ <include name="**" />
+ </jar>
+
+ <mkdir dir="target/jar-code/sample2"/>
+ <mkdir dir="target/jar-code/sample2/META-INF"/>
+ <copy todir="target/jar-code/sample2">
+ <fileset dir="target/classes/">
+ <include name="encoding/sample2/**/*.class"/>
+ </fileset>
+ </copy>
+ <copy file="src/java/encoding/sample2/benchMark/service.xml" tofile="target/jar-code/sample2/META-INF/service.xml"/>
+ <jar jarfile="target/test-resources/samples/services/soap-bench.jar" basedir="target/jar-code/sample2" >
+ <include name="**" />
+ </jar>
+
+ </goal>
+ </project>
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/Collecter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/Collecter.java?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/Collecter.java (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/Collecter.java Fri Feb 18 06:02:31 2005
@@ -0,0 +1,52 @@
+package encoding.sample1;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+
+/*
+ * Created on Feb 10, 2005
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class Collecter {
+ private static Writer writer = null;
+ private long[] results;
+ private int index = 0;
+ private String message = null;
+
+ public Collecter(int size, String message, Writer writer) throws IOException {
+ this.message = message;
+ Collecter.writer = writer;
+ results = new long[size];
+ }
+
+ public void add(long value) {
+ results[index] = value;
+ index++;
+ }
+
+ public void printResult() throws IOException {
+ int failed = 0;
+ long totel = 0;
+
+ for (int i = 0; i < results.length; i++) {
+
+ if (results[i] <= 0) {
+ failed++;
+ } else {
+ totel = totel + results[1];
+ }
+
+ }
+ System.out.println("Calls =" + results.length);
+ System.out.println("Faliure =" + failed);
+ System.out.println("Average =" + totel / (results.length - failed));
+ writer.write("--------------------------------------");
+ writer.write(message + "\n");
+ writer.write("Average =" + totel / (results.length - failed)+"\n");
+ writer.write("--------------------------------------");
+ writer.flush();
+ }
+
+}
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoImpl.java?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoImpl.java (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoImpl.java Fri Feb 18 06:02:31 2005
@@ -0,0 +1,25 @@
+package encoding.sample1;
+/**
+ * Echo.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.2RC1 Sep 29, 2004 (08:29:40 EDT) WSDL2Java emitter.
+ */
+
+public class EchoImpl {
+ public EchoImpl(){}
+ public java.lang.String echoString(java.lang.String in) {
+ return in;
+ }
+ public java.lang.String[] echoStringArray(java.lang.String[] in) {
+ return in;
+ }
+ public EchoStruct echoEchoStruct(
+ EchoStruct in) {
+ return in;
+ }
+ public EchoStruct[] echoEchoStructArray(
+ EchoStruct[] in) {
+ return in;
+ }
+}
Propchange: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoImpl.java
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoProvider.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoProvider.java?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoProvider.java (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoProvider.java Fri Feb 18 06:02:31 2005
@@ -0,0 +1,167 @@
+/*
+ * Created on Jan 29, 2005
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+package encoding.sample1;
+import java.lang.reflect.Method;
+
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.axis.context.MessageContext;
+import org.apache.axis.description.AxisOperation;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.om.OMConstants;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.testUtils.ArrayTypeEncoder;
+import org.apache.axis.testUtils.Encoder;
+import org.apache.axis.testUtils.ObjectToOMBuilder;
+import org.apache.axis.testUtils.SimpleJavaProvider;
+import org.apache.axis.testUtils.SimpleTypeEncoder;
+import org.apache.axis.testUtils.SimpleTypeEncodingUtils;
+
+public class EchoProvider extends SimpleJavaProvider {
+
+ public Object[] deserializeParameters(
+ MessageContext msgContext,
+ Method method)
+ throws AxisFault {
+ // org.TimeRecorder.BEFORE_DESERALIZE = System.currentTimeMillis();
+ XMLStreamReader xpp =
+ msgContext.getSoapOperationElement().getPullParser(true);
+ Class[] parms = method.getParameterTypes();
+ Object[] objs = new Object[parms.length];
+
+ try {
+ int event = xpp.next();
+ while (XMLStreamConstants.START_ELEMENT != event
+ && XMLStreamConstants.END_ELEMENT != event) {
+ event = xpp.next();
+ }
+ //now we are at the opearion element event
+ event = xpp.next();
+ while (XMLStreamConstants.START_ELEMENT != event
+ && XMLStreamConstants.END_ELEMENT != event) {
+ event = xpp.next();
+ }
+ // now we are at the parameter element event
+
+ if (XMLStreamConstants.END_ELEMENT == event) {
+ return null;
+ } else {
+ for (int i = 0; i < parms.length; i++) {
+ if (int.class.equals(parms[i])) {
+ objs[i] =
+ new Integer(
+ SimpleTypeEncodingUtils.deserializeInt(xpp));
+ } else if (String.class.equals(parms[i])) {
+ objs[i] =
+ SimpleTypeEncodingUtils.deserializeString(xpp);
+ } else if (String[].class.equals(parms[i])) {
+ objs[i] =
+ SimpleTypeEncodingUtils.deserializeStringArray(xpp);
+ } else if (EchoStruct.class.equals(parms[i])) {
+ Encoder en = new EchoStructEncoder(null);
+ objs[i] = en.deSerialize(xpp);
+ } else if (EchoStruct[].class.equals(parms[i])) {
+ Encoder encoder = new ArrayTypeEncoder(new EchoStructEncoder(null));
+ objs[i] = encoder.deSerialize(xpp);
+ } else {
+ throw new UnsupportedOperationException("Only int,String and String[] is supported yet");
+ }
+ }
+ return objs;
+
+ }
+ } catch (Exception e) {
+ throw new AxisFault("Exception",e);
+ }
+ }
+
+ public MessageContext invoke(MessageContext msgContext) throws AxisFault {
+ try {
+ //get the implementation class for the Web Service
+ Object obj = getTheImplementationObject(msgContext);
+
+ //find the WebService method
+ Class ImplClass = obj.getClass();
+ AxisOperation op = msgContext.getOperation();
+ String methodName = op.getName().getLocalPart();
+
+
+ Method[] methods = ImplClass.getMethods();
+ for (int i = 0; i < methods.length; i++) {
+ if (methods[i].getName().equals(methodName)) {
+ this.method = methods[i];
+ break;
+ }
+ }
+ //deserialize (XML-> java)
+ Object[] parms = deserializeParameters(msgContext, method);
+ //invoke the WebService
+
+ EchoImpl echo = (EchoImpl)obj;
+ Object result = null;
+ if("echoEchoStruct".equals(methodName)) {
+ result = echo.echoEchoStruct((EchoStruct)parms[0]);
+ }else if ("echoString".equals(methodName)) {
+ result = echo.echoString((String)parms[0]);
+ }else if ("echoStringArray".equals(methodName)) {
+ result = echo.echoStringArray((String[])parms[0]);
+ }else if ("echoEchoStructArray".equals(methodName)) {
+ Object[] parmsIn = (Object[])parms[0];
+ EchoStruct[] structs = new EchoStruct[parmsIn.length];
+ for (int i = 0; i < structs.length; i++) {
+ structs[i] = (EchoStruct) parmsIn[i];
+
+ }
+ result = echo.echoEchoStructArray(structs);
+ }
+ Encoder outobj = null;
+
+ if (result instanceof String || result instanceof String[]) {
+ outobj = new SimpleTypeEncoder(result);
+ } else if (result instanceof EchoStruct) {
+ outobj = new EchoStructEncoder((EchoStruct) result);
+ } else if (result instanceof EchoStruct[]) {
+ outobj =
+ new ArrayTypeEncoder(
+ (EchoStruct[]) result,
+ new EchoStructEncoder(null));
+ }
+
+ OMFactory fac = OMFactory.newInstance();
+ SOAPEnvelope responseEnvelope = fac.getDefaultEnvelope();
+
+ OMNamespace ns = fac.createOMNamespace("http://soapenc/", "res");
+ OMElement responseMethodName =
+ fac.createOMElement(methodName + "Response", ns);
+ responseEnvelope.getBody().addChild(responseMethodName);
+ OMElement returnelement =
+ fac.createOMElement(methodName + "Return", ns);
+ responseMethodName.addChild(returnelement);
+ returnelement.setBuilder(
+ new ObjectToOMBuilder(returnelement, outobj));
+ returnelement.declareNamespace(
+ OMConstants.ARRAY_ITEM_NSURI,
+ "arrays");
+ returnelement.declareNamespace(
+ "http://axis.apache.org",
+ "s");
+
+ msgContext.setEnvelope(responseEnvelope);
+
+ return msgContext;
+ } catch (SecurityException e) {
+ throw AxisFault.makeFault(e);
+ } catch (IllegalArgumentException e) {
+ throw AxisFault.makeFault(e);
+ }
+ }
+
+}
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStruct.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStruct.java?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStruct.java (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStruct.java Fri Feb 18 06:02:31 2005
@@ -0,0 +1,318 @@
+package encoding.sample1;
+/**
+ * EchoStruct.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.2RC1 Sep 29, 2004 (08:29:40 EDT) WSDL2Java emitter.
+ */
+
+public class EchoStruct implements java.io.Serializable {
+ private java.lang.String value1;
+ private java.lang.String value10;
+ private java.lang.String value11;
+ private java.lang.String value12;
+ private java.lang.String value13;
+ private java.lang.String value2;
+ private int value3;
+ private java.lang.String value4;
+ private java.lang.String value5;
+ private java.lang.String value6;
+ private java.lang.String value7;
+ private java.lang.String value8;
+ private java.lang.String value9;
+
+ public EchoStruct() {
+ }
+
+ public EchoStruct(
+ java.lang.String value1,
+ java.lang.String value10,
+ java.lang.String value11,
+ java.lang.String value12,
+ java.lang.String value13,
+ java.lang.String value2,
+ int value3,
+ java.lang.String value4,
+ java.lang.String value5,
+ java.lang.String value6,
+ java.lang.String value7,
+ java.lang.String value8,
+ java.lang.String value9) {
+ this.value1 = value1;
+ this.value10 = value10;
+ this.value11 = value11;
+ this.value12 = value12;
+ this.value13 = value13;
+ this.value2 = value2;
+ this.value3 = value3;
+ this.value4 = value4;
+ this.value5 = value5;
+ this.value6 = value6;
+ this.value7 = value7;
+ this.value8 = value8;
+ this.value9 = value9;
+ }
+
+ /**
+ * Gets the value1 value for this EchoStruct.
+ *
+ * @return value1
+ */
+ public java.lang.String getValue1() {
+ return value1;
+ }
+
+ /**
+ * Sets the value1 value for this EchoStruct.
+ *
+ * @param value1
+ */
+ public void setValue1(java.lang.String value1) {
+ this.value1 = value1;
+ }
+
+ /**
+ * Gets the value10 value for this EchoStruct.
+ *
+ * @return value10
+ */
+ public java.lang.String getValue10() {
+ return value10;
+ }
+
+ /**
+ * Sets the value10 value for this EchoStruct.
+ *
+ * @param value10
+ */
+ public void setValue10(java.lang.String value10) {
+ this.value10 = value10;
+ }
+
+ /**
+ * Gets the value11 value for this EchoStruct.
+ *
+ * @return value11
+ */
+ public java.lang.String getValue11() {
+ return value11;
+ }
+
+ /**
+ * Sets the value11 value for this EchoStruct.
+ *
+ * @param value11
+ */
+ public void setValue11(java.lang.String value11) {
+ this.value11 = value11;
+ }
+
+ /**
+ * Gets the value12 value for this EchoStruct.
+ *
+ * @return value12
+ */
+ public java.lang.String getValue12() {
+ return value12;
+ }
+
+ /**
+ * Sets the value12 value for this EchoStruct.
+ *
+ * @param value12
+ */
+ public void setValue12(java.lang.String value12) {
+ this.value12 = value12;
+ }
+
+ /**
+ * Gets the value13 value for this EchoStruct.
+ *
+ * @return value13
+ */
+ public java.lang.String getValue13() {
+ return value13;
+ }
+
+ /**
+ * Sets the value13 value for this EchoStruct.
+ *
+ * @param value13
+ */
+ public void setValue13(java.lang.String value13) {
+ this.value13 = value13;
+ }
+
+ /**
+ * Gets the value2 value for this EchoStruct.
+ *
+ * @return value2
+ */
+ public java.lang.String getValue2() {
+ return value2;
+ }
+
+ /**
+ * Sets the value2 value for this EchoStruct.
+ *
+ * @param value2
+ */
+ public void setValue2(java.lang.String value2) {
+ this.value2 = value2;
+ }
+
+ /**
+ * Gets the value3 value for this EchoStruct.
+ *
+ * @return value3
+ */
+ public int getValue3() {
+ return value3;
+ }
+
+ /**
+ * Sets the value3 value for this EchoStruct.
+ *
+ * @param value3
+ */
+ public void setValue3(int value3) {
+ this.value3 = value3;
+ }
+
+ /**
+ * Gets the value4 value for this EchoStruct.
+ *
+ * @return value4
+ */
+ public java.lang.String getValue4() {
+ return value4;
+ }
+
+ /**
+ * Sets the value4 value for this EchoStruct.
+ *
+ * @param value4
+ */
+ public void setValue4(java.lang.String value4) {
+ this.value4 = value4;
+ }
+
+ /**
+ * Gets the value5 value for this EchoStruct.
+ *
+ * @return value5
+ */
+ public java.lang.String getValue5() {
+ return value5;
+ }
+
+ /**
+ * Sets the value5 value for this EchoStruct.
+ *
+ * @param value5
+ */
+ public void setValue5(java.lang.String value5) {
+ this.value5 = value5;
+ }
+
+ /**
+ * Gets the value6 value for this EchoStruct.
+ *
+ * @return value6
+ */
+ public java.lang.String getValue6() {
+ return value6;
+ }
+
+ /**
+ * Sets the value6 value for this EchoStruct.
+ *
+ * @param value6
+ */
+ public void setValue6(java.lang.String value6) {
+ this.value6 = value6;
+ }
+
+ /**
+ * Gets the value7 value for this EchoStruct.
+ *
+ * @return value7
+ */
+ public java.lang.String getValue7() {
+ return value7;
+ }
+
+ /**
+ * Sets the value7 value for this EchoStruct.
+ *
+ * @param value7
+ */
+ public void setValue7(java.lang.String value7) {
+ this.value7 = value7;
+ }
+
+ /**
+ * Gets the value8 value for this EchoStruct.
+ *
+ * @return value8
+ */
+ public java.lang.String getValue8() {
+ return value8;
+ }
+
+ /**
+ * Sets the value8 value for this EchoStruct.
+ *
+ * @param value8
+ */
+ public void setValue8(java.lang.String value8) {
+ this.value8 = value8;
+ }
+
+ /**
+ * Gets the value9 value for this EchoStruct.
+ *
+ * @return value9
+ */
+ public java.lang.String getValue9() {
+ return value9;
+ }
+
+ /**
+ * Sets the value9 value for this EchoStruct.
+ *
+ * @param value9
+ */
+ public void setValue9(java.lang.String value9) {
+ this.value9 = value9;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object obj) {
+ if (obj instanceof EchoStruct) {
+ EchoStruct val = (EchoStruct) obj;
+ if (value1.equals(val.value1)
+ && value2.equals(val.value2)
+ && (value3 == val.value3)
+ && value4.equals(val.value4)
+ && value5.equals(val.value5)
+ && value6.equals(val.value6)
+ && value7.equals(val.value7)
+ && value8.equals(val.value8)
+ && value9.equals(val.value9)
+ && value10.equals(val.value10)
+ && value11.equals(val.value11)
+ && value12.equals(val.value12)
+ && value13.equals(val.value13)) {
+ return true;
+
+
+ }
+
+ }
+ return false;
+
+ }
+}
Propchange: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStruct.java
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStructEncoder.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStructEncoder.java?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStructEncoder.java (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStructEncoder.java Fri Feb 18 06:02:31 2005
@@ -0,0 +1,363 @@
+/*
+ * Created on Jan 29, 2005
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+package encoding.sample1;
+import java.io.IOException;
+
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.om.OMException;
+import org.apache.axis.testUtils.Encoder;
+import org.apache.axis.testUtils.SimpleTypeEncodingUtils;
+import org.xml.sax.ContentHandler;
+
+public class EchoStructEncoder implements Encoder {
+
+ private static final int VALUE1 = -823812896;
+ private static final int VALUE2 = -823812895;
+ private static final int VALUE3 = -823812894;
+ private static final int VALUE4 = -823812893;
+ private static final int VALUE5 = -823812892;
+ private static final int VALUE6 = -823812891;
+ private static final int VALUE7 = -823812890;
+ private static final int VALUE8 = -823812889;
+ private static final int VALUE9 = -823812888;
+ private static final int VALUE10 = 231604048;
+ private static final int VALUE11 = 231604049;
+ private static final int VALUE12 = 231604050;
+ private static final int VALUE13 = 231604051;
+
+ private ContentHandler contentHandler;
+ private EchoStruct struct;
+
+
+ public EchoStructEncoder() {
+ }
+
+ public EchoStructEncoder(EchoStruct struct) {
+ this.struct = struct;
+ }
+
+ public Object deSerialize(XMLStreamReader xpp) throws AxisFault {
+ EchoStruct struct = new EchoStruct();
+
+ try {
+ int event = xpp.next();
+ while (true) {
+ if (XMLStreamConstants.START_ELEMENT == event) {
+ String localName = xpp.getLocalName();
+ int nameCode = localName.hashCode();
+ switch (nameCode) {
+ case VALUE1 :
+ struct.setValue1(
+ SimpleTypeEncodingUtils.deserializeString(xpp));
+ break;
+ case VALUE2 :
+ struct.setValue2(
+ SimpleTypeEncodingUtils.deserializeString(xpp));
+ break;
+ case VALUE3 :
+ struct.setValue3(
+ SimpleTypeEncodingUtils.deserializeInt(xpp));
+ break;
+ case VALUE4 :
+ struct.setValue4(
+ SimpleTypeEncodingUtils.deserializeString(xpp));
+ break;
+ case VALUE5 :
+ struct.setValue5(
+ SimpleTypeEncodingUtils.deserializeString(xpp));
+ break;
+ case VALUE6 :
+ struct.setValue6(
+ SimpleTypeEncodingUtils.deserializeString(xpp));
+ break;
+ case VALUE7 :
+ struct.setValue7(
+ SimpleTypeEncodingUtils.deserializeString(xpp));
+ break;
+ case VALUE8 :
+ struct.setValue8(
+ SimpleTypeEncodingUtils.deserializeString(xpp));
+ break;
+ case VALUE9 :
+ struct.setValue9(
+ SimpleTypeEncodingUtils.deserializeString(xpp));
+ break;
+ case VALUE10 :
+ struct.setValue10(
+ SimpleTypeEncodingUtils.deserializeString(xpp));
+ break;
+ case VALUE11 :
+ struct.setValue11(
+ SimpleTypeEncodingUtils.deserializeString(xpp));
+ break;
+ case VALUE12 :
+ struct.setValue12(
+ SimpleTypeEncodingUtils.deserializeString(xpp));
+ break;
+ case VALUE13 :
+ struct.setValue13(
+ SimpleTypeEncodingUtils.deserializeString(xpp));
+ break;
+ default:
+ throw new AxisFault("Unknown elemnt "+ localName);
+ }
+ }
+ if (XMLStreamConstants.END_ELEMENT == event) {
+ break;
+ }
+ if (XMLStreamConstants.END_DOCUMENT == event) {
+ throw new AxisFault("premature and of file");
+ }
+ event = xpp.next();
+ }
+
+ return struct;
+ } catch (XMLStreamException e) {
+ throw AxisFault.makeFault(e);
+ }
+
+ }
+
+ public void serialize(XMLStreamWriter writer)
+ throws IOException, XMLStreamException {
+ writer.writeStartElement("value1");
+
+ writer.writeEndElement();
+ }
+
+ public void serialize(ContentHandler contentHandler)
+ throws OMException {
+ if (contentHandler == null) {
+ throw new OMException("Please set the content Handler");
+ }
+ try {
+ String value = "value1";
+ contentHandler.startElement(
+ "http://axis.apache.org",
+ value,
+ "s:value1",
+ null);
+ String strVal = struct.getValue1();
+ char[] str = ((strVal == null) ? new char[] {
+ }
+ : strVal.toCharArray());
+ contentHandler.characters(str, 0, str.length);
+ contentHandler.endElement(
+ "http://axis.apache.org",
+ value,
+ "s:value1");
+
+ value = "value2";
+ contentHandler.startElement(
+ "http://axis.apache.org",
+ value,
+ "s:value2",
+ null);
+ strVal = struct.getValue2();
+ str = ((strVal == null) ? new char[] {
+ }
+ : strVal.toCharArray());
+ contentHandler.characters(str, 0, str.length);
+ contentHandler.endElement(
+ "http://axis.apache.org",
+ value,
+ "s:value2");
+
+ value = "value3";
+ contentHandler.startElement(
+ "http://axis.apache.org",
+ value,
+ "s:value3",
+ null);
+ int intVal = struct.getValue3();
+ str = String.valueOf(intVal).toCharArray();
+ contentHandler.characters(str, 0, str.length);
+ contentHandler.endElement(
+ "http://axis.apache.org",
+ value,
+ "s:value3");
+
+ value = "value4";
+ contentHandler.startElement(
+ "http://axis.apache.org",
+ value,
+ "s:value4",
+ null);
+ strVal = struct.getValue4();
+ str = ((strVal == null) ? new char[] {
+ }
+ : strVal.toCharArray());
+ contentHandler.characters(str, 0, str.length);
+ contentHandler.endElement(
+ "http://axis.apache.org",
+ value,
+ "s:value4");
+
+ value = "value5";
+ contentHandler.startElement(
+ "http://axis.apache.org",
+ value,
+ "s:value5",
+ null);
+ strVal = struct.getValue5();
+ str = ((strVal == null) ? new char[] {
+ }
+ : strVal.toCharArray());
+ contentHandler.characters(str, 0, str.length);
+ contentHandler.endElement(
+ "http://axis.apache.org",
+ value,
+ "s:value5");
+
+ value = "value6";
+ contentHandler.startElement(
+ "http://axis.apache.org",
+ value,
+ "s:value6",
+ null);
+ strVal = struct.getValue6();
+ str = ((strVal == null) ? new char[] {
+ }
+ : strVal.toCharArray());
+ contentHandler.characters(str, 0, str.length);
+ contentHandler.endElement(
+ "http://axis.apache.org",
+ value,
+ "s:value6");
+
+ value = "value7";
+ contentHandler.startElement(
+ "http://axis.apache.org",
+ value,
+ "s:value7",
+ null);
+ strVal = struct.getValue7();
+ str = ((strVal == null) ? new char[] {
+ }
+ : strVal.toCharArray());
+ contentHandler.characters(str, 0, str.length);
+ contentHandler.endElement(
+ "http://axis.apache.org",
+ value,
+ "s:value7");
+
+ value = "value8";
+ contentHandler.startElement(
+ "http://axis.apache.org",
+ value,
+ "s:value8",
+ null);
+ strVal = struct.getValue8();
+ str = ((strVal == null) ? new char[] {
+ }
+ : strVal.toCharArray());
+ contentHandler.characters(str, 0, str.length);
+ contentHandler.endElement(
+ "http://axis.apache.org",
+ value,
+ "s:value8");
+
+ value = "value9";
+ contentHandler.startElement(
+ "http://axis.apache.org",
+ value,
+ "s:value9",
+ null);
+ strVal = struct.getValue9();
+ str = ((strVal == null) ? new char[] {
+ }
+ : strVal.toCharArray());
+ contentHandler.characters(str, 0, str.length);
+ contentHandler.endElement(
+ "http://axis.apache.org",
+ value,
+ "s:value9");
+
+ value = "value10";
+ contentHandler.startElement(
+ "http://axis.apache.org",
+ value,
+ "s:value10",
+ null);
+ strVal = struct.getValue10();
+ str = ((strVal == null) ? new char[] {
+ }
+ : strVal.toCharArray());
+ contentHandler.characters(str, 0, str.length);
+ contentHandler.endElement(
+ "http://axis.apache.org",
+ value,
+ "s:value10");
+
+ value = "value11";
+ contentHandler.startElement(
+ "http://axis.apache.org",
+ value,
+ "s:value11",
+ null);
+ strVal = struct.getValue11();
+ str = ((strVal == null) ? new char[] {
+ }
+ : strVal.toCharArray());
+ contentHandler.characters(str, 0, str.length);
+ contentHandler.endElement(
+ "http://axis.apache.org",
+ value,
+ "s:value11");
+
+ value = "value12";
+ contentHandler.startElement(
+ "http://axis.apache.org",
+ value,
+ "s:value12",
+ null);
+ strVal = struct.getValue12();
+ str = ((strVal == null) ? new char[] {
+ }
+ : strVal.toCharArray());
+ contentHandler.characters(str, 0, str.length);
+ contentHandler.endElement(
+ "http://axis.apache.org",
+ value,
+ "s:value12");
+
+ value = "value13";
+ contentHandler.startElement(
+ "http://axis.apache.org",
+ value,
+ "s:value13",
+ null);
+ strVal = struct.getValue13();
+ str = ((strVal == null) ? new char[] {
+ }
+ : strVal.toCharArray());
+ contentHandler.characters(str, 0, str.length);
+ contentHandler.endElement(
+ "http://axis.apache.org",
+ value,
+ "s:value13");
+
+ } catch (Exception e) {
+ throw new OMException(e);
+ }
+
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.axis.encoding.Encoder#setObject(java.lang.Object)
+ */
+ public void setObject(Object obj) {
+ this.struct = (EchoStruct) obj;
+
+ }
+
+}
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStub.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStub.java?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStub.java (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EchoStub.java Fri Feb 18 06:02:31 2005
@@ -0,0 +1,83 @@
+package encoding.sample1;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.axis.addressing.AddressingConstants;
+import org.apache.axis.addressing.EndpointReference;
+import org.apache.axis.clientapi.Call;
+import org.apache.axis.om.OMConstants;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.SOAPBody;
+import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.testUtils.ArrayTypeEncoder;
+import org.apache.axis.testUtils.ObjectToOMBuilder;
+
+public class EchoStub {
+ private OMFactory fac;
+ private OMNamespace ns =
+ fac.createOMNamespace("http://apache.ws.apache.org/samples", "samples");
+ private OMNamespace arrayNs =
+ fac.createOMNamespace(
+ OMConstants.ARRAY_ITEM_NSURI,
+ OMConstants.ARRAY_ITEM_NS_PREFIX);
+ OMNamespace targetNs = fac.createOMNamespace("http://axis.apache.org", "s");
+ public EchoStub() {
+ fac = OMFactory.newInstance();
+ }
+ public EchoStruct[] echoEchoStructArray(EchoStruct[] in) throws Exception {
+ OMElement returnelement = fac.createOMElement("param1", ns);
+ EchoStructEncoder encoder = new EchoStructEncoder();
+ ArrayTypeEncoder arrayEncoder = new ArrayTypeEncoder(in, encoder);
+
+ ObjectToOMBuilder builder =
+ new ObjectToOMBuilder(returnelement, arrayEncoder);
+
+ returnelement.setBuilder(builder);
+ returnelement.declareNamespace(arrayNs);
+ returnelement.declareNamespace(targetNs);
+
+ SOAPEnvelope envelope = fac.getDefaultEnvelope();
+ OMElement responseMethodName =
+ fac.createOMElement("echoEchoStructArray", ns);
+ envelope.getBody().addChild(responseMethodName);
+ responseMethodName.addChild(returnelement);
+
+ EndpointReference targetEPR =
+ new EndpointReference(
+ AddressingConstants.WSA_TO,
+ "http://127.0.0.1:8080/axis2/services/echo");
+ Call call = new Call();
+ call.setTo(targetEPR);
+ SOAPEnvelope responseEnv = call.sendReceive(envelope);
+
+ SOAPBody body = responseEnv.getBody();
+ if (body.hasFault()) {
+ throw body.getFault().getException();
+ }
+ XMLStreamReader xpp = body.getPullParser(true);
+
+ int event = xpp.next();
+ while (event != XMLStreamConstants.START_ELEMENT) {
+ event = xpp.next();
+ }
+ event = xpp.next();
+ while (event != XMLStreamConstants.START_ELEMENT) {
+ event = xpp.next();
+ }
+ event = xpp.next();
+ while (event != XMLStreamConstants.START_ELEMENT) {
+ event = xpp.next();
+ }
+
+ Object obj = arrayEncoder.deSerialize(xpp);
+ Object[] structs = (Object[]) obj;
+ EchoStruct[] response = new EchoStruct[structs.length];
+ for (int i = 0; i < structs.length; i++) {
+ response[i] = (EchoStruct) structs[i];
+
+ }
+ return response;
+ }
+}
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EndToEndTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EndToEndTest.java?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EndToEndTest.java (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/EndToEndTest.java Fri Feb 18 06:02:31 2005
@@ -0,0 +1,50 @@
+package encoding.sample1;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+
+/*
+ * Created on Feb 9, 2005
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+/**
+ * @author hemapani
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class EndToEndTest {
+ private static int sizeOfArray = 10;
+ private static int numberOfRequests = 100;
+ private int no;
+ private static int THREAD_COUNT = 100;
+ private Collecter c;
+ public EndToEndTest(int no,Collecter c){
+ this.no = no;
+ }
+
+ public static void main(String[] args) throws IOException {
+
+ Writer writer = new FileWriter("results/results.txt");
+ writer.write("Axis2 Perf\n#########################\n");
+ int[] vals = new int[]{1, 10,100,1000};
+ for (int j = 0; j < vals.length; j++) {
+ Collecter c = new Collecter(100,"Array Size =" + vals[j],writer);
+ for (int i = 0; i < numberOfRequests; i++) {
+ try {
+ Sampler sampler = new Sampler(vals[j], c);
+ System.out.print(i + " = ");
+ sampler.invokeService();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ c.printResult();
+ }
+ writer.write("#########################\n");
+ writer.close();
+
+ }
+}
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/LoadIncreaseTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/LoadIncreaseTest.java?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/LoadIncreaseTest.java (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/LoadIncreaseTest.java Fri Feb 18 06:02:31 2005
@@ -0,0 +1,38 @@
+package encoding.sample1;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+
+/*
+ * Created on Feb 9, 2005
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+/**
+ * @author hemapani
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class LoadIncreaseTest {
+ public static void main(String[] args) throws IOException {
+ Writer writer = new FileWriter("results/result.txt");
+ Collecter c = new Collecter(1000,"Load increase test, Axis2",writer);
+ int count = 14000;
+ while(true) {
+ count = count + 1000;
+ System.out.print("Invoke ="+ count + " |");
+
+ Sampler sampler = new Sampler(count,c);
+ try {
+ sampler.invokeService();
+ } catch (Exception e) {
+ System.out.println("Failed at the size " + count);
+ e.printStackTrace();
+ break;
+ }
+ }
+ c.printResult();
+ }
+}
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/LoadTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/LoadTest.java?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/LoadTest.java (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/LoadTest.java Fri Feb 18 06:02:31 2005
@@ -0,0 +1,60 @@
+package encoding.sample1;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+
+/*
+ * Created on Feb 9, 2005
+ *
+ * To change the template for this generated file go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+/**
+ * @author hemapani
+ *
+ * To change the template for this generated type comment go to
+ * Window>Preferences>Java>Code Generation>Code and Comments
+ */
+public class LoadTest implements Runnable {
+ private int sizeOfArray = 10;
+ private static int numberOfRequests = 100;
+ private int no;
+ private static int THREAD_COUNT = 500;
+ private Collecter c;
+ public LoadTest(int no,Collecter c){
+ this.no = no;
+ this.c = c;
+ }
+
+ public static void main(String[] args) throws IOException {
+ Writer writer = new FileWriter("results/result.txt");
+ Collecter c = new Collecter(THREAD_COUNT * numberOfRequests,"Load increase test, Axis2",writer);
+ for (int i = 0; i < THREAD_COUNT; i++) {
+ System.out.println("Thread "+i+ " started");
+ Thread thread = new Thread(new LoadTest(i,c));
+ thread.start();
+ }
+ c.printResult();
+ writer.close();
+
+ }
+ /* (non-Javadoc)
+ * @see java.lang.Runnable#run()
+ */
+ public void run() {
+
+ for (int i = 0; i < numberOfRequests; i++) {
+
+ try {
+ Sampler sampler = new Sampler(sizeOfArray,c);
+ sampler.invokeService();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+
+ }
+ System.out.println("Thread "+no+ " stop");
+ }
+
+}
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/Sampler.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/Sampler.java?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/Sampler.java (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/Sampler.java Fri Feb 18 06:02:31 2005
@@ -0,0 +1,118 @@
+package encoding.sample1;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.axis.addressing.AddressingConstants;
+import org.apache.axis.addressing.EndpointReference;
+import org.apache.axis.clientapi.Call;
+import org.apache.axis.om.OMConstants;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.SOAPBody;
+import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.testUtils.ArrayTypeEncoder;
+import org.apache.axis.testUtils.ObjectToOMBuilder;
+
+public class Sampler {
+ private int count;
+ private Collecter collector;
+ public Sampler(int count,Collecter collector){
+ this.count = count;
+ this.collector = collector;
+ }
+
+
+ public void invokeService() throws Exception {
+ EchoStruct[] objs = new EchoStruct[count];
+
+ for (int i = 0; i < objs.length; i++) {
+ objs[i] = new EchoStruct();
+ objs[i].setValue1("Ruy Lopez"+i);
+ objs[i].setValue2("Kings Gambit"+i);
+ objs[i].setValue3(345);
+ objs[i].setValue4("Kings Indian Defence"+i);
+ objs[i].setValue5("Musio Gambit"+i);
+ objs[i].setValue6("Benko Gambit"+i);
+ objs[i].setValue7("Secillian Defance"+i);
+ objs[i].setValue8("Queens Gambit"+i);
+ objs[i].setValue9("Queens Indian Defense"+i);
+ objs[i].setValue10("Alekine's Defense"+i);
+ objs[i].setValue11("Perc Defense"+i);
+ objs[i].setValue12("Scotch Gambit");
+ objs[i].setValue13("English Opening"+i);
+ }
+
+ long start = System.currentTimeMillis();
+ OMFactory fac = OMFactory.newInstance();
+ OMNamespace ns =
+ fac.createOMNamespace(
+ "http://apache.ws.apache.org/samples",
+ "samples");
+ OMNamespace arrayNs =
+ fac.createOMNamespace(
+ OMConstants.ARRAY_ITEM_NSURI,
+ OMConstants.ARRAY_ITEM_NS_PREFIX);
+ OMNamespace targetNs =
+ fac.createOMNamespace("http://axis.apache.org", "s");
+
+
+ OMElement returnelement = fac.createOMElement("param1", ns);
+ EchoStructEncoder encoder = new EchoStructEncoder();
+ ArrayTypeEncoder arrayEncoder = new ArrayTypeEncoder(objs, encoder);
+
+ ObjectToOMBuilder builder =
+ new ObjectToOMBuilder(returnelement, arrayEncoder);
+
+ returnelement.setBuilder(builder);
+ returnelement.declareNamespace(arrayNs);
+ returnelement.declareNamespace(targetNs);
+
+ SOAPEnvelope envelope = fac.getDefaultEnvelope();
+ OMElement responseMethodName =
+ fac.createOMElement("echoEchoStructArray", ns);
+ envelope.getBody().addChild(responseMethodName);
+ responseMethodName.addChild(returnelement);
+
+ EndpointReference targetEPR =
+ new EndpointReference(
+ AddressingConstants.WSA_TO,
+ "http://127.0.0.1:8080/axis2/services/echo");
+ Call call = new Call();
+ call.setTo(targetEPR);
+ SOAPEnvelope responseEnv = call.sendReceive(envelope);
+
+ SOAPBody body = responseEnv.getBody();
+ if (body.hasFault()) {
+ throw body.getFault().getException();
+ }
+ XMLStreamReader xpp = body.getPullParser(true);
+
+ int event = xpp.next();
+ while (event != XMLStreamConstants.START_ELEMENT) {
+ event = xpp.next();
+ }
+ event = xpp.next();
+ while (event != XMLStreamConstants.START_ELEMENT) {
+ event = xpp.next();
+ }
+ event = xpp.next();
+ while (event != XMLStreamConstants.START_ELEMENT) {
+ event = xpp.next();
+ }
+
+ Object obj = arrayEncoder.deSerialize(xpp);
+ long end = System.currentTimeMillis();
+ Object[] structs = (Object[]) obj;
+
+ for (int i = 0; i < structs.length; i++) {
+ if(!structs[i].equals(objs[i])){
+ throw new Exception("Assertion Failed");
+ }
+
+ }
+ long val = end -start;
+ System.out.println(val);
+ collector.add(val);
+ }
+}
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/service.xml?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/service.xml (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/service.xml Fri Feb 18 06:02:31 2005
@@ -0,0 +1,7 @@
+<service provider="encoding.sample1.EchoProvider" style="xsd:anyURI" contextPath="xsd:anycontextPath" >
+ <java:implementation class="encoding.sample1.EchoImpl" xmlns:java="http://ws.apache.org/axis2/deployment/java"/>
+ <operation name="echoString" qname="echoString" style="anyStyle" use="anyUse"/>
+ <operation name="echoStringArray" qname="echoStringArray" style="anyStyle" use="anyUse"/>
+ <operation name="echoEchoStruct" qname="echoEchoStruct" style="anyStyle" use="anyUse"/>
+ <operation name="echoEchoStructArray" qname="echoEchoStructArray" style="anyStyle" use="anyUse"/>
+</service>
\ No newline at end of file
Propchange: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample1/service.xml
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/BenchProvider.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/BenchProvider.java?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/BenchProvider.java (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/BenchProvider.java Fri Feb 18 06:02:31 2005
@@ -0,0 +1,187 @@
+package encoding.sample2.benchMark;
+
+import java.lang.reflect.Method;
+
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.axis.context.MessageContext;
+import org.apache.axis.description.AxisOperation;
+import org.apache.axis.engine.AxisFault;
+import org.apache.axis.om.OMConstants;
+import org.apache.axis.om.OMElement;
+import org.apache.axis.om.OMFactory;
+import org.apache.axis.om.OMNamespace;
+import org.apache.axis.om.SOAPEnvelope;
+import org.apache.axis.testUtils.Encoder;
+import org.apache.axis.testUtils.ObjectToOMBuilder;
+import org.apache.axis.testUtils.SimpleJavaProvider;
+import org.apache.axis.testUtils.SimpleTypeEncoder;
+import org.apache.axis.testUtils.SimpleTypeEncodingUtils;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: Ajith
+ * Date: Feb 10, 2005
+ * Time: 3:10:05 PM
+ */
+public class BenchProvider extends SimpleJavaProvider {
+
+ public Object[] deserializeParameters(
+ MessageContext msgContext,
+ Method method)
+ throws AxisFault {
+ // org.TimeRecorder.BEFORE_DESERALIZE = System.currentTimeMillis();
+ XMLStreamReader xpp =
+ msgContext.getSoapOperationElement().getPullParser(true);
+ Class[] parms = method.getParameterTypes();
+ Object[] objs = new Object[parms.length];
+
+ try {
+ int event = xpp.next();
+ while (XMLStreamConstants.START_ELEMENT != event
+ && XMLStreamConstants.END_ELEMENT != event) {
+ event = xpp.next();
+ }
+ //now we are at the opearion element event
+ event = xpp.next();
+ while (XMLStreamConstants.START_ELEMENT != event
+ && XMLStreamConstants.END_ELEMENT != event) {
+ event = xpp.next();
+ }
+ //now we are at the parameter element event
+
+ if (XMLStreamConstants.END_ELEMENT == event) {
+ return null;
+ } else {
+ for (int i = 0; i < parms.length; i++) {
+ if (int.class.equals(parms[i])) {
+ objs[i] =
+ new Integer(
+ SimpleTypeEncodingUtils.deserializeInt(xpp));
+ } else if (String.class.equals(parms[i])) {
+ objs[i] = SimpleTypeEncodingUtils.deserializeString(xpp);
+ } else if (String[].class.equals(parms[i])) {
+ objs[i] = SimpleTypeEncodingUtils.deserializeStringArray(xpp);
+ } else if (double.class.equals(parms[i])) {
+ objs[i] =new Double(SimpleTypeEncodingUtils.deserializeDouble(xpp));
+ } else if (double[].class.equals(parms[i])) {
+ objs[i] = SimpleTypeEncodingUtils.deserializeDoubleArray(xpp);
+ } else if (int[].class.equals(parms[i])) {
+ objs[i] = SimpleTypeEncodingUtils.deserializeIntArray(xpp);
+ } else if (byte[].class.equals(parms[i])) {
+ objs[i] = SimpleTypeEncodingUtils.deserializeByteArray(xpp);
+ }else {
+ throw new UnsupportedOperationException("Only int,String and String[] is supported yet");
+ }
+ }
+ return objs;
+
+ }
+ } catch (Exception e) {
+ throw new AxisFault("Exception",e);
+ }
+ }
+
+ public MessageContext invoke(MessageContext msgContext) throws AxisFault {
+ try {
+ //get the implementation class for the Web Service
+ Object obj = getTheImplementationObject(msgContext);
+
+ //find the WebService method
+ Class ImplClass = obj.getClass();
+ AxisOperation op = msgContext.getOperation();
+ String methodName = op.getName().getLocalPart();
+
+
+ Method[] methods = ImplClass.getMethods();
+ for (int i = 0; i < methods.length; i++) {
+ if (methods[i].getName().equals(methodName)) {
+ this.method = methods[i];
+ break;
+ }
+ }
+ //deserialize (XML-> java)
+ Object[] parms = deserializeParameters(msgContext, method);
+ //invoke the WebService
+
+ Benchmark1PortType benchmark = (Benchmark1PortType)obj;
+ Object result = null;
+ if("echoVoid".equals(methodName)) {
+ result = "";//benchmark.echoVoid();
+ }else if ("echoStrings".equals(methodName)) {
+ result = benchmark.echoStrings((String[])parms[0]);
+ }else if ("echoInts".equals(methodName)) {
+ result = benchmark.echoInts((int[])parms[0]);
+ }else if ("echoDoubles".equals(methodName)) {
+ result = benchmark.echoDoubles((double[])parms[0]);
+ }else if ("echoBase64".equals(methodName)) {
+ result = benchmark.echoBase64((byte[])parms[0]);
+ }else if ("receiveStrings".equals(methodName)) {
+ result = new Integer(benchmark.receiveStrings((String[])parms[0]));
+ } else if ("receiveInts".equals(methodName)) {
+ result = new Integer(benchmark.receiveInts((int[])parms[0]));
+ } else if ("receiveDoubles".equals(methodName)) {
+ result = new Integer(benchmark.receiveDoubles((double[])parms[0]));
+ }else if ("receiveBase64".equals(methodName)) {
+ result = new Integer(benchmark.receiveBase64((byte[])parms[0]));
+ } else if ("sendStrings".equals(methodName)) {
+ result = benchmark.sendStrings(((Integer)parms[0]).intValue());
+ } else if ("sendInts".equals(methodName)) {
+ result = benchmark.sendInts(((Integer)parms[0]).intValue());
+ }else if ("sendDoubles".equals(methodName)) {
+ result = benchmark.sendDoubles(((Integer)parms[0]).intValue());
+ }else if ("sendBase64".equals(methodName)) {
+ result = benchmark.sendBase64(((Integer)parms[0]).intValue());
+ }
+
+
+ Encoder outobj = null;
+
+ Class clazz = result.getClass();
+ if (clazz == String.class ||
+ clazz == String[].class ||
+ clazz == int.class ||
+ clazz == Integer.class ||
+ clazz == int[].class ||
+ clazz == double.class ||
+ clazz == Double.class ||
+ clazz == double[].class ||
+ clazz == byte[].class) {
+ outobj = new SimpleTypeEncoder(result);
+ }
+
+ OMFactory fac = OMFactory.newInstance();
+ SOAPEnvelope responseEnvelope = fac.getDefaultEnvelope();
+
+ OMNamespace ns = fac.createOMNamespace("http://soapenc/", "res");
+ OMElement responseMethodName =
+ fac.createOMElement(methodName + "Response", ns);
+ responseEnvelope.getBody().addChild(responseMethodName);
+ OMElement returnelement =
+ fac.createOMElement(methodName + "Return", ns);
+ responseMethodName.addChild(returnelement);
+ returnelement.setBuilder(
+ new ObjectToOMBuilder(returnelement, outobj));
+ returnelement.declareNamespace(
+ OMConstants.ARRAY_ITEM_NSURI,
+ "arrays");
+ returnelement.declareNamespace(
+ "http://axis.apache.org",
+ "s");
+
+ msgContext.setEnvelope(responseEnvelope);
+
+ return msgContext;
+
+ } catch (SecurityException e) {
+ throw AxisFault.makeFault(e);
+ } catch (IllegalArgumentException e) {
+ throw AxisFault.makeFault(e);
+ } catch (java.rmi.RemoteException e) {
+ throw AxisFault.makeFault(e);
+ }
+ }
+}
+
+
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/Benchmark1Impl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/Benchmark1Impl.java?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/Benchmark1Impl.java (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/Benchmark1Impl.java Fri Feb 18 06:02:31 2005
@@ -0,0 +1,83 @@
+/**
+ * Benchmark1Impl.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.2beta Apr 25, 2004 (11:37:32 EST) WSDL2Java emitter.
+ */
+
+package encoding.sample2.benchMark;
+
+public class Benchmark1Impl implements Benchmark1PortType{
+ public void echoVoid() throws java.rmi.RemoteException {
+ }
+
+ public byte[] echoBase64(byte[] input) throws java.rmi.RemoteException {
+ return input;
+ }
+
+ public java.lang.String[] echoStrings(java.lang.String[] input) throws java.rmi.RemoteException {
+ return input;
+ }
+
+ public int[] echoInts(int[] input) throws java.rmi.RemoteException {
+ return input;
+ }
+
+ public double[] echoDoubles(double[] input) throws java.rmi.RemoteException {
+ return input;
+ }
+
+
+ public int receiveBase64(byte[] input) throws java.rmi.RemoteException {
+ return input.length;
+ }
+
+ public int receiveStrings(String[] input) throws java.rmi.RemoteException {
+ return input.length;
+ }
+
+ public int receiveInts(int[] input) throws java.rmi.RemoteException {
+ return input.length;
+ }
+
+ public int receiveDoubles(double[] input) throws java.rmi.RemoteException {
+ return input.length;
+ }
+
+ public byte[] sendBase64(int n) throws java.rmi.RemoteException {
+ byte[] output = new byte[n];
+ for (int i = 0; i < n; i++)
+ {
+ output[i] = (byte) i;
+ }
+ return output;
+ }
+
+ public String[] sendStrings(int n) throws java.rmi.RemoteException {
+ String[] output = new String[n];
+ for (int i = 0; i < n; i++)
+ {
+ output[i] = "s"+i;
+ }
+ return output;
+ }
+
+ public int[] sendInts(int n) throws java.rmi.RemoteException {
+ int[] output = new int[n];
+ for (int i = 0; i < n; i++)
+ {
+ output[i] = (int) i;
+ }
+ return output;
+ }
+
+ public double[] sendDoubles(int n) throws java.rmi.RemoteException {
+ double[] output = new double[n];
+ for (int i = 0; i < n; i++)
+ {
+ output[i] = (double) i;
+ }
+ return output;
+ }
+
+}
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/Benchmark1PortType.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/Benchmark1PortType.java?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/Benchmark1PortType.java (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/Benchmark1PortType.java Fri Feb 18 06:02:31 2005
@@ -0,0 +1,76 @@
+/**
+ * Benchmark1PortType.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.2beta May 11, 2004 (03:05:50 EST) WSDL2Java emitter.
+ */
+
+package encoding.sample2.benchMark;
+
+public interface Benchmark1PortType extends java.rmi.Remote {
+
+ /**
+ * pings the server
+ */
+ public void echoVoid() throws java.rmi.RemoteException;
+
+ /**
+ * echos base64 content
+ */
+ public byte[] echoBase64(byte[] input) throws java.rmi.RemoteException;
+
+ /**
+ * echos string arrays
+ */
+ public java.lang.String[] echoStrings(java.lang.String[] input) throws java.rmi.RemoteException;
+
+ /**
+ * echos int arrays
+ */
+ public int[] echoInts(int[] input) throws java.rmi.RemoteException;
+
+ /**
+ * echos double arrays
+ */
+ public double[] echoDoubles(double[] input) throws java.rmi.RemoteException;
+
+ /**
+ * receives base64 content
+ */
+ public int receiveBase64(byte[] input) throws java.rmi.RemoteException;
+
+ /**
+ * receives strings
+ */
+ public int receiveStrings(java.lang.String[] input) throws java.rmi.RemoteException;
+
+ /**
+ * receives ints
+ */
+ public int receiveInts(int[] input) throws java.rmi.RemoteException;
+
+ /**
+ * receives doubles
+ */
+ public int receiveDoubles(double[] input) throws java.rmi.RemoteException;
+
+ /**
+ * sends base64 content
+ */
+ public byte[] sendBase64(int size) throws java.rmi.RemoteException;
+
+ /**
+ * sends strings
+ */
+ public java.lang.String[] sendStrings(int size) throws java.rmi.RemoteException;
+
+ /**
+ * sends ints
+ */
+ public int[] sendInts(int size) throws java.rmi.RemoteException;
+
+ /**
+ * sends doubles
+ */
+ public double[] sendDoubles(int size) throws java.rmi.RemoteException;
+}
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/bench.wsdl
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/bench.wsdl?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/bench.wsdl (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/bench.wsdl Fri Feb 18 06:02:31 2005
@@ -0,0 +1,428 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="urn:soap-bench" xmlns:impl="urn:soap-bench" xmlns:intf="urn:soap-bench" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+<!--WSDL created by Apache Axis version: 1.2RC1
+Built on Sep 29, 2004 (08:29:40 EDT)-->
+ <wsdl:types>
+ <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:soap-bench">
+ <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
+ <complexType name="ArrayOf_xsd_string">
+ <complexContent>
+ <restriction base="soapenc:Array">
+ <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+ <complexType name="ArrayOf_xsd_int">
+ <complexContent>
+ <restriction base="soapenc:Array">
+ <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+ <complexType name="ArrayOf_xsd_double">
+ <complexContent>
+ <restriction base="soapenc:Array">
+ <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:double[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="receiveDoublesResponse">
+
+ <wsdl:part name="receiveDoublesReturn" type="xsd:int"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="sendStringsResponse">
+
+ <wsdl:part name="sendStringsReturn" type="impl:ArrayOf_xsd_string"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="sendIntsResponse">
+
+ <wsdl:part name="sendIntsReturn" type="impl:ArrayOf_xsd_int"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="echoDoublesRequest">
+
+ <wsdl:part name="in0" type="impl:ArrayOf_xsd_double"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="echoDoublesResponse">
+
+ <wsdl:part name="echoDoublesReturn" type="impl:ArrayOf_xsd_double"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="receiveDoublesRequest">
+
+ <wsdl:part name="in0" type="impl:ArrayOf_xsd_double"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="echoStringsRequest">
+
+ <wsdl:part name="in0" type="impl:ArrayOf_xsd_string"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="sendDoublesResponse">
+
+ <wsdl:part name="sendDoublesReturn" type="impl:ArrayOf_xsd_double"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="receiveIntsResponse">
+
+ <wsdl:part name="receiveIntsReturn" type="xsd:int"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="sendIntsRequest">
+
+ <wsdl:part name="in0" type="xsd:int"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="echoVoidResponse">
+
+ </wsdl:message>
+
+ <wsdl:message name="echoIntsRequest">
+
+ <wsdl:part name="in0" type="impl:ArrayOf_xsd_int"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="sendStringsRequest">
+
+ <wsdl:part name="in0" type="xsd:int"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="receiveIntsRequest">
+
+ <wsdl:part name="in0" type="impl:ArrayOf_xsd_int"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="receiveStringsResponse">
+
+ <wsdl:part name="receiveStringsReturn" type="xsd:int"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="echoStringsResponse">
+
+ <wsdl:part name="echoStringsReturn" type="impl:ArrayOf_xsd_string"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="echoIntsResponse">
+
+ <wsdl:part name="echoIntsReturn" type="impl:ArrayOf_xsd_int"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="receiveStringsRequest">
+
+ <wsdl:part name="in0" type="impl:ArrayOf_xsd_string"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="sendDoublesRequest">
+
+ <wsdl:part name="in0" type="xsd:int"/>
+
+ </wsdl:message>
+
+ <wsdl:message name="echoVoidRequest">
+
+ </wsdl:message>
+
+ <wsdl:portType name="Benchmark1PortType">
+
+ <wsdl:operation name="echoVoid">
+
+ <wsdl:input name="echoVoidRequest" message="impl:echoVoidRequest"/>
+
+ <wsdl:output name="echoVoidResponse" message="impl:echoVoidResponse"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="echoStrings" parameterOrder="in0">
+
+ <wsdl:input name="echoStringsRequest" message="impl:echoStringsRequest"/>
+
+ <wsdl:output name="echoStringsResponse" message="impl:echoStringsResponse"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="echoInts" parameterOrder="in0">
+
+ <wsdl:input name="echoIntsRequest" message="impl:echoIntsRequest"/>
+
+ <wsdl:output name="echoIntsResponse" message="impl:echoIntsResponse"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="echoDoubles" parameterOrder="in0">
+
+ <wsdl:input name="echoDoublesRequest" message="impl:echoDoublesRequest"/>
+
+ <wsdl:output name="echoDoublesResponse" message="impl:echoDoublesResponse"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="receiveStrings" parameterOrder="in0">
+
+ <wsdl:input name="receiveStringsRequest" message="impl:receiveStringsRequest"/>
+
+ <wsdl:output name="receiveStringsResponse" message="impl:receiveStringsResponse"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="receiveInts" parameterOrder="in0">
+
+ <wsdl:input name="receiveIntsRequest" message="impl:receiveIntsRequest"/>
+
+ <wsdl:output name="receiveIntsResponse" message="impl:receiveIntsResponse"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="receiveDoubles" parameterOrder="in0">
+
+ <wsdl:input name="receiveDoublesRequest" message="impl:receiveDoublesRequest"/>
+
+ <wsdl:output name="receiveDoublesResponse" message="impl:receiveDoublesResponse"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="sendStrings" parameterOrder="in0">
+
+ <wsdl:input name="sendStringsRequest" message="impl:sendStringsRequest"/>
+
+ <wsdl:output name="sendStringsResponse" message="impl:sendStringsResponse"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="sendInts" parameterOrder="in0">
+
+ <wsdl:input name="sendIntsRequest" message="impl:sendIntsRequest"/>
+
+ <wsdl:output name="sendIntsResponse" message="impl:sendIntsResponse"/>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="sendDoubles" parameterOrder="in0">
+
+ <wsdl:input name="sendDoublesRequest" message="impl:sendDoublesRequest"/>
+
+ <wsdl:output name="sendDoublesResponse" message="impl:sendDoublesResponse"/>
+
+ </wsdl:operation>
+
+ </wsdl:portType>
+
+ <wsdl:binding name="soap-benchSoapBinding" type="impl:Benchmark1PortType">
+
+ <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
+
+ <wsdl:operation name="echoVoid">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="echoVoidRequest">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="echoVoidResponse">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="echoStrings">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="echoStringsRequest">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="echoStringsResponse">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="echoInts">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="echoIntsRequest">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="echoIntsResponse">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="echoDoubles">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="echoDoublesRequest">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="echoDoublesResponse">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="receiveStrings">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="receiveStringsRequest">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="receiveStringsResponse">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="receiveInts">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="receiveIntsRequest">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="receiveIntsResponse">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="receiveDoubles">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="receiveDoublesRequest">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="receiveDoublesResponse">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="sendStrings">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="sendStringsRequest">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="sendStringsResponse">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="sendInts">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="sendIntsRequest">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="sendIntsResponse">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ <wsdl:operation name="sendDoubles">
+
+ <wsdlsoap:operation soapAction=""/>
+
+ <wsdl:input name="sendDoublesRequest">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:input>
+
+ <wsdl:output name="sendDoublesResponse">
+
+ <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap-bench"/>
+
+ </wsdl:output>
+
+ </wsdl:operation>
+
+ </wsdl:binding>
+
+ <wsdl:service name="Benchmark1PortTypeService">
+
+ <wsdl:port name="soap-bench" binding="impl:soap-benchSoapBinding">
+
+ <wsdlsoap:address location="http://localhost:8080/axis2/services/soap-bench"/>
+
+ </wsdl:port>
+
+ </wsdl:service>
+
+</wsdl:definitions>
Added: webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/service.xml?view=auto&rev=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/service.xml (added)
+++ webservices/axis/trunk/java/modules/samples/src/java/encoding/sample2/benchMark/service.xml Fri Feb 18 06:02:31 2005
@@ -0,0 +1,16 @@
+<service provider="encoding.sample2.benchMark.BenchProvider" style="xsd:anyURI" contextPath="xsd:anycontextPath" >
+ <java:implementation class="encoding.sample2.benchMark.Benchmark1Impl" xmlns:java="http://ws.apache.org/axis2/deployment/java"/>
+ <operation name="echoVoid" qname="echoVoid" style="anyStyle" use="anyUse"/>
+ <operation name="echoStrings" qname="echoStrings" style="anyStyle" use="anyUse"/>
+ <operation name="echoInts" qname="echoInts" style="anyStyle" use="anyUse"/>
+ <operation name="echoDoubles" qname="echoDoubles" style="anyStyle" use="anyUse"/>
+ <operation name="echoBase64" qname="echoBase64" style="anyStyle" use="anyUse"/>
+ <operation name="receiveStrings" qname="receiveStrings" style="anyStyle" use="anyUse"/>
+ <operation name="receiveInts" qname="receiveInts" style="anyStyle" use="anyUse"/>
+ <operation name="receiveDoubles" qname="receiveDoubles" style="anyStyle" use="anyUse"/>
+ <operation name="receiveBase64" qname="receiveBase64" style="anyStyle" use="anyUse"/>
+ <operation name="sendStrings" qname="sendStrings" style="anyStyle" use="anyUse"/>
+ <operation name="sendInts" qname="sendInts" style="anyStyle" use="anyUse"/>
+ <operation name="sendDoubles" qname="sendDoubles" style="anyStyle" use="anyUse"/>
+ <operation name="sendBase64" qname="sendBase64" style="anyStyle" use="anyUse"/>
+</service>
\ No newline at end of file
Modified: webservices/axis/trunk/java/modules/samples/src/test/org/apache/axis/integration/EchoTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/test/org/apache/axis/integration/EchoTest.java?view=diff&r1=154282&r2=154283
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/test/org/apache/axis/integration/EchoTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/src/test/org/apache/axis/integration/EchoTest.java Fri Feb 18 06:02:31 2005
@@ -161,7 +161,7 @@
"Hello testing4",
"Hello testing5"};
Class clasname =
- Class.forName("EchoStruct", true, cl);
+ Class.forName("encoding.sample1.EchoStruct", true, cl);
Object obj = clasname.newInstance();
Method method1 =
@@ -207,7 +207,7 @@
OMElement returnelement = fac.createOMElement("param1", ns);
Class encoderClass =
- Class.forName("EchoStructEncoder",
+ Class.forName("encoding.sample1.EchoStructEncoder",
true,
cl);
Constructor constCt =
@@ -237,7 +237,7 @@
public void testEchoStructArray() throws Exception {
Object[] objs = new Object[10];
Class clasname =
- Class.forName("EchoStruct", true, cl);
+ Class.forName("encoding.sample1.EchoStruct", true, cl);
for (int i = 0; i < objs.length; i++) {
@@ -286,7 +286,7 @@
OMElement returnelement = fac.createOMElement("param1", ns);
Class encoderClass =
- Class.forName("EchoStructEncoder",
+ Class.forName("encoding.sample1.EchoStructEncoder",
true,
cl);
Constructor constCt =