You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/08/04 17:32:54 UTC
svn commit: r227409 - in /incubator/beehive/trunk/wsm/drt: ./
tests/org/apache/beehive/wsm/axis/wsdl/ webapp/WEB-INF/src-ws/
webapp/WEB-INF/src-ws/oneway/ webapp/WEB-INF/src-ws/webmethod/
webapp/WEB-INF/src-ws/webservice/
Author: ekoneil
Date: Thu Aug 4 08:32:36 2005
New Revision: 227409
URL: http://svn.apache.org/viewcvs?rev=227409&view=rev
Log:
Add several request / response WSM tests that check the validity of WSDLs generated from Beehive WSM web services.
Contribution from Jeremiah Johnson. Changes from the original contribution:
- cleanup of drt/build.xml to remove a bunch of unnecessary Ant targets
- addition of a Util.java class that provides URLs of the webapp in which the Axis services run. This is needed in order to externalize the port / webapp name information into the Ant file. Adjusted the tests accordingly.
BB: self
DRT: WSM pass
Added:
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/OnewayTest.java (with props)
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/Util.java (with props)
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebMethodActionTest.java (with props)
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebMethodOperationNameTest.java (with props)
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceNameTest.java (with props)
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceServiceNameTest.java (with props)
incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceTargetNamespaceTest.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/WebServiceTargetNamespaceEmpty.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/WebServiceTargetNamespaceNotUsed.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/oneway/
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/oneway/NotUsed.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/oneway/Used.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionEmpty.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionNotUsed.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionUsed.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameEmpty.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameNotUsed.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameUsed.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameEmpty.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameNotUsed.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameUsed.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameEmpty.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameNotUsed.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameUsed.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceEmpty.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceNotUsed.java (with props)
incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceUsed.java (with props)
Modified:
incubator/beehive/trunk/wsm/drt/build.xml
Modified: incubator/beehive/trunk/wsm/drt/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/build.xml?rev=227409&r1=227408&r2=227409&view=diff
==============================================================================
--- incubator/beehive/trunk/wsm/drt/build.xml (original)
+++ incubator/beehive/trunk/wsm/drt/build.xml Thu Aug 4 08:32:36 2005
@@ -1,6 +1,21 @@
<?xml version="1.0" ?>
+<!--
+ Copyright 2004-2005 The Apache Software Foundation.
-<project name="wsmdrt" default="drt" basedir=".">
+ 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.
+-->
+
+<project name="Beehive/WSM/DRT" default="drt" basedir=".">
<import file="../../beehive-imports.xml"/>
<import file="../../ant/beehive-tools.xml"/>
@@ -19,6 +34,10 @@
<property name="ext.lib.dir" location="../external"/>
<property name="drt.wsdl.file" location="${drt.src}/org/apache/beehive/wsm/jsr181/wsdl/web/wsdl2javatest.wsdl"/>
+ <property name="server.root.url" value="http://localhost:8080"/>
+ <property name="webapp.name" value="wsmWeb"/>
+ <property name="webapp.waitfor.url" value="${server.root.url}/${webapp.name}"/>
+
<fileset id="axis.jars" dir="${ext.lib.dir}">
<include name="wsdl4j.jar"/>
<include name="saaj.jar"/>
@@ -63,6 +82,7 @@
<echo message="--------------------------------------------------"/>
<echo message="| WSM DRT starting |"/>
<echo message="--------------------------------------------------"/>
+ <antcall target="clean"/>
<antcall target="build"/>
<antcall target="run.drt"/>
<echo message="--------------------------------------------------"/>
@@ -72,7 +92,11 @@
<target name="build" depends="dirs,xbean,gen_wsdl2java_test,build.webapp,build.tests"/>
- <target name="clean" depends="clean.tests, clean.webapp"/>
+ <target name="clean" depends="clean.tests, clean.webapp">
+ <delete file="velocity.log"/>
+ <delete dir="${webapp.dir}/WEB-INF/attachments"/>
+ <delete dir="${webapp.dir}/WEB-INF/temp"/>
+ </target>
<target name="dirs">
<mkdir dir="${build.classes}"/>
@@ -101,16 +125,18 @@
<target name="clean.tests">
<delete dir="${build.dir}"/>
- <delete dir="${drt.logs}"/>
<delete>
<fileset dir="${drt.src}" includes="*.class"/>
</delete>
- <delete dir="${webapp.dir}/WEB-INF/temp"/>
</target>
<target name="build.webapp">
<deploy-wsm webappDir="${webapp.dir}"/>
<build-webapp webappDir="${webapp.dir}"/>
+ <build-webservices srcdir="${webapp.dir}/WEB-INF/src-ws"
+ destdir="${webapp.dir}/WEB-INF/classes"
+ tempdir="${webapp.dir}/WEB-INF/temp"
+ classpathref="drt.classpath"/>
</target>
<target name="clean.webapp">
@@ -148,21 +174,98 @@
<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}"/>
- <pathelement location="${build.gen-tests}"/>
- <path refid="drt.classpath"/>
- <pathelement location="${webapp.dir}/WEB-INF/classes"/>
- </classpath>
- <formatter type="plain"/>
- <batchtest filtertrace="off" todir="${drt.logs}">
- <fileset dir="tests">
- <include name="**/*Test.java"/>
- </fileset>
- </batchtest>
- </junit>
+ <parallel>
+ <start-server shmem="false" javaOptions=""/>
+ <sequential>
+ <antcall target="ensure.deployed"/>
+ <junit failureproperty="wsmdrtfailed" printsummary="on" tempdir="${build.dir}" fork="yes">
+ <sysproperty key="wsm.test.url" value="${webapp.waitfor.url}"/>
+ <formatter type="plain"/>
+ <classpath>
+ <pathelement location="${build.tests}"/>
+ <pathelement location="${build.gen-tests}"/>
+ <path refid="drt.classpath"/>
+ <pathelement location="${webapp.dir}/WEB-INF/classes"/>
+ </classpath>
+ <batchtest filtertrace="off" todir="${drt.logs}">
+ <fileset dir="tests">
+ <include name="**/*Test.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ <antcall target="undeploy"/>
+ <echo message="stopping Web container"/>
+ <stop-server />
+ </sequential>
+ </parallel>
<fail if="wsmdrtfailed" message="One or more tests in the WSM DRT failed."/>
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- -->
+ <!-- Targets for deploying the webapp on a server -->
+ <!-- -->
+ <!-- ================================================================ -->
+ <target name="deploy" description="Deploy webapp">
+ <deploy-webapp webappDir="${webapp.dir}" contextPath="${webapp.name}"/>
+ </target>
+
+ <target name="undeploy" description="Undeploy webapp">
+ <undeploy-webapp contextPath="${webapp.name}"/>
+ </target>
+
+ <target name="redeploy" description="Redeploy webapp">
+ <redeploy-webapp contextPath="${webapp.name}"/>
+ </target>
+
+ <!-- ================================================================ -->
+ <!-- -->
+ <!-- Targets for starting / stopping a server -->
+ <!-- -->
+ <!-- ================================================================ -->
+ <target name="start" description="Start server with asserts enabled for org.apache.beehive">
+ <start-server shmem="false" javaOptions="-ea:org.apache.beehive..."/>
+ </target>
+
+ <target name="stop" description="Stop server">
+ <stop-server/>
+ </target>
+
+ <!-- todo: this needs to compost down into buildWebapp.xml; until we're sure it works, it stays here -->
+ <target name="ensure.deployed" description="Deploy webapp for the test recorder">
+ <echo>Ensuring that the webapp ${webapp.name} is deployed on a running server at the url ${webapp.waitfor.url}</echo>
+
+ <waitfor maxwait="5" maxwaitunit="second" timeoutproperty="unavailable">
+ <http url="${webapp.waitfor.url}"/>
+ </waitfor>
+ <antcall target="do.deploy"/>
+ <antcall target="do.redeploy"/>
+ <fail if="still.unavailable" message="Couldn't find webapp with path ${webapp.waitfor.url}"/>
+ </target>
+
+ <target name="do.deploy" if="unavailable">
+ <echo>Webapp is not deployed; deploying</echo>
+
+ <antcall target="deploy"/>
+ <echo>...deploy complete</echo>
+
+ <waitfor maxwait="120" maxwaitunit="second" timeoutproperty="still.unavailable">
+ <http url="${webapp.waitfor.url}"/>
+ </waitfor>
+ </target>
+
+ <target name="do.redeploy" unless="unavailable">
+ <echo>Webapp is deployed; undeploy and redeploy</echo>
+
+ <antcall target="undeploy"/>
+ <echo>...undeploy complete</echo>
+
+ <antcall target="deploy"/>
+ <echo>...deploy complete</echo>
+
+ <waitfor maxwait="120" maxwaitunit="second" timeoutproperty="still.unavailable">
+ <http url="${webapp.waitfor.url}"/>
+ </waitfor>
</target>
</project>
Added: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/OnewayTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/OnewayTest.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/OnewayTest.java (added)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/OnewayTest.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2005 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.
+ */
+package org.apache.beehive.wsm.axis.wsdl;
+
+import java.util.List;
+import java.util.Map;
+import javax.wsdl.Definition;
+import javax.wsdl.Operation;
+import javax.wsdl.Port;
+import javax.wsdl.PortType;
+import javax.wsdl.Service;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit tests around the Oneway annotation.
+ * <p/>
+ * <em>Important Note:</em> this test only checks a minor part of the Oneway
+ * annotation. There are build-time checks that need to be tested in some way
+ * that are outside the scope of this test.
+ * </p>
+ * <p/>
+ * This test currently requires a running instance of the Web container. The
+ * root URL of the server is determined by the value of BASE_URL.
+ * </p>
+ */
+public class OnewayTest
+ extends TestCase {
+
+ /**
+ * Instance of the WSDL Reader used in the test methods; this is (re)set
+ * in the set up method.
+ */
+ private WSDLReader reader;
+
+ /**
+ * Prepare for testing by creating a new reader instance.
+ */
+ public void setUp() {
+ try {
+ reader = WSDLFactory.newInstance().newWSDLReader();
+ }
+ catch(Exception e) {
+ e.printStackTrace();
+ fail("failed to prepare WSDL reader for tests: " + e);
+ }
+ }
+
+ /**
+ * When the Oneway annotation is not used, the operation will have an
+ * output element even if the return on the actual method signature is
+ * void.
+ */
+ public void testNotUsed()
+ throws Exception {
+ Definition wsdl =
+ reader.readWSDL(null, Util.buildUrl("/oneway/NotUsed.jws?wsdl"));
+ assertOperationOutput(wsdl, true);
+ }
+
+ /**
+ * When the Oneway annotation is used, the operation will not have an
+ * output element.
+ */
+ public void testUsed()
+ throws Exception {
+ Definition wsdl =
+ reader.readWSDL(null, Util.buildUrl("/oneway/Used.jws?wsdl"));
+ assertOperationOutput(wsdl, false);
+ }
+
+ /**
+ * Assuming one service, port, and operation for the given WSDL, this
+ * verifies that the operation does or doesn't have an output element.
+ */
+ private static void assertOperationOutput(Definition wsdl,
+ boolean shouldHaveOutput) {
+ Map services = wsdl.getServices();
+ assertNotNull("services", services);
+ assertEquals(1, services.size());
+ Service service = (Service)services.values().toArray()[0];
+
+ Map ports = service.getPorts();
+ assertNotNull("ports", ports);
+ assertEquals(1, ports.size());
+ PortType portType =
+ ((Port)ports.values().toArray()[0]).getBinding().getPortType();
+
+ List<Operation> operations = portType.getOperations();
+ assertNotNull("operations", operations);
+ assertEquals(1, operations.size());
+
+ assertNotNull("input expected", operations.get(0).getInput());
+ if(shouldHaveOutput) {
+ assertNotNull("output expected", operations.get(0).getOutput());
+ }
+ else {
+ assertNull("output not expected", operations.get(0).getOutput());
+ }
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/OnewayTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/Util.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/Util.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/Util.java (added)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/Util.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005 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.
+ */
+package org.apache.beehive.wsm.axis.wsdl;
+
+/**
+ */
+final class Util {
+
+ private static final String KEY_WSM_TEST_URL = "wsm.test.url";
+
+ static final String getBaseUrl() {
+ String url = System.getProperty(KEY_WSM_TEST_URL);
+
+ if(url == null)
+ throw new IllegalStateException("Could not run WSM tests; the web service root URL was not found under the system property key '" + KEY_WSM_TEST_URL + "'");
+ else return url;
+ }
+
+ static final String buildUrl(String uri) {
+ return getBaseUrl() + uri;
+ }
+}
Propchange: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/Util.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebMethodActionTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebMethodActionTest.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebMethodActionTest.java (added)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebMethodActionTest.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2005 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.
+ */
+package org.apache.beehive.wsm.axis.wsdl;
+
+import java.util.List;
+import java.util.Map;
+import javax.wsdl.Binding;
+import javax.wsdl.BindingOperation;
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.extensions.soap.SOAPOperation;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit tests around the WebMethod action attribute.
+ * <p/>
+ * This test currently requires a running instance of the Web container. The
+ * root URL of the server is determined by the value of BASE_URL.
+ * </p>
+ */
+public class WebMethodActionTest
+ extends TestCase {
+
+ /**
+ * Instance of the WSDL Reader used in the test methods; this is (re)set
+ * in the set up method.
+ */
+ private WSDLReader reader;
+
+ /**
+ * Prepare for testing by creating a new reader instance.
+ */
+ public void setUp() {
+ try {
+ reader = WSDLFactory.newInstance().newWSDLReader();
+ }
+ catch(Exception e) {
+ e.printStackTrace();
+ fail("failed to prepare WSDL reader for tests: " + e);
+ }
+ }
+
+ /**
+ * When the action attribute is used but empty, the soapAction is also
+ * empty.
+ */
+ public void testEmpty()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/webmethod/ActionEmpty.jws?wsdl"));
+ assertSoapAction(wsdl, "");
+ }
+
+ /**
+ * When the action attribute is not used, the soapAction defaults to empty.
+ */
+ public void testNotUsed()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/webmethod/ActionNotUsed.jws?wsdl"));
+ assertSoapAction(wsdl, "");
+ }
+
+ /**
+ * When the action attribute is used, the soapAction gets the value in
+ * the attribute; in this case, the soapAction should be ActionUsed.
+ */
+ public void testUsed()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/webmethod/ActionUsed.jws?wsdl"));
+ assertSoapAction(wsdl, "ActionUsed");
+ }
+
+ /**
+ * Assuming one service, port, and operation for the given WSDL, this
+ * verifies that the soapAction is set as expected.
+ */
+ private static void assertSoapAction(Definition wsdl, String action) {
+ Map services = wsdl.getServices();
+ assertNotNull("services", services);
+ assertEquals(1, services.size());
+ Service service = (Service)services.values().toArray()[0];
+
+ Map ports = service.getPorts();
+ assertNotNull("ports", ports);
+ assertEquals(1, ports.size());
+ Binding binding = ((Port)ports.values().toArray()[0]).getBinding();
+
+ List<BindingOperation> operations = binding.getBindingOperations();
+ assertNotNull("operations", operations);
+ assertEquals(1, operations.size());
+
+ List extensibilityElements =
+ operations.get(0).getExtensibilityElements();
+ assertNotNull("extensibilityElements", extensibilityElements);
+ assertEquals(1, extensibilityElements.size());
+
+ assertTrue("SOAPOperation expected",
+ extensibilityElements.get(0) instanceof SOAPOperation);
+ assertEquals(action, ((SOAPOperation)extensibilityElements.get(0)).
+ getSoapActionURI());
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebMethodActionTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebMethodOperationNameTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebMethodOperationNameTest.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebMethodOperationNameTest.java (added)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebMethodOperationNameTest.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2005 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.
+ */
+package org.apache.beehive.wsm.axis.wsdl;
+
+import java.util.List;
+import java.util.Map;
+import javax.wsdl.Definition;
+import javax.wsdl.Operation;
+import javax.wsdl.Port;
+import javax.wsdl.PortType;
+import javax.wsdl.Service;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit tests around the WebMethod operationName attribute.
+ * <p/>
+ * This test currently requires a running instance of the Web container. The
+ * root URL of the server is determined by the value of BASE_URL.
+ * </p>
+ */
+public class WebMethodOperationNameTest
+ extends TestCase {
+
+ /**
+ * Instance of the WSDL Reader used in the test methods; this is (re)set
+ * in the set up method.
+ */
+ private WSDLReader reader;
+
+ /**
+ * Prepare for testing by creating a new reader instance.
+ */
+ public void setUp() {
+ try {
+ reader = WSDLFactory.newInstance().newWSDLReader();
+ }
+ catch(Exception e) {
+ e.printStackTrace();
+ fail("failed to prepare WSDL reader for tests: " + e);
+ }
+ }
+
+ /**
+ * When the operationName attribute is used but empty, the operation name
+ * should be the name of the method; in this case, the operation name
+ * should be method.
+ */
+ public void testEmpty()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/webmethod/OperationNameEmpty.jws?wsdl"));
+ assertOperationName(wsdl, "method");
+ }
+
+ /**
+ * When the operationName attribute is not used, the operation name
+ * should be the name of the method; in this case, the operation name
+ * should be method.
+ */
+ public void testNotUsed()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/webmethod/OperationNameNotUsed.jws?wsdl"));
+ assertOperationName(wsdl, "method");
+ }
+
+ /**
+ * When the operationName attribute is used, the operation name should
+ * be the name set in the attribute; in this case, the operation name
+ * should be OperationNameUsed.
+ */
+ public void testUsed()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/webmethod/OperationNameUsed.jws?wsdl"));
+ assertOperationName(wsdl, "OperationNameUsed");
+ }
+
+ /**
+ * Assuming one service, port, and operation for the given WSDL, this
+ * verifies that the operation name is set as expected.
+ */
+ private static void assertOperationName(Definition wsdl,
+ String operationName) {
+ Map services = wsdl.getServices();
+ assertNotNull("services", services);
+ assertEquals(1, services.size());
+ Service service = (Service)services.values().toArray()[0];
+
+ Map ports = service.getPorts();
+ assertNotNull("ports", ports);
+ assertEquals(1, ports.size());
+ PortType portType =
+ ((Port)ports.values().toArray()[0]).getBinding().getPortType();
+
+ List<Operation> operations = portType.getOperations();
+ assertNotNull("operations", operations);
+ assertEquals(1, operations.size());
+ assertEquals(operationName, operations.get(0).getName());
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebMethodOperationNameTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceNameTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceNameTest.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceNameTest.java (added)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceNameTest.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2005 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.
+ */
+package org.apache.beehive.wsm.axis.wsdl;
+
+import java.util.Map;
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.PortType;
+import javax.wsdl.Service;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit tests around the WebService name attribute.
+ * <p/>
+ * This test currently requires a running instance of a Web container. The
+ * root URL of the server is determined by the value of BASE_URL.
+ * </p>
+ */
+public class WebServiceNameTest
+ extends TestCase {
+
+ /**
+ * This constant carries the target namespace assumed by the Web services;
+ * current value is urn:jsr181-webservice.
+ */
+ private static final String TNS = "urn:jsr181-webservice";
+
+ /**
+ * Instance of the WSDL Reader used in the test methods; this is (re)set
+ * in the set up method.
+ */
+ private WSDLReader reader;
+
+ /**
+ * Prepare for testing by creating a new reader instance.
+ */
+ public void setUp() {
+ try {
+ reader = WSDLFactory.newInstance().newWSDLReader();
+ }
+ catch(Exception e) {
+ e.printStackTrace();
+ fail("failed to prepare WSDL reader for tests: " + e);
+ }
+ }
+
+ /**
+ * When the name attribute is used but empty, the portType should be the
+ * name of the class; in this case, the name should be NameEmpty.
+ */
+ public void testEmpty()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/webservice/NameEmpty.jws?wsdl"));
+ assertPortTypeName(wsdl, "NameEmpty");
+ }
+
+ /**
+ * When the name attribute is not used, the portType should be the name
+ * of the class; in this case, the name should be NameNotUsed.
+ */
+ public void testNotUsed()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/webservice/NameNotUsed.jws?wsdl"));
+ assertPortTypeName(wsdl, "NameNotUsed");
+ }
+
+ /**
+ * When the name attribute is used, the portType should be the name set
+ * in the attribute; in this case, the name should be NameUsed.
+ */
+ public void testUsed()
+ throws Exception {
+ Definition wsdl =
+ reader.readWSDL(null, Util.buildUrl("/webservice/NameUsed.jws?wsdl"));
+ assertPortTypeName(wsdl, "NameUsed");
+ }
+
+ /**
+ * Assuming one service and port for the given WSDL, this verifies that
+ * the port type name and namespace URI are set as expected.
+ */
+ private static void assertPortTypeName(Definition wsdl,
+ String portTypeName) {
+ Map services = wsdl.getServices();
+ assertNotNull("services", services);
+ assertEquals(1, services.size());
+ Service service = (Service)services.values().toArray()[0];
+
+ Map ports = service.getPorts();
+ assertNotNull("ports", ports);
+ assertEquals(1, ports.size());
+ PortType portType = ((Port)ports.values().toArray()[0]).getBinding().getPortType();
+
+ assertEquals(portTypeName, portType.getQName().getLocalPart());
+ assertEquals(TNS, portType.getQName().getNamespaceURI());
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceNameTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceServiceNameTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceServiceNameTest.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceServiceNameTest.java (added)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceServiceNameTest.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2005 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.
+ */
+package org.apache.beehive.wsm.axis.wsdl;
+
+import java.util.Map;
+import javax.wsdl.Definition;
+import javax.wsdl.Service;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit tests around the WebService serviceName attribute.
+ * <p/>
+ * This test currently requires a running instance of a Web container. The
+ * root URL of the server is determined by the value of BASE_URL.
+ * </p>
+ */
+public class WebServiceServiceNameTest
+ extends TestCase {
+
+ /**
+ * This constant carries the target namespace assumed by the Web services;
+ * current value is urn:wsmunit-WebService.
+ */
+ private static final String TNS = "urn:jsr181-webservice";
+
+ /**
+ * Instance of the WSDL Reader used in the test methods; this is (re)set
+ * in the set up method.
+ */
+ private WSDLReader reader;
+
+ /**
+ * Prepare for testing by creating a new reader instance.
+ */
+ public void setUp() {
+ try {
+ reader = WSDLFactory.newInstance().newWSDLReader();
+ }
+ catch(Exception e) {
+ e.printStackTrace();
+ fail("failed to prepare WSDL reader for tests: " + e);
+ }
+ }
+
+ /**
+ * When the serviceName attribute is used but empty, the service name
+ * should be name of the class with Service on the end; in this case,
+ * the service name should be ServiceNameEmptyService.
+ */
+ public void testEmpty()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/webservice/ServiceNameEmpty.jws?wsdl"));
+ assertServiceName(wsdl, "ServiceNameEmptyService");
+ }
+
+ /**
+ * When the service name attribute is not used, the service name should
+ * be the name of the class with Service on the end; in this case, the
+ * service name should be ServiceNameNotUsedService.
+ */
+ public void testNotUsed()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/webservice/ServiceNameNotUsed.jws?wsdl"));
+ assertServiceName(wsdl, "ServiceNameNotUsedService");
+ }
+
+ /**
+ * When the service name attribute is used, the service name should be
+ * the service name set in the attribute; in this case, the name should
+ * be ServiceNameUsed.
+ */
+ public void testUsed()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/webservice/ServiceNameUsed.jws?wsdl"));
+ assertServiceName(wsdl, "ServiceNameUsed");
+ }
+
+ /**
+ * Assuming one service for the given WSDL, this verifies that the
+ * service name is set as expected.
+ */
+ private static void assertServiceName(Definition wsdl,
+ String serviceName) {
+ Map services = wsdl.getServices();
+ assertNotNull("services", services);
+ assertEquals(1, services.size());
+ Service service = (Service)services.values().toArray()[0];
+
+ assertEquals(serviceName, service.getQName().getLocalPart());
+ assertEquals(TNS, service.getQName().getNamespaceURI());
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceServiceNameTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceTargetNamespaceTest.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceTargetNamespaceTest.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceTargetNamespaceTest.java (added)
+++ incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceTargetNamespaceTest.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2005 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.
+ */
+package org.apache.beehive.wsm.axis.wsdl;
+
+import javax.wsdl.Definition;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+
+import junit.framework.TestCase;
+
+/**
+ * Unit tests around the WebService targetNamespace attribute.
+ * <p/>
+ * This test currently requires a running instance of a Web container. The
+ * root URL of the server is determined by the value of BASE_URL.
+ * </p>
+ */
+public class WebServiceTargetNamespaceTest
+ extends TestCase {
+
+ /**
+ * Instance of the WSDL Reader used in the test methods; this is (re)set
+ * in the set up method.
+ */
+ private WSDLReader reader;
+
+ /**
+ * Prepare for testing by creating a new reader instance.
+ */
+ public void setUp() {
+ try {
+ reader = WSDLFactory.newInstance().newWSDLReader();
+ }
+ catch(Exception e) {
+ e.printStackTrace();
+ fail("failed to prepare WSDL reader for tests: " + e);
+ }
+ }
+
+ /**
+ * When the targetNamespace attribute is used but empty, the
+ * targetNamespace in the WSDL should default to http://{package};
+ * in this case it should be http://webservice.
+ */
+ public void testEmpty()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/webservice/TargetNamespaceEmpty.jws?wsdl"));
+ assertEquals("http://webservice", wsdl.getTargetNamespace());
+ }
+
+ /**
+ * When the targetNamespace attribute is used but empty, the
+ * targetNamespace in the WSDL should default to the http://{package}.
+ * <p/>
+ * If there is no package, then it defaults to http://{classname}; in
+ * this case, it should be http://WebServiceTargetNamespaceEmpty.
+ * </p>
+ */
+ public void testEmptyNoPackage()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/WebServiceTargetNamespaceEmpty.jws?wsdl"));
+ assertEquals("http://WebServiceTargetNamespaceEmpty",
+ wsdl.getTargetNamespace());
+ }
+
+ /**
+ * When the targetNamespace attribute is not used, the targetNamespace in
+ * the WSDL should default to http://{package}; in this case it should be
+ * http://webservice.
+ */
+ public void testNotUsed()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/webservice/TargetNamespaceNotUsed.jws?wsdl"));
+ assertEquals("http://webservice", wsdl.getTargetNamespace());
+ }
+
+ /**
+ * When the targetNamespace attribute is not used, the targetNamespace in
+ * the WSDL should default to the package name of the Web service.
+ * <p/>
+ * If there is no package, then the targetNamespace defaults to
+ * http://{classname}; in this case it would be
+ * http://WebServiceTargetNamespaceNotUsed.
+ * </p>
+ */
+ public void testNotUsedNoPackage()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/WebServiceTargetNamespaceNotUsed.jws?wsdl"));
+ assertEquals("http://WebServiceTargetNamespaceNotUsed",
+ wsdl.getTargetNamespace());
+ }
+
+ /**
+ * When the name attribute is used, the portType should be the name set
+ * in the attribute; in this case, the targetNamespace should be
+ * urn:jsr181-webservice.
+ */
+ public void testUsed()
+ throws Exception {
+ Definition wsdl = reader.readWSDL(null,
+ Util.buildUrl("/webservice/TargetNamespaceUsed.jws?wsdl"));
+ assertEquals("urn:jsr181-webservice", wsdl.getTargetNamespace());
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/tests/org/apache/beehive/wsm/axis/wsdl/WebServiceTargetNamespaceTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/WebServiceTargetNamespaceEmpty.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/WebServiceTargetNamespaceEmpty.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/WebServiceTargetNamespaceEmpty.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/WebServiceTargetNamespaceEmpty.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2005 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.
+ */
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * This Web service is part of a group of Web services used to test the
+ * targetNamespace member of the WebService annotation; the rest of the
+ * tests are in the webservice directory.
+ * <p/>
+ * The spec doesn't explicitly define what namespace should be used as the
+ * default if a Web service is in the default package. The current result
+ * is that the WSDL will use the Java class for the default. In this case,
+ * the WSDL will use the namespace http://WebServiceTargetNamespaceEmpty.
+ * </p>
+ */
+@WebService(targetNamespace = "")
+public class WebServiceTargetNamespaceEmpty {
+
+ @WebMethod
+ public int doSomething(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/WebServiceTargetNamespaceEmpty.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/WebServiceTargetNamespaceNotUsed.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/WebServiceTargetNamespaceNotUsed.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/WebServiceTargetNamespaceNotUsed.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/WebServiceTargetNamespaceNotUsed.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2005 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.
+ */
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * This Web service is part of a group of Web services used to test the
+ * targetNamespace member of the WebService annotation; the rest of the
+ * tests are in the webservice directory.
+ * <p/>
+ * The spec doesn't explicitly define what namespace should be used as the
+ * default if a Web service is in the default package. The current result
+ * is that the WSDL will use the Java class for the default. In this case,
+ * the WSDL will use the namespace http://WebServiceTargetNamespaceNotUsed.
+ * </p>
+ */
+@WebService
+public class WebServiceTargetNamespaceNotUsed {
+
+ @WebMethod
+ public int doSomething(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/WebServiceTargetNamespaceNotUsed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/oneway/NotUsed.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/oneway/NotUsed.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/oneway/NotUsed.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/oneway/NotUsed.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2005 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.
+ */
+package oneway;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * This is a simple Web service that defines a Web method and <em>doesn't</em>
+ * use the Oneway annotation.
+ * <p/>
+ * Notice that the return type of the method is void: this is not equivalent
+ * to a one-way Web method. The method in this Web service will have an
+ * output; whereas, a one-way Web method would not have an output.
+ * </p>
+ */
+@WebService(targetNamespace = "urn:jsr181-oneway")
+public class NotUsed {
+
+ @WebMethod
+ public void method(String param) {
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/oneway/NotUsed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/oneway/Used.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/oneway/Used.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/oneway/Used.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/oneway/Used.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2005 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.
+ */
+package oneway;
+
+import javax.jws.Oneway;
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * This is a simple Web service that defines a Web method using the Oneway
+ * annotation.
+ * <p/>
+ * The most obvious characteristic of a one-way Web method is that there will
+ * be no output element in the operation definition.
+ * </p>
+ */
+@WebService(targetNamespace = "urn:jsr181-oneway")
+public class Used {
+
+ @WebMethod
+ @Oneway
+ public void method(String param) {
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/oneway/Used.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionEmpty.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionEmpty.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionEmpty.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionEmpty.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2005 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.
+ */
+package webmethod;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * This is a simple Web service that defines a Web method using the action
+ * attribute in the WebMethod annotation, but the value is actually empty.
+ * <p/>
+ * It is expected that the soapAction in the WSDL will be "".
+ * </p>
+ */
+@WebService(targetNamespace = "urn:jsr181-webmethod")
+public class ActionEmpty {
+
+ @WebMethod(action = "")
+ public int method(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionEmpty.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionNotUsed.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionNotUsed.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionNotUsed.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionNotUsed.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2005 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.
+ */
+package webmethod;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * This is a simple Web service that defines a Web method and does <em>not</em>
+ * use the action member.
+ * <p/>
+ * The behavior defined in the spec is that the soapAction should be "".
+ * </p>
+ */
+@WebService(targetNamespace = "urn:jsr181-webmethod")
+public class ActionNotUsed {
+
+ @WebMethod
+ public int method(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionNotUsed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionUsed.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionUsed.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionUsed.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionUsed.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2005 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.
+ */
+package webmethod;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * This is a simple Web service that defines a Web method using the action
+ * member in the WebMethod annotation; the value of action is ActionUsed.
+ * <p/>
+ * An easy test of this service would be to check the WSDL and verify that
+ * the soapAction in the operation is ActionUsed. Notice that the service
+ * namespace is not involved.
+ * </p>
+ * <p/>
+ * Callers of the method should use the SOAPAction header. It is unclear
+ * what should happen if the caller doesn't provide the header or if the
+ * transport has been defined to be something other than HTTP.
+ * </p>
+ */
+@WebService(targetNamespace = "urn:jsr181-webmethod")
+public class ActionUsed {
+
+ @WebMethod(action = "ActionUsed")
+ public int method(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/ActionUsed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameEmpty.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameEmpty.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameEmpty.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameEmpty.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2005 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.
+ */
+package webmethod;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * The WebMethod annotation defines an optional operationName member;
+ * this simple Web service uses operationName, but leaves the value empty.
+ * <p/>
+ * This service and associated tests primarily exist to capture behavioral
+ * changes in the processing of the annotation: using operationName, but
+ * leaving it empty is not well defined in the spec. The current behavior is
+ * as if the operationName was not used at all: the operation name in the
+ * WSDL is the name of the Java method.
+ * </p>
+ */
+@WebService(targetNamespace = "urn:jsr181-webmethod")
+public class OperationNameEmpty {
+
+ @WebMethod(operationName = "")
+ public int method(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameEmpty.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameNotUsed.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameNotUsed.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameNotUsed.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameNotUsed.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2005 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.
+ */
+package webmethod;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * The WebMethod annotation defines an optional operationName member;
+ * this simple Web service does <em>use</em> the operationName.
+ * <p/>
+ * The expected result is that the operation name in the WSDL will be the
+ * name of the Java method.
+ * </p>
+ */
+@WebService(targetNamespace = "urn:jsr181-webmethod")
+public class OperationNameNotUsed {
+
+ @WebMethod
+ public int method(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameNotUsed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameUsed.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameUsed.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameUsed.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameUsed.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2005 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.
+ */
+package webmethod;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * The WebMethod annotation defines an optional operationName member;
+ * this simple Web service uses the operationName, setting it to
+ * OperationNameUsed.
+ * <p/>
+ * The expected result is that the operation name in the WSDL will be the
+ * OperationNameUsed.
+ * </p>
+ */
+@WebService(targetNamespace = "urn:jsr181-webmethod")
+public class OperationNameUsed {
+
+ @WebMethod(operationName = "OperationNameUsed")
+ public int method(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webmethod/OperationNameUsed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameEmpty.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameEmpty.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameEmpty.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameEmpty.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2005 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.
+ */
+package webservice;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * The WebService annotation defines a name member; this simple Web service
+ * uses the member, but leaves the value empty.
+ * <p/>
+ * The spec isn't explicit about behavior when the value is blank, but the
+ * current behavior is that the name takes the default value which is the
+ * name of the Java class or interface. In this case, the name on the
+ * portType in the WSDL should be NameEmpty.
+ * </p>
+ */
+@WebService(name = "", targetNamespace = "urn:jsr181-webservice")
+public class NameEmpty {
+
+ @WebMethod
+ public int method(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameEmpty.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameNotUsed.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameNotUsed.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameNotUsed.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameNotUsed.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2005 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.
+ */
+package webservice;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * The name member of the WebService annotation is not used in this case, so
+ * the portType in the WSDL for this service should be NameNotUsed.
+ */
+@WebService(targetNamespace = "urn:jsr181-webservice")
+public class NameNotUsed {
+
+ @WebMethod
+ public int method(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameNotUsed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameUsed.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameUsed.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameUsed.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameUsed.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2005 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.
+ */
+package webservice;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * This minimal Web service exists to verify behavior of the name member
+ * of the WebService annotation.
+ * <p/>
+ * The value of the member is set to NameUsed and that should then be found
+ * in the portType in the WSDL.
+ * </p>
+ */
+@WebService(name = "NameUsed", targetNamespace = "urn:jsr181-webservice")
+public class NameUsed {
+
+ @WebMethod
+ public int method(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/NameUsed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameEmpty.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameEmpty.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameEmpty.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameEmpty.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2005 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.
+ */
+package webservice;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * This simple Web service is to verify the behavior of the serviceName
+ * member of the WebService annotation; in this case the value of the member
+ * is left empty.
+ * <p/>
+ * The current behavior is that the default value of Java class + "Service"
+ * is expected as the value of service in the WSDL.
+ * </p>
+ */
+@WebService(serviceName = "", targetNamespace = "urn:jsr181-webservice")
+public class ServiceNameEmpty {
+
+ @WebMethod
+ public int method(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameEmpty.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameNotUsed.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameNotUsed.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameNotUsed.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameNotUsed.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2005 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.
+ */
+package webservice;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * This simple Web service is to serve as a comparison for services using
+ * the service member in the WebService annotation; the serviceName member
+ * is not actually used in this service.
+ * <p/>
+ * The expected result is the the service element in the WSDL will get the
+ * default value of Java class + "Service", so in the case of the WSDL
+ * representing this service it would be ServiceNameNotUsedService.
+ * </p>
+ */
+@WebService(targetNamespace = "urn:jsr181-webservice")
+public class ServiceNameNotUsed {
+
+ @WebMethod
+ public int method(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameNotUsed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameUsed.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameUsed.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameUsed.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameUsed.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2005 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.
+ */
+package webservice;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * This simple Web service exists as a baseline test for the serviceName
+ * member on the WebService annotation; the serviceName value is set to
+ * ServiceNameUsed.
+ * <p/>
+ * The expected result is that the service element will carry the value of
+ * ServiceNameUsedService.
+ * </p>
+ */
+@WebService(serviceName = "ServiceNameUsed",
+ targetNamespace = "urn:jsr181-webservice")
+public class ServiceNameUsed {
+
+ @WebMethod
+ public int method(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/ServiceNameUsed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceEmpty.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceEmpty.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceEmpty.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceEmpty.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2005 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.
+ */
+package webservice;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * This Web service exists to expose the behavior of using the
+ * targetNamespace member of the WebService annotation, but leaving the
+ * value empty.
+ * <p/>
+ * The result is the same as the default defined in the spec: the target
+ * namespace will pick up the package from the containing Web service. In
+ * this case, the WSDL will show a target namespace of http://webservice.
+ * </p>
+ */
+@WebService(targetNamespace = "")
+public class TargetNamespaceEmpty {
+
+ @WebMethod
+ public int method(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceEmpty.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceNotUsed.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceNotUsed.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceNotUsed.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceNotUsed.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2005 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.
+ */
+package webservice;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * This Web service exists to expose the behavior of <em>not</em> using
+ * the targetNamespace member of the WebService annotation.
+ * <p/>
+ * The target namespace will pick up the package from the containing Web
+ * service. In this case, the WSDL will use a target namespace of
+ * http://webservice.
+ * </p>
+ */
+@WebService
+public class TargetNamespaceNotUsed {
+
+ @WebMethod
+ public int method(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceNotUsed.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceUsed.java
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceUsed.java?rev=227409&view=auto
==============================================================================
--- incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceUsed.java (added)
+++ incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceUsed.java Thu Aug 4 08:32:36 2005
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2005 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.
+ */
+package webservice;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+/**
+ * This minimal Web service serves as a baseline test of the targetNamespace
+ * member of the WebService annotation; it is used with a value of
+ * urn:jsr181-webservice.
+ */
+@WebService(targetNamespace = "urn:jsr181-webservice")
+public class TargetNamespaceUsed {
+
+ @WebMethod
+ public int method(String param) {
+ return 0;
+ }
+
+}
Propchange: incubator/beehive/trunk/wsm/drt/webapp/WEB-INF/src-ws/webservice/TargetNamespaceUsed.java
------------------------------------------------------------------------------
svn:eol-style = native