Author: mmerz
Date: Mon Jan 3 17:23:17 2005
New Revision: 124052
URL: http://svn.apache.org/viewcvs?view=rev&rev=124052
Log:
Start of drt/build time reorg. More changes/fixes to follow.
Added:
incubator/beehive/trunk/wsm/drt/webapp/
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Bar.java
- copied, changed from r123133,
incubator/beehive/trunk/wsm/drt/tests/Bar.java
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Bar2.java
- copied, changed from r123133,
incubator/beehive/trunk/wsm/drt/tests/Bar2.java
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Bar3.java
- copied, changed from r123133,
incubator/beehive/trunk/wsm/drt/tests/Bar3.java
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Foo.java
- copied, changed from r123133,
incubator/beehive/trunk/wsm/drt/tests/Foo.java
Removed:
incubator/beehive/trunk/wsm/drt/tests/Bar.java
incubator/beehive/trunk/wsm/drt/tests/Bar2.java
incubator/beehive/trunk/wsm/drt/tests/Bar3.java
incubator/beehive/trunk/wsm/drt/tests/Foo.java
Modified:
incubator/beehive/trunk/wsm/drt/build.xml
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar2TestCase.java
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar3TestCase.java
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/FooTestCase.java
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorEndpointInterfaceTest.java
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorTest.java
Modified: incubator/beehive/trunk/wsm/drt/build.xml
Url:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/build.xml?view=diff&rev=124052&p1=incubator/beehive/trunk/wsm/drt/build.xml&r1=124051&p2=incubator/beehive/trunk/wsm/drt/build.xml&r2=124052
==============================================================================
--- incubator/beehive/trunk/wsm/drt/build.xml (original)
+++ incubator/beehive/trunk/wsm/drt/build.xml Mon Jan 3 17:23:17 2005
@@ -1,12 +1,12 @@
<?xml version="1.0" ?>
-<project name="wsmdrt" default="usage">
+<project name="wsmdrt" default="drt">
+
<property environment="os"/>
<property file="${os.BEEHIVE_HOME}/beehive.properties"/>
- <!-- New V9 DRT Domain specific properties -->
<property name="test.root" location="${basedir}"/>
+ <property name="webapp.dir" location="${test.root}/webapp"/>
<property name="tests.src" location="${test.root}/tests"/>
- <property name="wsm.src" location="${test.root}/wsm"/>
<property name="build.dir" location="${test.root}/build"/>
<property name="build.classes" location="${build.dir}/classes"/>
<property name="build.tests" location="${build.dir}/classes/tests"/>
@@ -20,24 +20,7 @@
</condition>
<property name="lib.dir" value="../lib"/>
<property name="ext.lib.dir" value="../external"/>
-
- <!-- ===================================================================
-->
- <!-- Usage - print the usage -->
- <!-- ====================================================================
-->
- <target name="usage">
- <echo message=""/>
- <echo message=""/>
- <echo message="WSM DRT Build file"/>
- <echo
message="================================================================"/>
- <echo message="| Usage
|"/>
- <echo
message="================================================================"/>
- <echo
message="----------------------------------------------------------------"/>
- <echo message="| Standard Targets
|"/>
- <echo
message="----------------------------------------------------------------"/>
- <echo message="clean - Delete the junit classes."/>
- <echo message="build - build the junit classes."/>
- <echo
message="----------------------------------------------------------------"/>
- </target>
+
<fileset id="axis.jars" dir="${ext.lib.dir}">
<include name="wsdl4j.jar"/>
<include name="saaj.jar"/>
@@ -47,6 +30,7 @@
<include name="axis-ant.jar"/>
<include name="axis.jar"/>
</fileset>
+
<path id="drt.classpath">
<pathelement location="${junit.jar}"/>
<pathelement location="${tools.jar}"/>
@@ -59,25 +43,50 @@
<pathelement location="../build/jars/wsm.jar"/>
<pathelement location="../build/jars/wsm-axis.jar"/>
<pathelement location="${velocity14.jar}"/>
- <pathelement location="${velocitydep14.jar}"/>
+ <pathelement location="${velocitydep14.jar}"/>
<fileset refid="axis.jars"/>
</path>
- <target name="clean">
- <delete dir="${build.dir}"/>
- <delete dir="${drt.logs}"/>
- <delete>
- <fileset dir="${tests.src}" includes="*.class"/>
- </delete>
+
+ <target name="usage">
+ <echo message=""/>
+ <echo message=""/>
+ <echo message="wsm drt"/>
+ <echo
message="================================================================"/>
+ <echo message="| Usage
|"/>
+ <echo
message="================================================================"/>
+ <echo
message="----------------------------------------------------------------"/>
+ <echo message="| Standard Targets
|"/>
+ <echo
message="----------------------------------------------------------------"/>
+ <echo message="build - Build all classes needed for running the
tests."/>
+ <echo message="clean - Delete all classes needed for running the
tests."/>
+ <echo message="run.drt - Run the drts."/>
+ <echo message="drt - Run 'clean', 'build' and then 'run.drt'."/>
+ <echo
message="----------------------------------------------------------------"/>
+ </target>
+
+ <target name="drt">
+ <echo message="--------------------------------------------------"/>
+ <echo message="| WSM drt starting |"/>
+ <echo message="--------------------------------------------------"/>
+ <antcall target="clean"/>
+ <antcall target="build"/>
+ <antcall target="run.drt"/>
+ <echo message="--------------------------------------------------"/>
+ <echo message="| WSM drt ending |"/>
+ <echo message="--------------------------------------------------"/>
</target>
+
+ <target name="build" depends="dirs,build-tests,build.webapp"/>
+
+ <target name="clean" depends="clean-tests,clean.webapp" />
+
<target name="dirs">
<mkdir dir="${build.classes}"/>
<mkdir dir="${build.tests}"/>
<mkdir dir="${build.jars}"/>
<mkdir dir="${drt.logs}"/>
</target>
- <target name="build" depends="dirs">
- <ant target="build-tests"/>
- </target>
+
<target name="build-tests" depends="dirs,xbean">
<!-- Build the test source directory -->
<javac srcdir="${tests.src}"
@@ -92,6 +101,29 @@
<fileset dir="${tests.src}" includes="**/*.xml"/>
</copy>
</target>
+
+ <target name="clean-tests">
+ <delete dir="${build.dir}"/>
+ <delete dir="${drt.logs}"/>
+ <delete>
+ <fileset dir="${tests.src}" includes="*.class"/>
+ </delete>
+ </target>
+
+ <target name="build.webapp">
+ <ant target="deploy.wsm.webapp.runtime"
dir="${os.BEEHIVE_HOME}/test/ant" antfile="buildWebapp.xml" inheritAll="false">
+ <property name="webapp.dir" value="${webapp.dir}"/>
+ </ant>
+ <ant target="build.webapp" dir="${os.BEEHIVE_HOME}/test/ant"
antfile="buildWebapp.xml" inheritAll="false">
+ <property name="webapp.dir" value="${webapp.dir}"/>
+ </ant>
+ </target>
+
+ <target name="clean.webapp">
+ <ant target="clean.webapp" dir="${os.BEEHIVE_HOME}/test/ant"
antfile="buildWebapp.xml" inheritAll="false">
+ <property name="webapp.dir" value="${webapp.dir}"/>
+ </ant>
+ </target>
<target name="xbean">
<!-- XMLBean build -->
@@ -111,12 +143,13 @@
</xmlbeanbuild>
</target>
- <target name="run-drt">
+ <target name="run.drt">
<echo message="** junit logfiles written to ${drt.logs} **"/>
<junit failureproperty="wsmdrtfailed" printsummary="on"
tempdir="${build.dir}" fork="yes">
<classpath>
<pathelement location="${build.tests}"/>
<path refid="drt.classpath"/>
+ <pathelement location="${webapp.dir}/WEB-INF/classes"/>
</classpath>
<formatter type="plain"/>
<batchtest filtertrace="off" todir="${drt.logs}">
@@ -127,37 +160,27 @@
</fileset>
</batchtest>
</junit>
- <fail if="wsmdrtfailed">One or more tests in the WSM DRT failed.</fail>
- </target>
- <target name="drt">
- <echo message="--------------------------------------------------"/>
- <echo message="| WSM drt starting |"/>
- <echo message="--------------------------------------------------"/>
- <antcall target="clean"/>
- <antcall target="build-tests"/>
- <antcall target="run-drt"/>
- <echo message="--------------------------------------------------"/>
- <echo message="| WSM drt ending |"/>
- <echo message="--------------------------------------------------"/>
+ <fail if="wsmdrtfailed" message="One or more tests in the WSM DRT
failed." />
</target>
-
- <target name="single-test" depends="build">
- <junit failureproperty="wsmdrtfailed" printsummary="on"
fork="yes">
- <classpath>
- <pathelement location="${build.tests}"/>
- <path refid="drt.classpath"/>
- </classpath>
- <formatter type="plain"/>
- <batchtest filtertrace="off" todir="${drt.logs}">
- <fileset dir="tests">
- <include name="**/${testclass}.java"/> <!--
-Dtestclass=xxxxx must be set in the command line -->
- <!-- exclude name="**/util/**.class" / -->
- <!-- exclude name="**/AllTests.class" / -->
- </fileset>
- </batchtest>
- </junit>
- <fail if="wsmdrtfailed">One or more tests in the WSM DRT
failed.</fail>
- </target>
+ <target name="single-test" depends="build">
+ <junit failureproperty="wsmdrtfailed" printsummary="on" fork="yes">
+ <classpath>
+ <pathelement location="${build.tests}"/>
+ <pathelement location="${build.tests}"/>
+ <path refid="drt.classpath"/>
+ </classpath>
+ <formatter type="plain"/>
+ <batchtest filtertrace="off" todir="${drt.logs}">
+ <fileset dir="tests">
+ <include name="**/${testclass}.java"/>
+ <!-- -Dtestclass=xxxxx must be set in the command line -->
+ <!-- exclude name="**/util/**.class" / -->
+ <!-- exclude name="**/AllTests.class" / -->
+ </fileset>
+ </batchtest>
+ </junit>
+ <fail if="wsmdrtfailed" message="One or more tests in the WSM DRT
failed." />
+ </target>
</project>
Deleted: /incubator/beehive/trunk/wsm/drt/tests/Bar.java
Url:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/Bar.java?view=auto&rev=124051
==============================================================================
Deleted: /incubator/beehive/trunk/wsm/drt/tests/Bar2.java
Url:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/Bar2.java?view=auto&rev=124051
==============================================================================
Deleted: /incubator/beehive/trunk/wsm/drt/tests/Bar3.java
Url:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/Bar3.java?view=auto&rev=124051
==============================================================================
Deleted: /incubator/beehive/trunk/wsm/drt/tests/Foo.java
Url:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/Foo.java?view=auto&rev=124051
==============================================================================
Modified:
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar2TestCase.java
Url:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar2TestCase.java?view=diff&rev=124052&p1=incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar2TestCase.java&r1=124051&p2=incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar2TestCase.java&r2=124052
==============================================================================
---
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar2TestCase.java
(original)
+++
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar2TestCase.java
Mon Jan 3 17:23:17 2005
@@ -31,8 +31,8 @@
* override the respective tests.
*/
public class Bar2TestCase extends TestCase {
- protected static final String CLASSNAME = "Bar2";
- protected static final String SRCFILENAME = "Bar2.java";
+ protected static final String CLASSNAME = "web.Bar2";
+ protected static final String SRCFILENAME = "web/Bar2.java";
protected AnnotationMetadata objectModel;
Modified:
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar3TestCase.java
Url:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar3TestCase.java?view=diff&rev=124052&p1=incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar3TestCase.java&r1=124051&p2=incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar3TestCase.java&r2=124052
==============================================================================
---
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar3TestCase.java
(original)
+++
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/Bar3TestCase.java
Mon Jan 3 17:23:17 2005
@@ -31,8 +31,8 @@
* override the respective tests.
*/
public class Bar3TestCase extends TestCase {
- protected static final String CLASSNAME = "Bar3";
- protected static final String SRCFILENAME = "Bar3.java";
+ protected static final String CLASSNAME = "web.Bar3";
+ protected static final String SRCFILENAME = "web/Bar3.java";
protected AnnotationMetadata objectModel;
Modified:
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java
Url:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java?view=diff&rev=124052&p1=incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java&r1=124051&p2=incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java&r2=124052
==============================================================================
---
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java
(original)
+++
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/BarTestCase.java
Mon Jan 3 17:23:17 2005
@@ -31,8 +31,8 @@
* override the respective tests.
*/
public class BarTestCase extends TestCase {
- protected static final String CLASSNAME = "Bar";
- protected static final String[] SRCFILENAMES = {"Bar.java", "Bar2.java",
"Bar3.java", "Cheetorama.java"};
+ protected static final String CLASSNAME = "web.Bar";
+ protected static final String[] SRCFILENAMES = {"web/Bar.java"};
protected AnnotationMetadata objectModel;
@@ -154,4 +154,4 @@
}
return null;
}
-}
\ No newline at end of file
+}
Modified:
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/FooTestCase.java
Url:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/FooTestCase.java?view=diff&rev=124052&p1=incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/FooTestCase.java&r1=124051&p2=incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/FooTestCase.java&r2=124052
==============================================================================
---
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/FooTestCase.java
(original)
+++
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/model/FooTestCase.java
Mon Jan 3 17:23:17 2005
@@ -1,126 +1,126 @@
-package org.apache.beehive.wsm.jsr181.model;
-
-/*
- * Copyright 2004 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * $Header:$
- */
-
-import junit.framework.TestCase;
-
-/**
- * This class serves as the base class for all TestCases based on Foo.java. It
- * verifies the values of all parameters in the object model defined in
Foo.java.
- * Default values are expected to be filled in. If a subclass can't fully
comply
- * with JSR-181 (e.g. if it can't fill in all default values) it needs to
- * override the respective tests.
- */
-public class FooTestCase extends TestCase {
- protected static final String CLASSNAME = "Foo";
- protected static final String SRCFILENAME = "Foo.java";
-
- protected AnnotationMetadata objectModel;
-
- public void testObjectModel() throws Exception {
- assertNotNull("Failed to retrieve object model;", objectModel);
- }
-
- public void testWebServiceAbacus() throws Exception {
- assertEquals("Invalid wsName;", "Abacus",
- ((Jsr181TypeMetadata) objectModel).getWsName());
-
- // todo test endpointInterface
-
- assertEquals("Invalid wsTargetNamespace;",
- "http://www.superflaco.com/AnnotationTest",
- ((Jsr181TypeMetadata) objectModel).getWsTargetNamespace());
- }
-
- public void testWebMethodGoLoco() throws Exception {
- Jsr181MethodMetadata method = getMethod("GoLoco");
- assertNotNull("Cannot find WebMethod GoLoco();", method);
- assertEquals("Invalid wmAction;", "LocoAction", method.getWmAction());
- assertFalse("Unexpected @Oneway;", method.isOneWay());
- assertEquals("Invalid wrName;", "result", method.getWrName());
- assertEquals("Invalid return type;",
- boolean.class,
- method.getJavaReturnType());
- }
-
- public void testWebMethodGoHome() throws Exception {
- Jsr181MethodMetadata method = getMethod("goHome");
- assertNotNull("Cannot find WebMethod goHome();", method);
- assertEquals("Invalid wmAction;", "", method.getWmAction());
- assertTrue("Cannot find @Oneway;", method.isOneWay());
- assertEquals("Unexpected @WebResult;", "result", method.getWrName());
- assertEquals("Unexpected return type;",
- void.class,
- method.getJavaReturnType());
- }
-
- public void testWebParamGoLocoFirst() throws Exception {
- final int paramNo = 0;
- Jsr181ParameterMetadata param = getParam("GoLoco", paramNo);
- assertNotNull("Cannot find first param for WebMethod GoLoco();",
param);
- assertEquals("Invalid wpName;", "level", param.getWpName());
- assertEquals("Invalid return type: " + param.getJavaType(),
- int.class,
- param.getJavaType());
- }
-
- public void testWebParamGoLocoSecond() throws Exception {
- final int paramNo = 1;
- Jsr181ParameterMetadata param = getParam("GoLoco", paramNo);
- assertNotNull("Cannot find second param for WebMethod GoLoco();",
param);
- assertEquals("Invalid wpName;", "detail", param.getWpName());
- assertEquals("Invalid return type: " + param.getJavaType(),
- String.class,
- param.getJavaType());
- }
-
- public void testWebParamGoHomeFirst() throws Exception {
- final int paramNo = 0;
- Jsr181ParameterMetadata param = getParam("goHome", paramNo);
- assertNotNull("Cannot find first param for method goHome();", param);
- assertEquals("Invalid wpName;", "when", param.getWpName());
- assertEquals("Invalid return type: " + param.getJavaType(),
- long.class,
- param.getJavaType());
- }
-
- protected Jsr181MethodMetadata getMethod(String methodName) {
- for (Jsr181MethodMetadata method : ((Jsr181TypeMetadata)
objectModel).getMethods()) {
- if (method.getWmOperationName().equals(methodName)) {
- return method;
- }
- }
- return null;
- }
-
- protected Jsr181ParameterMetadata getParam(String methodName, int pos) {
- for (Jsr181MethodMetadata method : ((Jsr181TypeMetadata)
objectModel).getMethods()) {
- if (method.getWmOperationName().equals(methodName)) {
- int i = 0;
- for (Jsr181ParameterMetadata param : method.getParams()) {
- if (i == pos) {
- return param;
- }
- i++;
- }
- }
- }
- return null;
- }
-}
\ No newline at end of file
+package org.apache.beehive.wsm.jsr181.model;
+
+/*
+ * Copyright 2004 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+import junit.framework.TestCase;
+
+/**
+ * This class serves as the base class for all TestCases based on Foo.java. It
+ * verifies the values of all parameters in the object model defined in
Foo.java.
+ * Default values are expected to be filled in. If a subclass can't fully
comply
+ * with JSR-181 (e.g. if it can't fill in all default values) it needs to
+ * override the respective tests.
+ */
+public class FooTestCase extends TestCase {
+ protected static final String CLASSNAME = "web.Foo";
+ protected static final String SRCFILENAME = "web/Foo.java";
+
+ protected AnnotationMetadata objectModel;
+
+ public void testObjectModel() throws Exception {
+ assertNotNull("Failed to retrieve object model;", objectModel);
+ }
+
+ public void testWebServiceAbacus() throws Exception {
+ assertEquals("Invalid wsName;", "Abacus",
+ ((Jsr181TypeMetadata) objectModel).getWsName());
+
+ // todo test endpointInterface
+
+ assertEquals("Invalid wsTargetNamespace;",
+ "http://www.superflaco.com/AnnotationTest",
+ ((Jsr181TypeMetadata) objectModel).getWsTargetNamespace());
+ }
+
+ public void testWebMethodGoLoco() throws Exception {
+ Jsr181MethodMetadata method = getMethod("GoLoco");
+ assertNotNull("Cannot find WebMethod GoLoco();", method);
+ assertEquals("Invalid wmAction;", "LocoAction", method.getWmAction());
+ assertFalse("Unexpected @Oneway;", method.isOneWay());
+ assertEquals("Invalid wrName;", "result", method.getWrName());
+ assertEquals("Invalid return type;",
+ boolean.class,
+ method.getJavaReturnType());
+ }
+
+ public void testWebMethodGoHome() throws Exception {
+ Jsr181MethodMetadata method = getMethod("goHome");
+ assertNotNull("Cannot find WebMethod goHome();", method);
+ assertEquals("Invalid wmAction;", "", method.getWmAction());
+ assertTrue("Cannot find @Oneway;", method.isOneWay());
+ assertEquals("Unexpected @WebResult;", "result", method.getWrName());
+ assertEquals("Unexpected return type;",
+ void.class,
+ method.getJavaReturnType());
+ }
+
+ public void testWebParamGoLocoFirst() throws Exception {
+ final int paramNo = 0;
+ Jsr181ParameterMetadata param = getParam("GoLoco", paramNo);
+ assertNotNull("Cannot find first param for WebMethod GoLoco();",
param);
+ assertEquals("Invalid wpName;", "level", param.getWpName());
+ assertEquals("Invalid return type: " + param.getJavaType(),
+ int.class,
+ param.getJavaType());
+ }
+
+ public void testWebParamGoLocoSecond() throws Exception {
+ final int paramNo = 1;
+ Jsr181ParameterMetadata param = getParam("GoLoco", paramNo);
+ assertNotNull("Cannot find second param for WebMethod GoLoco();",
param);
+ assertEquals("Invalid wpName;", "detail", param.getWpName());
+ assertEquals("Invalid return type: " + param.getJavaType(),
+ String.class,
+ param.getJavaType());
+ }
+
+ public void testWebParamGoHomeFirst() throws Exception {
+ final int paramNo = 0;
+ Jsr181ParameterMetadata param = getParam("goHome", paramNo);
+ assertNotNull("Cannot find first param for method goHome();", param);
+ assertEquals("Invalid wpName;", "when", param.getWpName());
+ assertEquals("Invalid return type: " + param.getJavaType(),
+ long.class,
+ param.getJavaType());
+ }
+
+ protected Jsr181MethodMetadata getMethod(String methodName) {
+ for (Jsr181MethodMetadata method : ((Jsr181TypeMetadata)
objectModel).getMethods()) {
+ if (method.getWmOperationName().equals(methodName)) {
+ return method;
+ }
+ }
+ return null;
+ }
+
+ protected Jsr181ParameterMetadata getParam(String methodName, int pos) {
+ for (Jsr181MethodMetadata method : ((Jsr181TypeMetadata)
objectModel).getMethods()) {
+ if (method.getWmOperationName().equals(methodName)) {
+ int i = 0;
+ for (Jsr181ParameterMetadata param : method.getParams()) {
+ if (i == pos) {
+ return param;
+ }
+ i++;
+ }
+ }
+ }
+ return null;
+ }
+}
Modified:
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorEndpointInterfaceTest.java
Url:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorEndpointInterfaceTest.java?view=diff&rev=124052&p1=incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorEndpointInterfaceTest.java&r1=124051&p2=incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorEndpointInterfaceTest.java&r2=124052
==============================================================================
---
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorEndpointInterfaceTest.java
(original)
+++
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorEndpointInterfaceTest.java
Mon Jan 3 17:23:17 2005
@@ -41,8 +41,8 @@
String[] _args = {
"-factory",
"org.apache.beehive.wsm.jsr181.processor.apt.WsmAnnotationProcessorFactory",
- "-AsrcPath=" + new java.io.File(BEEHIVE_HOME,
"/wsm/drt/tests/").getCanonicalPath(),
- new java.io.File(new java.io.File(BEEHIVE_HOME,
"/wsm/drt/tests/"),
+ "-AsrcPath=" + new java.io.File(BEEHIVE_HOME,
"/wsm/drt/webapp/WEB-INF/src").getCanonicalPath(),
+ new java.io.File(new java.io.File(BEEHIVE_HOME,
"/wsm/drt/webapp/WEB-INF/src"),
srcFilename).getCanonicalPath()
};
Modified:
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorTest.java
Url:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorTest.java?view=diff&rev=124052&p1=incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorTest.java&r1=124051&p2=incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorTest.java&r2=124052
==============================================================================
---
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorTest.java
(original)
+++
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/jsr181/processor/apt/WsmAnnotationProcessorTest.java
Mon Jan 3 17:23:17 2005
@@ -41,7 +41,7 @@
String[] _args = {
"-factory",
"org.apache.beehive.wsm.jsr181.processor.apt.WsmAnnotationProcessorFactory",
- new java.io.File(new java.io.File(BEEHIVE_HOME, "/wsm/drt/tests/"),
+ new java.io.File(new java.io.File(BEEHIVE_HOME,
"/wsm/drt/webapp/WEB-INF/src"),
SRCFILENAME).getCanonicalPath()
};
@@ -74,4 +74,4 @@
param.getJavaType());
}
*/
-}
\ No newline at end of file
+}
Copied: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Bar.java (from
r123133, incubator/beehive/trunk/wsm/drt/tests/Bar.java)
Url:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Bar.java?view=diff&rev=124052&p1=incubator/beehive/trunk/wsm/drt/tests/Bar.java&r1=123133&p2=incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Bar.java&r2=124052
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/Bar.java (original)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Bar.java Mon Jan
3 17:23:17 2005
@@ -1,3 +1,5 @@
+package web;
+
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
@@ -34,4 +36,4 @@
public int dropMoney(int amount) {
return amount;
}
-}
\ No newline at end of file
+}
Copied: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Bar2.java (from
r123133, incubator/beehive/trunk/wsm/drt/tests/Bar2.java)
Url:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Bar2.java?view=diff&rev=124052&p1=incubator/beehive/trunk/wsm/drt/tests/Bar2.java&r1=123133&p2=incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Bar2.java&r2=124052
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/Bar2.java (original)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Bar2.java Mon Jan
3 17:23:17 2005
@@ -1,3 +1,5 @@
+package web;
+
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
Copied: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Bar3.java (from
r123133, incubator/beehive/trunk/wsm/drt/tests/Bar3.java)
Url:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Bar3.java?view=diff&rev=124052&p1=incubator/beehive/trunk/wsm/drt/tests/Bar3.java&r1=123133&p2=incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Bar3.java&r2=124052
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/Bar3.java (original)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Bar3.java Mon Jan
3 17:23:17 2005
@@ -1,3 +1,5 @@
+package web;
+
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
Copied: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Foo.java (from
r123133, incubator/beehive/trunk/wsm/drt/tests/Foo.java)
Url:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Foo.java?view=diff&rev=124052&p1=incubator/beehive/trunk/wsm/drt/tests/Foo.java&r1=123133&p2=incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Foo.java&r2=124052
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/Foo.java (original)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src/web/Foo.java Mon Jan
3 17:23:17 2005
@@ -1,3 +1,5 @@
+package web;
+
/*
* Copyright 2001-2004 The Apache Software Foundation.
*