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/09/30 04:42:29 UTC
svn commit: r292603 - in /beehive/trunk/wsm: ./
src/axis/org/apache/beehive/wsm/axis/
src/axis/org/apache/beehive/wsm/axis/controls/
src/axis/org/apache/beehive/wsm/axis/handlers/
src/core/org/apache/beehive/wsm/model/jsr181/ src/core/org/apache/beehiv...
Author: ekoneil
Date: Thu Sep 29 19:42:04 2005
New Revision: 292603
URL: http://svn.apache.org/viewcvs?rev=292603&view=rev
Log:
WSM work.
- fixes the control instantiation issues described in BEEHIVE-804. I've made some changes from the original patch to repackgae the controls dependent code into its own "controls" package. This necessitated changing some of the package protected methods / constructors to public. Patch from Chad Schoettger.
- added a manual test for the above. automation would come next and will use Axis clients to invoke and parse the SOAP result from the web service
- change also does a bunch of cleanup and re-org of the WSM test infrastructure. There is now a standalone web application build file that no longer depends on Page Flow among lots of other small changes / cleanups / tweaks.
BB: self
Test: WSM pass
Added:
beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/WsmApplicationListener.java (with props)
beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/WsmSessionListener.java (with props)
beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/
beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/ControlProvider.java (contents, props changed)
- copied, changed from r292004, beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ControlProvider.java
beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/ControlProviderUtils.java (with props)
beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/WebServiceControlContainerContext.java (with props)
beehive/trunk/wsm/test/tests/org/apache/beehive/wsm/test/controls/
beehive/trunk/wsm/test/tests/org/apache/beehive/wsm/test/controls/SimpleControlsTest.java (with props)
beehive/trunk/wsm/test/webapp/WEB-INF/schemas/
beehive/trunk/wsm/test/webapp/WEB-INF/schemas/starwars.wsdl
- copied unchanged from r292004, beehive/trunk/wsm/test/tests/schemas/starwars.wsdl
beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/webservice/ControlTestService.java (with props)
beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/beans/
beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/beans/ModeratelyComplexObject.java (contents, props changed)
- copied, changed from r292004, beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/ModeratelyComplexObject.java
beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/exceptions/
beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/exceptions/ComplexUserDefinedException.java (contents, props changed)
- copied, changed from r292004, beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/ComplexUserDefinedException.java
beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/exceptions/SimpleUserDefinedException.java (contents, props changed)
- copied, changed from r292004, beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/SimpleUserDefinedException.java
beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/test/
beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/test/controls/
beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/test/controls/hello/
beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/test/controls/hello/HelloControl.java (with props)
beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/test/controls/hello/HelloControlImpl.java (with props)
beehive/trunk/wsm/test/webapp/build.xml (with props)
Removed:
beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ControlProvider.java
beehive/trunk/wsm/test/tests/schemas/
beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/ComplexUserDefinedException.java
beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/ModeratelyComplexObject.java
beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/SimpleUserDefinedException.java
Modified:
beehive/trunk/wsm/build.xml
beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/AxisHook.java
beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/handlers/AnnotatedWebServiceDeploymentHandler.java
beehive/trunk/wsm/src/core/org/apache/beehive/wsm/model/jsr181/Jsr181ObjectModelStore.java
beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessor.java
beehive/trunk/wsm/test/build.xml
beehive/trunk/wsm/test/tests/org/apache/beehive/wsm/axis/handlers/FaultTest.java
beehive/trunk/wsm/test/webapp/WEB-INF/server-config.wsdd
beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/webservice/NameEmpty.java
beehive/trunk/wsm/test/webapp/WEB-INF/src/Cheetorama.java
beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/FakeDocWebService.jws
beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/FakeWebService.jws
beehive/trunk/wsm/test/webapp/WEB-INF/src/web/Bar.jws
beehive/trunk/wsm/test/webapp/WEB-INF/src/web/Bar3.jws
beehive/trunk/wsm/test/webapp/WEB-INF/src/web/Foo.jws
Modified: beehive/trunk/wsm/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/build.xml?rev=292603&r1=292602&r2=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/build.xml (original)
+++ beehive/trunk/wsm/build.xml Thu Sep 29 19:42:04 2005
@@ -51,6 +51,7 @@
<path refid="junit.dependency.path"/>
<path refid="tools.dependency.path"/>
<path refid="ant-jar.dependency.path"/>
+ <path refid="servlet.dependency.path"/>
<path refid="commons-codec.dependency.path"/>
<pathelement location="${api.classes}"/>
<pathelement location="${jars.dir}/beehive-wsdltypes.jar"/>
Modified: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/AxisHook.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/AxisHook.java?rev=292603&r1=292602&r2=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/AxisHook.java (original)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/AxisHook.java Thu Sep 29 19:42:04 2005
@@ -67,9 +67,6 @@
import org.apache.xmlbeans.XmlObject;
/**
- * ****************************************************************************
- *
- * @author Jonathan Colwell
*/
public class AxisHook {
@@ -80,10 +77,7 @@
JavaServiceDesc sd = new JavaServiceDesc();
if(null == cl) {
- /*
- * NOTE jcolwell@bea.com 2004-Aug-30 -- if no classloader was
- * provided, use the one that loaded this Class
- */
+ // If no classloader was provided, use the one that loaded this Class
cl = AxisHook.class.getClassLoader();
}
final Class serviceClass = cl.loadClass(wsm.getClassName());
Added: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/WsmApplicationListener.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/WsmApplicationListener.java?rev=292603&view=auto
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/WsmApplicationListener.java (added)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/WsmApplicationListener.java Thu Sep 29 19:42:04 2005
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.wsm.axis;
+
+import javax.xml.rpc.server.ServiceLifecycle;
+import javax.xml.rpc.ServiceException;
+
+import org.apache.beehive.wsm.axis.controls.ControlProviderUtils;
+
+/**
+ * Wrapper class a WSM service instance which implements the ServiceLifecycle
+ * interface. An instance of this class is stored in the AXIS engine's session
+ * for <i>application</i> scoped services. Necessary for cleanup of any controls in
+ * the service when the AXIS engine is shutdown.
+ */
+public class WsmApplicationListener
+ implements ServiceLifecycle {
+
+ private final Object _wsmInstance;
+
+ /**
+ * Create a new WsmApplicationListener.
+ * @param wsmInstance A wsm instance.
+ */
+ public WsmApplicationListener(Object wsmInstance) {
+ _wsmInstance = wsmInstance;
+ }
+
+ /**
+ *
+ * @param object
+ * @throws ServiceException
+ */
+ public void init(Object object)
+ throws ServiceException {
+ }
+
+ /**
+ * On destroy, perform any necessary controls cleanup.
+ */
+ public void destroy() {
+ ControlProviderUtils.uninitJavaControls(_wsmInstance);
+ }
+}
Propchange: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/WsmApplicationListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/WsmSessionListener.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/WsmSessionListener.java?rev=292603&view=auto
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/WsmSessionListener.java (added)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/WsmSessionListener.java Thu Sep 29 19:42:04 2005
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.wsm.axis;
+
+import javax.servlet.http.HttpSessionBindingListener;
+import javax.servlet.http.HttpSessionBindingEvent;
+
+import org.apache.beehive.wsm.axis.controls.ControlProviderUtils;
+
+/**
+ * Wrapper class a WSM service instance which implements the HttpSessionBindingListener
+ * interface. An instance of this class is stored in the AXIS session for session scoped
+ * services. Necessary for cleanup of any controls in the service when the session is
+ * invalidated.
+ */
+public class WsmSessionListener
+ implements HttpSessionBindingListener {
+
+ private final Object _wsmInstance;
+
+ /**
+ * Create a new WsmSessionListener.
+ * @param wsmInstance An instance of a wsm service.
+ */
+ public WsmSessionListener(Object wsmInstance) {
+ _wsmInstance = wsmInstance;
+ }
+
+ /**
+ * @param httpSessionBindingEvent
+ */
+ public void valueBound(HttpSessionBindingEvent httpSessionBindingEvent) {
+ // noop
+ }
+
+ /**
+ * Perform any necessary controls cleanup when invoked.
+ * @param httpSessionBindingEvent
+ */
+ public void valueUnbound(HttpSessionBindingEvent httpSessionBindingEvent) {
+ ControlProviderUtils.uninitJavaControls(_wsmInstance);
+ }
+}
Propchange: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/WsmSessionListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/ControlProvider.java (from r292004, beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ControlProvider.java)
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/ControlProvider.java?p2=beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/ControlProvider.java&p1=beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ControlProvider.java&r1=292004&r2=292603&rev=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/ControlProvider.java (original)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/ControlProvider.java Thu Sep 29 19:42:04 2005
@@ -16,69 +16,82 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
- *
- * Original author: Jonathan Colwell
*/
-package org.apache.beehive.wsm.axis;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
+package org.apache.beehive.wsm.axis.controls;
import org.apache.axis.AxisFault;
+import org.apache.axis.Handler;
import org.apache.axis.MessageContext;
+import org.apache.axis.constants.Scope;
+import org.apache.axis.providers.java.JavaProvider;
import org.apache.axis.providers.java.RPCProvider;
-import org.apache.beehive.controls.api.bean.Control;
-import org.apache.beehive.controls.api.context.ControlBeanContext;
-import org.apache.beehive.controls.api.context.ControlContainerContext;
-import org.apache.beehive.controls.api.context.ControlThreadContext;
+import org.apache.beehive.wsm.axis.AxisFaultAdaptor;
/**
- *
+ * ControlProvider is the Axis provider for WSM, it is added as a pivot handler
+ * to the SOAPService installed by WSM.
*/
-public class ControlProvider extends RPCProvider {
+public class ControlProvider
+ extends RPCProvider {
+
+ private static final String SERVICE_INSTANCE = "wsm_service_instance";
- /* todo: perf. consider caching fields here */
+ /**
+ * Create a new WSM service, initialize any controls in the service.
+ * @param msgContext AXIS message context.
+ * @param clsName Name of web service class to instantiate.
+ * @return Instance of clsName.
+ * @throws Exception
+ */
protected Object makeNewServiceObject(MessageContext msgContext, String clsName)
throws Exception {
Object client = super.makeNewServiceObject(msgContext, clsName);
+ msgContext.setProperty(SERVICE_INSTANCE, client);
- Class clientClass = client.getClass();
-
- /* search for fields with @Control annotations */
- for(Field field : clientClass.getFields()) {
- if(null != field.getAnnotation(Control.class)) {
-
- /* attempt to instantiate a Beehive control using the control's ClientInitializer */
- ControlContainerContext ccc = ControlThreadContext.getContext();
- if(null == ccc)
- throw new Exception("no control container context found");
-
- Class clientInitializer = clientClass.getClassLoader().loadClass(clientClass.getName() + "ClientInitializer");
- Method init = clientInitializer.getMethod("initialize", ControlBeanContext.class, clientClass);
- /* note, the first parameter here is null because the
- ClientInitializer.initialize(...) method is static */
- init.invoke(null, ccc, client);
- }
- }
+ ControlProviderUtils.addServiceListener(msgContext, client);
+ ControlProviderUtils.initJavaControls(msgContext, client);
return client;
}
- public void invoke(MessageContext msgContext) throws AxisFault {
+
+ /**
+ * Invoke the WSM service.
+ * @param msgContext AXIS message context.
+ * @throws AxisFault
+ */
+ public void invoke(MessageContext msgContext)
+ throws AxisFault {
+
+ // initialize and begin the control context
+ ControlProviderUtils.initializeControlContext(msgContext);
+
try {
super.invoke(msgContext);
- } catch (AxisFault e) {
- // Before we get to here, Axis has converted all exceptions to the
- // AxisFaults.
- // A standard AxisFault wont serialize the exception correctly.
+ }
+ catch (AxisFault e) {
+ // Before we get to here, Axis has converted all exceptions to the AxisFaults.
+ // A standard AxisFault won't serialize the exception correctly.
// AxisFaultAdaptor is used to intercept the serialization process
- // and
- // "do the right thing"
+ // and "do the right thing"
Throwable origExp = e.detail;
+ // The original exception was AxisFault
if (origExp == null || origExp instanceof AxisFault || origExp instanceof RuntimeException)
- throw e; // The original exception was AxisFault
+ throw e;
// if we have a user defined exception then wrap it in an adaptor.
else throw new AxisFaultAdaptor(msgContext, origExp);
+ }
+ finally {
+ // clean up if this is a request scoped message
+ final Handler service = msgContext.getService();
+ final Scope scope = Scope.getScope((String) service.getOption(JavaProvider.OPTION_SCOPE), Scope.DEFAULT);
+ if (scope == Scope.REQUEST) {
+ if (msgContext.containsProperty(SERVICE_INSTANCE)) {
+ ControlProviderUtils.uninitJavaControls(msgContext.getProperty(SERVICE_INSTANCE));
+ msgContext.removeProperty(SERVICE_INSTANCE);
+ }
+ }
+ ControlProviderUtils.uninitializeControlContext(msgContext);
}
}
}
Propchange: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/ControlProvider.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/ControlProviderUtils.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/ControlProviderUtils.java?rev=292603&view=auto
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/ControlProviderUtils.java (added)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/ControlProviderUtils.java Thu Sep 29 19:42:04 2005
@@ -0,0 +1,348 @@
+/*
+ * 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:$
+ */
+package org.apache.beehive.wsm.axis.controls;
+
+import java.beans.beancontext.BeanContext;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+
+import org.apache.axis.AxisEngine;
+import org.apache.axis.Handler;
+import org.apache.axis.MessageContext;
+import org.apache.axis.handlers.soap.SOAPService;
+import org.apache.axis.constants.Scope;
+import org.apache.axis.i18n.Messages;
+import org.apache.axis.providers.java.JavaProvider;
+import org.apache.axis.session.Session;
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.bean.Controls;
+import org.apache.beehive.controls.api.context.ControlBeanContext;
+import org.apache.beehive.controls.api.properties.AnnotatedElementMap;
+import org.apache.beehive.controls.api.properties.PropertyMap;
+import org.apache.beehive.controls.runtime.bean.ControlBean;
+import org.apache.beehive.wsm.axis.WsmSessionListener;
+import org.apache.beehive.wsm.axis.WsmApplicationListener;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Utilities for the initialization of controls inside of a wsm service.
+ */
+public final class ControlProviderUtils {
+
+ private static final Log _log = LogFactory.getLog(ControlProviderUtils.class);
+ private static final String WSM_CONTROL_CONTEXT_CLASSNAME = WebServiceControlContainerContext.class.getName();
+ private static final String WSM_CONTROL_LISTENER_CLASSNAME = WsmSessionListener.class.getName();
+ private static final String WSM_APPLICATION_LISTENER_CLASSNAME = WsmApplicationListener.class.getName();
+
+ /**
+ * Map of control-container-class (e.g., wsm service instance) to Map of fields/control-properties.
+ */
+ private static HashMap<String, Map<Field, PropertyMap>> _controlFieldCache =
+ new HashMap<String, Map<Field, PropertyMap>>();
+
+ /**
+ * Initialize the a WebServiceControlContainerContext for the web service. A new bean context will be created
+ * if necesary. Depending on the scope of the web service, the bean context may be stored
+ * in the session or application. The bean context is also added to the MessageContext and
+ * may be accessed using the WSM_CONTROL_CONTEXT_CLASSNAME property id until
+ * uninitializeControlContext() has been invoked.
+ *
+ * @param msgContext AXIS message context.
+ */
+ static void initializeControlContext(MessageContext msgContext) {
+ ControlBeanContext beanContext = getControlBeanContext(msgContext, true);
+
+ // Start a new execution context
+ if (beanContext instanceof WebServiceControlContainerContext) {
+ ((WebServiceControlContainerContext) beanContext).beginContext();
+ }
+ }
+
+ /**
+ * End the current bean context, remove it from the MessageContext property set.
+ * If the web service was not request scoped the bean context remains in the
+ * appropriate session location.
+ *
+ * @param msgContext AXIS message context.
+ */
+ static void uninitializeControlContext(MessageContext msgContext) {
+ ControlBeanContext beanContext = getControlBeanContext(msgContext, false);
+
+ if (beanContext instanceof WebServiceControlContainerContext) {
+ ((WebServiceControlContainerContext) beanContext).endContext();
+ if (msgContext.containsProperty(WSM_CONTROL_CONTEXT_CLASSNAME)) {
+ msgContext.removeProperty(WSM_CONTROL_CONTEXT_CLASSNAME);
+ }
+ }
+ }
+
+ /**
+ * Initialize all null member variables that are Java Controls.
+ *
+ * @param msgContext AXIS message context.
+ * @param webService WSM service instance to initialize.
+ * @throws ClassNotFoundException If a control's ClientInitializer class cannot be found.
+ */
+ static void initJavaControls(MessageContext msgContext, Object webService)
+ throws ClassNotFoundException {
+
+ Class controlClientClass = webService.getClass();
+
+ // First, just return if there are no annotated Control fields. This saves us from having to catch a
+ // (wrapped) ClassNotFoundException for the control client initializer if we were to simply call
+ // Controls.initializeClient().
+ Map controlFields = getAccessibleControlFieldAnnotations(controlClientClass);
+ if (controlFields.isEmpty())
+ return;
+
+ ControlBeanContext beanContext = getControlBeanContext(msgContext, false);
+ assert beanContext != null : "ControlBeanContext was not initialized by wsm ControlProvider";
+ try {
+ Controls.initializeClient(null, webService, beanContext);
+ }
+ catch (ClassNotFoundException e) {
+ _log.error("Exception occurred while initializing controls", e);
+ throw new ClassNotFoundException(controlClientClass.getName(), e);
+ }
+ }
+
+ /**
+ * Clean up all member variables that are Java Controls.
+ *
+ * @param controlClient
+ */
+ public static void uninitJavaControls(Object controlClient) {
+ Map<Field, PropertyMap> controlFields = getAccessibleControlFieldAnnotations(controlClient.getClass());
+ for (Field controlField : controlFields.keySet()) {
+ try {
+ Object fieldValue = controlField.get(controlClient);
+
+ if (fieldValue != null) {
+ controlField.set(controlClient, null);
+ destroyControl(fieldValue);
+ }
+ }
+ catch (IllegalAccessException e) {
+ _log.error("Exception while uninitializing Java Control " + controlField.getName(), e);
+ }
+ }
+ }
+
+ /**
+ * Remove a control from its bean context.
+ *
+ * @param controlInstance Instance of control to remove.
+ */
+ static void destroyControl(Object controlInstance) {
+ assert controlInstance instanceof ControlBean : controlInstance.getClass().getName();
+ BeanContext beanContext = ((ControlBean) controlInstance).getBeanContext();
+ if (beanContext != null)
+ beanContext.remove(controlInstance);
+ }
+
+ /**
+ * Attach a wrapper for the web service instance if it is a session or appliacation scoped service.
+ * The wrapper listens for session invalidate events and performs necessary control cleanup for the service.
+ *
+ * @param msgContext AXIS message context.
+ * @param wsmService WSM web service instance.
+ */
+ static void addServiceListener(MessageContext msgContext, Object wsmService) {
+ final Handler service = msgContext.getService();
+ final Scope scope = Scope.getScope((String) service.getOption(JavaProvider.OPTION_SCOPE), Scope.DEFAULT);
+
+ if (scope == Scope.SESSION) {
+ Session session = msgContext.getSession();
+ if (session != null)
+ session.set(WSM_CONTROL_LISTENER_CLASSNAME, new WsmSessionListener(wsmService));
+ }
+ else if (scope == Scope.APPLICATION) {
+ AxisEngine engine = msgContext.getAxisEngine();
+ Session appSession = engine.getApplicationSession();
+ if (appSession != null)
+ appSession.set(WSM_APPLICATION_LISTENER_CLASSNAME, new WsmApplicationListener(wsmService));
+ }
+ else assert false : "Found unsupported service scope";
+ }
+
+
+ /**
+ * Get or create a ControlBeanContext from the msgContext.
+ *
+ * @param msgContext AXIS message context.
+ * @param createIfMissing Should the bean context be created if it does not already exist?
+ * @return ControlBeanContext
+ */
+ private static ControlBeanContext getControlBeanContext(MessageContext msgContext, boolean createIfMissing) {
+ // is there already a bean context attached to the msgContext -- if so use it
+ if (msgContext.containsProperty(WSM_CONTROL_CONTEXT_CLASSNAME))
+ return (ControlBeanContext) msgContext.getProperty(WSM_CONTROL_CONTEXT_CLASSNAME);
+
+ // get the scope of the request so we know where to look for the bean context.
+ // scope can be "Request", "Session", "Application", "Factory"
+ final Handler service = msgContext.getService();
+ final Scope scope = Scope.getScope((String) service.getOption(JavaProvider.OPTION_SCOPE), Scope.DEFAULT);
+
+ ControlBeanContext beanContext = null;
+
+ if (scope == Scope.REQUEST) {
+ if (createIfMissing) {
+ // just create a new BeanContext
+ beanContext = createControlBeanContext();
+ }
+ } else if (scope == Scope.SESSION) {
+ Session session = msgContext.getSession();
+ if (session != null)
+ beanContext = getSessionBeanContext(session, createIfMissing);
+ else {
+ // session is null just create a request scope bean context
+ if (createIfMissing) {
+ beanContext = createControlBeanContext();
+ service.setOption(JavaProvider.OPTION_SCOPE, Scope.REQUEST_STR);
+ }
+ }
+
+ } else if (scope == Scope.APPLICATION) {
+ beanContext = getApplicationBeanContext(msgContext, createIfMissing);
+ } else if (scope == Scope.FACTORY) {
+ String objectID = msgContext.getStrProp("objectID");
+ if (objectID == null) {
+ // if no OID, treat as application scoped request
+ service.setOption(JavaProvider.OPTION_SCOPE, Scope.APPLICATION_STR);
+ return getApplicationBeanContext(msgContext, createIfMissing);
+ } else {
+ SOAPService svc = (SOAPService)service;
+ beanContext = (ControlBeanContext)svc.getOption(objectID + "_" + WSM_CONTROL_CONTEXT_CLASSNAME);
+ if (beanContext == null && createIfMissing) {
+ beanContext = createControlBeanContext();
+ svc.setOption(objectID + "_" + WSM_CONTROL_CONTEXT_CLASSNAME, beanContext);
+ }
+ }
+ }
+
+ if (beanContext != null) {
+ msgContext.setProperty(WSM_CONTROL_CONTEXT_CLASSNAME, beanContext);
+ }
+
+ return beanContext;
+ }
+
+ /**
+ * Get an application scoped bean context, store the bean context in the application's session.
+ * If the application's session does not exist treat this as a request scoped context.
+ *
+ * @param msgContext AXIS message context.
+ * @param createIfMissing Should the bean context be created if it does not already exist?
+ * @return ControlBeanContext.
+ */
+ private static ControlBeanContext getApplicationBeanContext(MessageContext msgContext, boolean createIfMissing)
+ {
+ ControlBeanContext beanContext = null;
+ AxisEngine engine = msgContext.getAxisEngine();
+ Session appSession = engine.getApplicationSession();
+
+ if (appSession != null) {
+ beanContext = getSessionBeanContext(appSession, createIfMissing);
+ } else if (createIfMissing) {
+ // was no application session - log an error and treat as request scope
+ _log.error(Messages.getMessage("noAppSession"));
+ beanContext = createControlBeanContext();
+ Handler service = msgContext.getService();
+ service.setOption(JavaProvider.OPTION_SCOPE, Scope.REQUEST_STR);
+ }
+
+ return beanContext;
+ }
+
+ /**
+ * Get a bean context for a session scoped request.
+ *
+ * @param session Session to find/store the bean context in.
+ * @param createIfMissing Should the bean context be created if it does not already exist?
+ * @return ControlBeanContext
+ */
+ private static ControlBeanContext getSessionBeanContext(Session session, boolean createIfMissing) {
+ assert session != null : "session is null!";
+
+ ControlBeanContext beanContext = (ControlBeanContext) session.get(WSM_CONTROL_CONTEXT_CLASSNAME);
+ if (beanContext == null && createIfMissing) {
+ beanContext = createControlBeanContext();
+ session.set(WSM_CONTROL_CONTEXT_CLASSNAME, beanContext);
+ }
+ return beanContext;
+ }
+
+ /**
+ * Get a new bean context.
+ *
+ * @return ControlBeanContext
+ */
+ private static ControlBeanContext createControlBeanContext() {
+ return new WebServiceControlContainerContext();
+ }
+
+ /**
+ * @return a map of Field (accessible) -> AnnotationMap
+ */
+ private static Map<Field, PropertyMap> getAccessibleControlFieldAnnotations(Class controlContainerClass) {
+ String className = controlContainerClass.getName();
+
+ // Reading the annotations is expensive. See if there's a cached copy of the map.
+ Map<Field, PropertyMap> cached = _controlFieldCache.get(className);
+
+ if (cached != null)
+ return cached;
+
+ HashMap<Field, PropertyMap> ret = new HashMap<Field, PropertyMap>();
+ boolean accessPrivateFields = true;
+
+ // Go through this class and all superclasses, looking for control fields. Make sure that a superclass control
+ // field never replaces a subclass control field (this is what the 'fieldNames' HashSet is for).
+ HashSet<String> fieldNames = new HashSet<String>();
+ do {
+
+ Field[] fields = controlContainerClass.getDeclaredFields();
+
+ for (Field field : fields) {
+ String fieldName = field.getName();
+ int modifiers = field.getModifiers();
+
+ if (!fieldNames.contains(fieldName) && !Modifier.isStatic(modifiers)
+ && field.getAnnotation(Control.class) != null)
+ {
+ if (accessPrivateFields || ! Modifier.isPrivate(modifiers)) {
+ if (! Modifier.isPublic(field.getModifiers())) field.setAccessible(true);
+ ret.put(field, new AnnotatedElementMap(field));
+ fieldNames.add(fieldName);
+ }
+ }
+ }
+
+ accessPrivateFields = false;
+ controlContainerClass = controlContainerClass.getSuperclass();
+ }
+ while (controlContainerClass != null);
+
+ _controlFieldCache.put(className, ret);
+ return ret;
+ }
+}
Propchange: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/ControlProviderUtils.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/WebServiceControlContainerContext.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/WebServiceControlContainerContext.java?rev=292603&view=auto
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/WebServiceControlContainerContext.java (added)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/WebServiceControlContainerContext.java Thu Sep 29 19:42:04 2005
@@ -0,0 +1,35 @@
+/*
+ * 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:$
+ */
+package org.apache.beehive.wsm.axis.controls;
+
+import org.apache.beehive.controls.runtime.bean.ControlContainerContext;
+
+/**
+ * Specialization of the base ControlContainerContext for WSM services.
+ */
+public class WebServiceControlContainerContext
+ extends ControlContainerContext {
+
+ /**
+ * Called by BeanContextSupport superclass during construction and deserialization to
+ * initialize subclass transient state.
+ */
+ public void initialize() {
+ super.initialize();
+ }
+}
Propchange: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/controls/WebServiceControlContainerContext.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/handlers/AnnotatedWebServiceDeploymentHandler.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/handlers/AnnotatedWebServiceDeploymentHandler.java?rev=292603&r1=292602&r2=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/handlers/AnnotatedWebServiceDeploymentHandler.java (original)
+++ beehive/trunk/wsm/src/axis/org/apache/beehive/wsm/axis/handlers/AnnotatedWebServiceDeploymentHandler.java Thu Sep 29 19:42:04 2005
@@ -38,7 +38,7 @@
import org.apache.axis.providers.java.RPCProvider;
import org.apache.axis.utils.ClassUtils;
import org.apache.beehive.wsm.axis.AxisHook;
-import org.apache.beehive.wsm.axis.ControlProvider;
+import org.apache.beehive.wsm.axis.controls.ControlProvider;
import org.apache.beehive.wsm.model.BeehiveWsSOAPMessageHandlerInfo;
import org.apache.beehive.wsm.model.BeehiveWsTypeMetadata;
import org.apache.beehive.wsm.model.jsr181.Jsr181ObjectModelStore;
Modified: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/model/jsr181/Jsr181ObjectModelStore.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/model/jsr181/Jsr181ObjectModelStore.java?rev=292603&r1=292602&r2=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/model/jsr181/Jsr181ObjectModelStore.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/model/jsr181/Jsr181ObjectModelStore.java Thu Sep 29 19:42:04 2005
@@ -178,6 +178,7 @@
if(null == fqClassName) {
fqClassName = getFullyQualifiedClassName(wsDirectory, className.substring(0, className.length() - "Service".length()));
}
+ /* todo: pretty whack...when the service class can not be found, this just throws an NPE */
clazz = cl.loadClass(fqClassName);
}
return clazz;
Modified: beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessor.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessor.java?rev=292603&r1=292602&r2=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessor.java (original)
+++ beehive/trunk/wsm/src/core/org/apache/beehive/wsm/processor/apt/WsmAnnotationProcessor.java Thu Sep 29 19:42:04 2005
@@ -88,7 +88,7 @@
// service implementation bean
if(_decl instanceof ClassDeclaration) {
ClassDeclaration classDecl = (ClassDeclaration)_decl;
- messager.printNotice("processing service implementation bean: " + classDecl.getQualifiedName());
+ messager.printNotice("Processing web service implementation: " + classDecl.getQualifiedName());
Jsr181TypeMetadataImpl om = null;
String endpointInterface = wsAnnotation.endpointInterface().trim();
Modified: beehive/trunk/wsm/test/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/build.xml?rev=292603&r1=292602&r2=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/test/build.xml (original)
+++ beehive/trunk/wsm/test/build.xml Thu Sep 29 19:42:04 2005
@@ -21,36 +21,30 @@
<import file="../../ant/beehive-tools.xml"/>
<property name="drt.root" location="${basedir}"/>
- <property name="build.dir" location="${drt.root}/build"/>
+ <property name="build.dir" location="build"/>
<property name="drt.logs" location="${build.dir}/logs"/>
- <property name="drt.src" location="${drt.root}/tests"/>
- <property name="drt.schemas" location="${drt.src}/schemas"/>
+ <property name="drt.src" location="tests"/>
<property name="build.classes" location="${build.dir}/classes"/>
<property name="build.gen-src-wsdl" location="${build.dir}/gen-src-wsdl"/>
<property name="build.gen-src-apt" location="${build.dir}/gen-src-apt"/>
<property name="build.tests" location="${build.classes}/tests"/>
<property name="build.gen-tests" location="${build.classes}/gen-tests"/>
- <property name="webapp.dir" location="${drt.root}/webapp"/>
- <property name="ext.lib.dir" location="../external"/>
+ <property name="webapp.dir" location="webapp"/>
+ <property name="axis.lib.dir" location="../external"/>
<property name="drt.wsdl.file" location="${drt.src}/org/apache/beehive/wsm/test/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"/>
- <include name="jaxrpc.jar"/>
- <include name="axis-ant.jar"/>
- <include name="axis.jar"/>
- </fileset>
+ <fileset id="axis.jars" dir="${axis.lib.dir}" includes="*.jar"/>
<path id="drt.classpath">
<path refid="velocity.dependency.path"/>
<path refid="xbean.dependency.path"/>
<path refid="junit.dependency.path"/>
<path refid="tools.dependency.path"/>
+ <path refid="servlet.dependency.path"/>
<path refid="commons-codec.dependency.path"/>
<path refid="commons-discovery.dependency.path"/>
<path refid="commons-logging.dependency.path"/>
@@ -92,7 +86,7 @@
<echo message="--------------------------------------------------"/>
</target>
- <target name="build" depends="dirs,xbean,gen_wsdl2java_test,build.webapp,build.tests"/>
+ <target name="build" depends="dirs,gen_wsdl2java_test,build.webapp,build.tests"/>
<target name="clean" depends="clean.tests, clean.webapp">
<delete file="velocity.log"/>
@@ -122,6 +116,7 @@
<copy todir="${build.tests}">
<fileset dir="${drt.src}" includes="**/*.xml"/>
<fileset dir="${drt.src}" includes="**/*.wsdl"/>
+ <fileset dir="${webapp.dir}/WEB-INF/" includes="schemas/*.wsdl"/>
</copy>
</target>
@@ -133,25 +128,11 @@
</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"/>
+ <ant dir="webapp/" target="build"/>
</target>
<target name="clean.webapp">
- <clean-webapp webappDir="${webapp.dir}"/>
- <delete dir="${webapp.dir}/WEB-INF/lib"/>
- </target>
-
- <target name="xbean">
- <path id="xbean.build.classpath">
- <path refid="drt.classpath"/>
- <pathelement location="${webapp.dir}/WEB-INF/classes"/>
- </path>
- <build-xbean schemaDir="${drt.schemas}" classgenDir="${webapp.dir}/WEB-INF/classes" xbeanBuildClasspathRef="xbean.build.classpath"/>
+ <ant dir="webapp/" target="clean"/>
</target>
<!-- ========================================= -->
@@ -159,11 +140,7 @@
<!-- ========================================= -->
<target name="gen_wsdl2java_test" description="Generates a Java class from a wsdl.">
- <taskdef name="wsdl2AJava" classname="org.apache.beehive.wsm.axis.ant.WSDL2AJavaTask">
- <classpath>
- <path refid="drt.classpath"/>
- </classpath>
- </taskdef>
+ <taskdef name="wsdl2AJava" classname="org.apache.beehive.wsm.axis.ant.WSDL2AJavaTask" classpathref="drt.classpath"/>
<wsdl2AJava outputdir="${build.gen-src-wsdl}" wsdlfile="${drt.wsdl.file}">
<classpath>
@@ -171,15 +148,25 @@
</classpath>
</wsdl2AJava>
- <build-webservices srcdir="${build.gen-src-wsdl}" destdir="${build.gen-tests}" tempdir="${build.gen-src-apt}" classpathRef="drt.classpath"/>
+ <build-webservices srcdir="${build.gen-src-wsdl}"
+ destdir="${build.gen-tests}"
+ tempdir="${build.gen-src-apt}"
+ classpathref="drt.classpath"/>
</target>
<target name="run.drt">
- <echo message="** junit logfiles written to ${drt.logs} **"/>
<parallel>
<start-server shmem="false" javaOptions=""/>
<sequential>
<antcall target="ensure.deployed"/>
+ <echo message="JUnit logs in: ${drt.logs}"/>
+ <!-- once the webapp has started, create service clients -->
+
+ <!-- generate service clients -->
+
+ <!-- build tests + service clients -->
+
+ <!-- execute JUnit tests -->
<junit failureproperty="wsmdrtfailed" printsummary="on" tempdir="${build.dir}" fork="yes">
<sysproperty key="wsm.test.url" value="${webapp.waitfor.url}"/>
<formatter type="plain"/>
Modified: beehive/trunk/wsm/test/tests/org/apache/beehive/wsm/axis/handlers/FaultTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/tests/org/apache/beehive/wsm/axis/handlers/FaultTest.java?rev=292603&r1=292602&r2=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/test/tests/org/apache/beehive/wsm/axis/handlers/FaultTest.java (original)
+++ beehive/trunk/wsm/test/tests/org/apache/beehive/wsm/axis/handlers/FaultTest.java Thu Sep 29 19:42:04 2005
@@ -105,23 +105,19 @@
// make sure both nodes are on right namespace
Node firstNode = nl.item(0);
- assertTrue(firstNode.getNamespaceURI().equals(
- "http://fake.target.namespace/"));
+ assertTrue(firstNode.getNamespaceURI().equals("http://fake.target.namespace/"));
+
Node secondNode = nl.item(1);
- assertTrue(secondNode.getNamespaceURI().equals(
- "http://fake.target.namespace/"));
- // make sure the both attributes of the exception is
- // serialized
- assertTrue("str1".equals(firstNode.getLocalName())
- || "str1".equals(secondNode.getLocalName()));
- assertTrue("str2".equals(firstNode.getLocalName())
- || "str2".equals(secondNode.getLocalName()));
+ assertTrue(secondNode.getNamespaceURI().equals("http://fake.target.namespace/"));
+
+ // make sure the both attributes of the exception is serialized
+ assertTrue("msg1".equals(firstNode.getLocalName()) || "msg1".equals(secondNode.getLocalName()));
+ assertTrue("msg2".equals(firstNode.getLocalName()) || "msg2".equals(secondNode.getLocalName()));
return;
}
// TODO: Check the other elements in the fault
}
fail("Didn't find the exception name in the Fault detail");
-
}
}
@@ -135,7 +131,8 @@
fakeSOAPService.invoke(mc);
fail("The Expected exception didn't happen!");
} catch (AxisFault e) {
- } // expected a fault
+ // expected a fault
+ }
Message msg = mc.getResponseMessage();
msg.saveChanges();
assertNotNull(msg);
Added: beehive/trunk/wsm/test/tests/org/apache/beehive/wsm/test/controls/SimpleControlsTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/tests/org/apache/beehive/wsm/test/controls/SimpleControlsTest.java?rev=292603&view=auto
==============================================================================
--- beehive/trunk/wsm/test/tests/org/apache/beehive/wsm/test/controls/SimpleControlsTest.java (added)
+++ beehive/trunk/wsm/test/tests/org/apache/beehive/wsm/test/controls/SimpleControlsTest.java Thu Sep 29 19:42:04 2005
@@ -0,0 +1,44 @@
+/**
+ 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:$
+ */
+package org.apache.beehive.wsm.test.controls;
+
+import java.net.URL;
+import java.io.InputStream;
+import javax.wsdl.Definition;
+
+import junit.framework.TestCase;
+
+/**
+ *
+ */
+public class SimpleControlsTest
+ extends TestCase {
+
+ public void testSimpleControl()
+ throws Exception {
+
+ /* todo: replace with some SOAPTestCase infrastructure */
+ URL url = new URL("http://localhost:8080/wsmWeb/webservice/ControlTestService.jws?wsdl");
+
+ System.out.println("url: " + url.toString());
+
+ /* todo: SOAP request */
+
+ /* todo: response validation */
+ }
+}
Propchange: beehive/trunk/wsm/test/tests/org/apache/beehive/wsm/test/controls/SimpleControlsTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/wsm/test/webapp/WEB-INF/server-config.wsdd
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/WEB-INF/server-config.wsdd?rev=292603&r1=292602&r2=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/test/webapp/WEB-INF/server-config.wsdd (original)
+++ beehive/trunk/wsm/test/webapp/WEB-INF/server-config.wsdd Thu Sep 29 19:42:04 2005
@@ -1,46 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
-<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
- <globalConfiguration>
- <parameter name="adminPassword" value="admin"/>
- <parameter name="disablePrettyXML" value="true"/>
- <parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
- <parameter name="sendXsiTypes" value="true"/>
- <parameter name="sendXMLDeclaration" value="true"/>
- <requestFlow>
- <handler type="java:org.apache.beehive.wsm.axis.handlers.AnnotatedWebServiceDeploymentHandler">
- <parameter name="scope" value="session"/>
- </handler>
- <handler type="java:org.apache.axis.handlers.JWSHandler">
- <parameter name="scope" value="session"/>
- </handler>
- </requestFlow>
- </globalConfiguration>
- <handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
- <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
- <handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
- <service name="AdminService" provider="java:MSG">
- <parameter name="allowedMethods" value="AdminService"/>
- <parameter name="enableRemoteAdmin" value="false"/>
- <parameter name="className" value="org.apache.axis.utils.Admin"/>
- <namespace>http://xml.apache.org/axis/wsdd/</namespace>
- </service>
- <service name="Version" provider="java:RPC">
- <parameter name="allowedMethods" value="getVersion"/>
- <parameter name="className" value="org.apache.axis.Version"/>
- </service>
- <transport name="http">
- <requestFlow>
- <handler type="URLMapper"/>
- <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
- </requestFlow>
- <parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
- <parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
- <parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
- </transport>
- <transport name="local">
- <responseFlow>
- <handler type="LocalResponder"/>
- </responseFlow>
- </transport>
+
+<deployment xmlns="http://xml.apache.org/axis/wsdd/"
+ xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
+
+ <globalConfiguration>
+ <parameter name="adminPassword" value="admin"/>
+ <parameter name="disablePrettyXML" value="true"/>
+ <parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
+ <parameter name="sendXsiTypes" value="true"/>
+ <parameter name="sendXMLDeclaration" value="true"/>
+ <requestFlow>
+ <handler type="java:org.apache.beehive.wsm.axis.handlers.AnnotatedWebServiceDeploymentHandler">
+ <parameter name="scope" value="session"/>
+ </handler>
+ <handler type="java:org.apache.axis.handlers.JWSHandler">
+ <parameter name="scope" value="session"/>
+ </handler>
+ </requestFlow>
+ </globalConfiguration>
+
+ <handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
+ <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
+ <handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
+
+ <service name="AdminService" provider="java:MSG">
+ <parameter name="allowedMethods" value="AdminService"/>
+ <parameter name="enableRemoteAdmin" value="false"/>
+ <parameter name="className" value="org.apache.axis.utils.Admin"/>
+ <namespace>http://xml.apache.org/axis/wsdd/</namespace>
+ </service>
+
+ <service name="Version" provider="java:RPC">
+ <parameter name="allowedMethods" value="getVersion"/>
+ <parameter name="className" value="org.apache.axis.Version"/>
+ </service>
+
+ <transport name="http">
+ <requestFlow>
+ <handler type="URLMapper"/>
+ <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
+ </requestFlow>
+ <parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
+ <parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
+ <parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
+ </transport>
+
+ <transport name="local">
+ <responseFlow>
+ <handler type="LocalResponder"/>
+ </responseFlow>
+ </transport>
</deployment>
Added: beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/webservice/ControlTestService.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/webservice/ControlTestService.java?rev=292603&view=auto
==============================================================================
--- beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/webservice/ControlTestService.java (added)
+++ beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/webservice/ControlTestService.java Thu Sep 29 19:42:04 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;
+
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.wsm.test.controls.hello.HelloControl;
+
+@WebService()
+public class ControlTestService {
+
+ @Control
+ private HelloControl _helloControl = null;
+
+ @WebMethod
+ public String sayHello(String name) {
+ return _helloControl.sayHello(name);
+ }
+}
Propchange: beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/webservice/ControlTestService.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/webservice/NameEmpty.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/webservice/NameEmpty.java?rev=292603&r1=292602&r2=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/webservice/NameEmpty.java (original)
+++ beehive/trunk/wsm/test/webapp/WEB-INF/src-ws/webservice/NameEmpty.java Thu Sep 29 19:42:04 2005
@@ -35,5 +35,4 @@
public int method(String param) {
return 0;
}
-
}
Modified: beehive/trunk/wsm/test/webapp/WEB-INF/src/Cheetorama.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/WEB-INF/src/Cheetorama.java?rev=292603&r1=292602&r2=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/test/webapp/WEB-INF/src/Cheetorama.java (original)
+++ beehive/trunk/wsm/test/webapp/WEB-INF/src/Cheetorama.java Thu Sep 29 19:42:04 2005
@@ -24,9 +24,11 @@
*/
@WebService(name = "Abacus", targetNamespace = "http://www.superflaco.com/AnnotationEndpointInterfaceTest")
public interface Cheetorama {
+
@WebMethod(operationName = "GoLocoCheetorama", action = "LocoActionCheetorama")
@WebResult
- public boolean getNutty(@WebParam int level, @WebParam(name = "detailCheetorama") String detail);
+ public boolean getNutty(@WebParam int level,
+ @WebParam(name = "detailCheetorama") String detail);
@WebMethod
@Oneway
Modified: beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/FakeDocWebService.jws
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/FakeDocWebService.jws?rev=292603&r1=292602&r2=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/FakeDocWebService.jws (original)
+++ beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/FakeDocWebService.jws Thu Sep 29 19:42:04 2005
@@ -23,6 +23,10 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
+import org.apache.beehive.wsm.axis.beans.ModeratelyComplexObject;
+import org.apache.beehive.wsm.axis.exceptions.ComplexUserDefinedException;
+import org.apache.beehive.wsm.axis.exceptions.SimpleUserDefinedException;
+
@WebService(
name = "FakeDocName",
serviceName = "FakeDocServiceName",
@@ -39,21 +43,23 @@
@WebMethod(operationName = "processThingy")
@Oneway
public void processModeratelyComplexObject(@WebParam(name = "thingy") ModeratelyComplexObject mco) {
- // empty: return values not allowed for @Oneway
}
-
+
@WebMethod
- public String doThrowSimpleUserDefinedFault() throws SimpleUserDefinedException {
+ public String doThrowSimpleUserDefinedFault()
+ throws SimpleUserDefinedException {
throw new SimpleUserDefinedException();
}
-
+
@WebMethod
- public String doThrowComplexUserDefinedFault() throws SimpleUserDefinedException, ComplexUserDefinedException {
+ public String doThrowComplexUserDefinedFault()
+ throws SimpleUserDefinedException, ComplexUserDefinedException {
throw new ComplexUserDefinedException("FirstString", "SecondString");
}
-
+
@WebMethod
- public String doThrowRuntimeException() throws SimpleUserDefinedException, ComplexUserDefinedException {
+ public String doThrowRuntimeException()
+ throws SimpleUserDefinedException, ComplexUserDefinedException {
throw new java.lang.NullPointerException();
}
}
Modified: beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/FakeWebService.jws
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/FakeWebService.jws?rev=292603&r1=292602&r2=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/FakeWebService.jws (original)
+++ beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/FakeWebService.jws Thu Sep 29 19:42:04 2005
@@ -24,6 +24,8 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
+import org.apache.beehive.wsm.axis.beans.ModeratelyComplexObject;
+
/**
* ****************************************************************************
* NOTE jcolwell@bea.com 2004-Sep-21 --
@@ -48,6 +50,5 @@
@WebMethod(operationName = "processThingy")
@Oneway
public void processModeratelyComplexObject(@WebParam(name = "thingy") ModeratelyComplexObject mco) {
- // empty: return values not allowed for @Oneway
}
}
Copied: beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/beans/ModeratelyComplexObject.java (from r292004, beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/ModeratelyComplexObject.java)
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/beans/ModeratelyComplexObject.java?p2=beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/beans/ModeratelyComplexObject.java&p1=beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/ModeratelyComplexObject.java&r1=292004&r2=292603&rev=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/ModeratelyComplexObject.java (original)
+++ beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/beans/ModeratelyComplexObject.java Thu Sep 29 19:42:04 2005
@@ -15,7 +15,7 @@
* limitations under the License.
*
*/
-package org.apache.beehive.wsm.axis;
+package org.apache.beehive.wsm.axis.beans;
import java.io.Serializable;
import java.util.Collection;
Propchange: beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/beans/ModeratelyComplexObject.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/exceptions/ComplexUserDefinedException.java (from r292004, beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/ComplexUserDefinedException.java)
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/exceptions/ComplexUserDefinedException.java?p2=beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/exceptions/ComplexUserDefinedException.java&p1=beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/ComplexUserDefinedException.java&r1=292004&r2=292603&rev=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/ComplexUserDefinedException.java (original)
+++ beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/exceptions/ComplexUserDefinedException.java Thu Sep 29 19:42:04 2005
@@ -14,35 +14,34 @@
* limitations under the License.
*
*/
-package org.apache.beehive.wsm.axis;
+package org.apache.beehive.wsm.axis.exceptions;
public class ComplexUserDefinedException
extends Exception
implements java.io.Serializable {
- private String str1;
- private String str2;
+ private String _msg1;
+ private String _msg2;
public ComplexUserDefinedException(String str1, String str2 ) {
- this.str1 = str1;
- this.str2 = str2;
+ this._msg1 = str1;
+ this._msg2 = str2;
}
- public String getStr1() {
- return str1;
+ public String getMsg1() {
+ return _msg1;
}
-
- public String getStr2() {
- return str2;
+ public String getMsg2() {
+ return _msg2;
}
- public void setStr1(String str1) {
- this.str1 = str1;
+ public void setMsg1(String msg1) {
+ this._msg1 = msg1;
}
- public void setStr2(String str2) {
- this.str2 = str2;
+ public void setMsg2(String msg2) {
+ this._msg2 = msg2;
}
}
Propchange: beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/exceptions/ComplexUserDefinedException.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/exceptions/SimpleUserDefinedException.java (from r292004, beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/SimpleUserDefinedException.java)
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/exceptions/SimpleUserDefinedException.java?p2=beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/exceptions/SimpleUserDefinedException.java&p1=beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/SimpleUserDefinedException.java&r1=292004&r2=292603&rev=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/SimpleUserDefinedException.java (original)
+++ beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/exceptions/SimpleUserDefinedException.java Thu Sep 29 19:42:04 2005
@@ -15,7 +15,7 @@
* limitations under the License.
*
*/
-package org.apache.beehive.wsm.axis;
+package org.apache.beehive.wsm.axis.exceptions;
public class SimpleUserDefinedException
extends Exception
Propchange: beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/axis/exceptions/SimpleUserDefinedException.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/test/controls/hello/HelloControl.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/test/controls/hello/HelloControl.java?rev=292603&view=auto
==============================================================================
--- beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/test/controls/hello/HelloControl.java (added)
+++ beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/test/controls/hello/HelloControl.java Thu Sep 29 19:42:04 2005
@@ -0,0 +1,25 @@
+/*
+ * 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:$
+ */
+package org.apache.beehive.wsm.test.controls.hello;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+@ControlInterface
+public interface HelloControl {
+ public String sayHello(String name);
+}
Propchange: beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/test/controls/hello/HelloControl.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/test/controls/hello/HelloControlImpl.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/test/controls/hello/HelloControlImpl.java?rev=292603&view=auto
==============================================================================
--- beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/test/controls/hello/HelloControlImpl.java (added)
+++ beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/test/controls/hello/HelloControlImpl.java Thu Sep 29 19:42:04 2005
@@ -0,0 +1,30 @@
+/*
+ * 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:$
+ */
+package org.apache.beehive.wsm.test.controls.hello;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.wsm.test.controls.hello.HelloControl;
+
+@ControlImplementation(isTransient=true)
+public class HelloControlImpl
+ implements HelloControl {
+
+ public String sayHello(String name) {
+ return "Hello, " + name;
+ }
+}
Propchange: beehive/trunk/wsm/test/webapp/WEB-INF/src/org/apache/beehive/wsm/test/controls/hello/HelloControlImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/wsm/test/webapp/WEB-INF/src/web/Bar.jws
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/WEB-INF/src/web/Bar.jws?rev=292603&r1=292602&r2=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/test/webapp/WEB-INF/src/web/Bar.jws (original)
+++ beehive/trunk/wsm/test/webapp/WEB-INF/src/web/Bar.jws Thu Sep 29 19:42:04 2005
@@ -22,12 +22,12 @@
*/
@WebService(serviceName = "Bar1Service", endpointInterface = "Cheetorama")
public class Bar {
+
public boolean getNutty(int level, String detail) {
return (level > 5);
}
public void goHome(long time) {
- return;
}
public int dropMoney(int amount) {
Modified: beehive/trunk/wsm/test/webapp/WEB-INF/src/web/Bar3.jws
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/WEB-INF/src/web/Bar3.jws?rev=292603&r1=292602&r2=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/test/webapp/WEB-INF/src/web/Bar3.jws (original)
+++ beehive/trunk/wsm/test/webapp/WEB-INF/src/web/Bar3.jws Thu Sep 29 19:42:04 2005
@@ -33,7 +33,6 @@
@WebMethod
public void goHome(long time) {
- return;
}
public int dropMoney(int amount) {
Modified: beehive/trunk/wsm/test/webapp/WEB-INF/src/web/Foo.jws
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/WEB-INF/src/web/Foo.jws?rev=292603&r1=292602&r2=292603&view=diff
==============================================================================
--- beehive/trunk/wsm/test/webapp/WEB-INF/src/web/Foo.jws (original)
+++ beehive/trunk/wsm/test/webapp/WEB-INF/src/web/Foo.jws Thu Sep 29 19:42:04 2005
@@ -26,15 +26,16 @@
*/
@WebService(name = "Abacus", targetNamespace = "http://www.superflaco.com/AnnotationTest")
public class Foo {
+
@WebMethod(operationName = "GoLoco", action = "LocoAction")
@WebResult
- public boolean getNutty(@WebParam int level, @WebParam(name = "detail") String detail) {
+ public boolean getNutty(@WebParam int level,
+ @WebParam(name = "detail") String detail) {
return (level > 5);
}
@WebMethod
@Oneway
public void goHome(@WebParam(name = "when") long time) {
- return;
}
}
Added: beehive/trunk/wsm/test/webapp/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/wsm/test/webapp/build.xml?rev=292603&view=auto
==============================================================================
--- beehive/trunk/wsm/test/webapp/build.xml (added)
+++ beehive/trunk/wsm/test/webapp/build.xml Thu Sep 29 19:42:04 2005
@@ -0,0 +1,56 @@
+<?xml version="1.0" ?>
+<!--
+ Copyright 2004-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.
+-->
+
+<project name="Beehive/WSM/Test/Webapp" default="build" basedir=".">
+
+ <import file="../../../beehive-imports.xml"/>
+ <import file="../../../ant/beehive-tools.xml"/>
+
+ <target name="build">
+ <mkdir dir="${basedir}/WEB-INF/lib"/>
+
+ <deploy-controls destDir="${basedir}/WEB-INF/lib"/>
+ <deploy-wsm webappDir="${basedir}"/>
+
+ <path id="drt.classpath">
+ <fileset dir="${basedir}/WEB-INF/lib">
+ <include name="*.jar"/>
+ </fileset>
+ <pathelement location="${basedir}/WEB-INF/classes"/>
+ </path>
+
+ <build-xbean classgenDir="${basedir}/WEB-INF/classes"
+ schemaDir="${basedir}/WEB-INF/schemas"/>
+
+ <build-controls srcdir="${basedir}/WEB-INF/src"
+ destdir="${basedir}/WEB-INF/classes"
+ classpathref="drt.classpath"
+ tempdir="${basedir}/WEB-INF/.tmpbeansrc"/>
+
+ <build-webservices srcdir="${basedir}/WEB-INF/src-ws"
+ destdir="${basedir}/WEB-INF/classes"
+ tempdir="${basedir}/WEB-INF/.tmpbeansrc"
+ classpathref="drt.classpath"/>
+ </target>
+
+ <target name="clean">
+ <delete dir="${basedir}/WEB-INF/.tmpbeansrc"/>
+ <delete dir="${basedir}/WEB-INF/classes"/>
+ <delete dir="${basedir}/WEB-INF/lib"/>
+ </target>
+
+</project>
Propchange: beehive/trunk/wsm/test/webapp/build.xml
------------------------------------------------------------------------------
svn:eol-style = native