Removed some classes deprecated from 1.3 and 1.4 releases.
diff --git a/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java b/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
index d6616f8..c453724 100644
--- a/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
+++ b/modules/adb/src/org/apache/axis2/rpc/receivers/RPCInOutAsyncMessageReceiver.java
@@ -31,7 +31,7 @@
import org.apache.axis2.description.Parameter;
import org.apache.axis2.description.WSDL2Constants;
import org.apache.axis2.description.java2wsdl.Java2WSDLConstants;
-import org.apache.axis2.receivers.AbstractInOutAsyncMessageReceiver;
+import org.apache.axis2.receivers.AbstractInMessageReceiver;
import org.apache.axis2.wsdl.WSDLConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -39,7 +39,7 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-public class RPCInOutAsyncMessageReceiver extends AbstractInOutAsyncMessageReceiver {
+public class RPCInOutAsyncMessageReceiver extends AbstractInMessageReceiver {
private static Log log = LogFactory.getLog(RPCInOnlyMessageReceiver.class);
@@ -67,7 +67,7 @@
// get the implementation class for the Web Service
Object obj = getTheImplementationObject(inMessage);
- Class ImplClass = obj.getClass();
+ Class<?> ImplClass = obj.getClass();
AxisOperation op = inMessage.getOperationContext().getAxisOperation();
AxisService service = inMessage.getAxisService();
@@ -137,7 +137,7 @@
if (cause != null) {
msg = cause.getMessage();
}
- if (msg == null) {
+ if (msg == null && method != null) {
msg = "Exception occurred while trying to invoke service method " +
method.getName();
}
@@ -147,10 +147,20 @@
}
throw new AxisFault(msg);
} catch (Exception e) {
- String msg = "Exception occurred while trying to invoke service method " +
- method.getName();
- log.error(msg, e);
- throw new AxisFault(msg, e);
+ if(method != null){
+ String msg = "Exception occurred while trying to invoke service method " +
+ method.getName();
+ log.error(msg, e);
+ throw new AxisFault(msg, e);
+ }
+
}
}
+
+ @Override
+ protected void invokeBusinessLogic(MessageContext messageCtx) throws AxisFault {
+ messageCtx.setProperty(DO_ASYNC, Boolean.TRUE);
+ super.receive(messageCtx);
+
+ }
}
diff --git a/modules/corba/src/org/apache/axis2/corba/receivers/CorbaInOutAsyncMessageReceiver.java b/modules/corba/src/org/apache/axis2/corba/receivers/CorbaInOutAsyncMessageReceiver.java
deleted file mode 100644
index 968e3b8..0000000
--- a/modules/corba/src/org/apache/axis2/corba/receivers/CorbaInOutAsyncMessageReceiver.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.axis2.corba.receivers;
-
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.soap.SOAPFactory;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.corba.deployer.CorbaConstants;
-import org.apache.axis2.corba.deployer.SchemaToIDLMapping;
-import org.apache.axis2.corba.exceptions.CorbaInvocationException;
-import org.apache.axis2.corba.idl.types.IDL;
-import org.apache.axis2.corba.idl.types.Member;
-import org.apache.axis2.description.AxisMessage;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.Parameter;
-import org.apache.axis2.receivers.AbstractInOutAsyncMessageReceiver;
-import org.apache.axis2.wsdl.WSDLConstants;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.omg.CORBA_2_3.ORB;
-
-import javax.xml.namespace.QName;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * This is takes care of the IN-OUT sync MEP in the server side
- *
- * @deprecated no longer needed, going away after 1.3
- */
-public class CorbaInOutAsyncMessageReceiver extends AbstractInOutAsyncMessageReceiver implements CorbaConstants {
-
- private static Log log = LogFactory.getLog(CorbaInOutAsyncMessageReceiver.class);
- private ORB orb = null;
- private Map invokerCache = new HashMap();
-
- public void invokeBusinessLogic(MessageContext inMessage, MessageContext outMessage) throws AxisFault {
- try{
- invoke(inMessage, outMessage);
- } catch (org.omg.CORBA.TRANSIENT e) {
- log.info("org.omg.CORBA.TRANSIENT exception thrown.");
- /*
- * If cannot connect to the corba server
- * try again after clearing the cache
- * (eg. if the Corba server is restarted)
- */
- invokerCache.clear();
- invoke(inMessage, outMessage);
- }
- }
-
- private void invoke(MessageContext inMessage, MessageContext outMessage) throws AxisFault {
- String methodName = null;
- try {
- AxisOperation op = inMessage.getOperationContext().getAxisOperation();
- AxisService service = inMessage.getAxisService();
- OMElement methodElement = inMessage.getEnvelope().getBody().getFirstElement();
-
- AxisMessage inAxisMessage = op.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
- String messageNameSpace = null;
- QName elementQName;
- methodName = op.getName().getLocalPart();
-
- Invoker invoker = (Invoker) invokerCache.get(methodName);
- if (invoker==null) {
- if (orb==null) {
- Parameter orbParam = service.getParameter(ORB_LITERAL);
- orb = orbParam != null ? (ORB) orbParam.getValue() : CorbaUtil.getORB(service);
- }
- org.omg.CORBA.Object obj = CorbaUtil.resolveObject(service, orb);
- Parameter idlParameter = service.getParameter(IDL_LITERAL);
- if (idlParameter==null)
- throw new CorbaInvocationException("IDL not found");
- IDL idl = (IDL) idlParameter.getValue();
- invoker = CorbaUtil.getInvoker(service, obj, idl, methodName);
- invokerCache.put(methodName, invoker);
- }
-
- Object resObject = null;
- Member[] params = null;
- Object[] outParamValues = null;
- if (inAxisMessage != null) {
- if (inAxisMessage.getElementQName()!=null) {
- elementQName = inAxisMessage.getElementQName();
- messageNameSpace = elementQName.getNamespaceURI();
- OMNamespace namespace = methodElement.getNamespace();
- if (messageNameSpace != null) {
- if (namespace == null || !messageNameSpace.equals(namespace.getNamespaceURI())) {
- throw new AxisFault("namespace mismatch require " +
- messageNameSpace +
- " found " + methodElement.getNamespace().getNamespaceURI());
- }
- } else if (namespace != null) {
- throw new AxisFault("namespace mismatch. Axis Oepration expects non-namespace " +
- "qualified element. But received a namespace qualified element");
- }
-
- SchemaToIDLMapping mapping = (SchemaToIDLMapping) service.getParameterValue(SCHEMA_TO_IDL_MAPPING_LITERAL);
- Object[] objectArray = CorbaUtil.extractParameters(methodElement, invoker.getParameterMembers(), mapping);
- invoker.setParameters(objectArray);
- params = invoker.getParameterMembers();
- outParamValues = invoker.getOutParameterValuess();
- }
- resObject = invoker.invoke();
- }
- SOAPFactory fac = getSOAPFactory(inMessage);
-
- AxisMessage outaxisMessage = op.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
- if (messageNameSpace == null) {
- QName qname = outaxisMessage.getElementQName();
- if (qname != null) {
- messageNameSpace = qname.getNamespaceURI();
- }
- }
- // Handling the response
- CorbaUtil.processResponse(resObject, params, outParamValues, invoker.getReturnType(), service, methodName, fac,
- messageNameSpace, outMessage);
- } catch (CorbaInvocationException e) {
- String msg;
- Throwable cause = e.getCause();
- if (cause != null) {
- msg = cause.getMessage();
- if (msg == null) {
- msg = "Exception occurred while trying to invoke service method " + methodName;
- }
- //log.error(msg, e);
- if (cause instanceof AxisFault) {
- throw (AxisFault) cause;
- }
- } else {
- msg = e.getMessage();
- }
- throw new AxisFault(msg);
- }
- }
-}
diff --git a/modules/integration/test/org/apache/axis2/async/AsyncMessageReceiver.java b/modules/integration/test/org/apache/axis2/async/AsyncMessageReceiver.java
index 3748d90..ea551c6 100644
--- a/modules/integration/test/org/apache/axis2/async/AsyncMessageReceiver.java
+++ b/modules/integration/test/org/apache/axis2/async/AsyncMessageReceiver.java
@@ -27,11 +27,11 @@
import org.apache.axis2.description.AxisOperation;
import org.apache.axis2.description.AxisService;
import org.apache.axis2.i18n.Messages;
-import org.apache.axis2.receivers.AbstractInOutAsyncMessageReceiver;
+import org.apache.axis2.receivers.AbstractInOutMessageReceiver;
import java.lang.reflect.Method;
-public class AsyncMessageReceiver extends AbstractInOutAsyncMessageReceiver {
+public class AsyncMessageReceiver extends AbstractInOutMessageReceiver {
public void invokeBusinessLogic(MessageContext msgContext,
MessageContext newmsgContext) throws AxisFault {
@@ -40,13 +40,13 @@
Object obj = getTheImplementationObject(msgContext);
// find the WebService method
- Class ImplClass = obj.getClass();
+ Class<?> ImplClass = obj.getClass();
AxisOperation opDesc = msgContext.getOperationContext().getAxisOperation();
Method method = findOperation(opDesc, ImplClass);
if (method != null) {
- Class[] parameters = method.getParameterTypes();
+ Class<?>[] parameters = method.getParameterTypes();
Object[] args;
if ((parameters == null) || (parameters.length == 0)) {
@@ -84,7 +84,7 @@
}
}
- public Method findOperation(AxisOperation op, Class ImplClass) {
+ public Method findOperation(AxisOperation op, Class<?> ImplClass) {
Method method = null;
String methodName = op.getName().getLocalPart();
Method[] methods = ImplClass.getMethods();
diff --git a/modules/integration/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java b/modules/integration/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java
index c21092e..4bed0ae 100644
--- a/modules/integration/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java
+++ b/modules/integration/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java
@@ -22,7 +22,7 @@
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.soap.SOAPFactory;
import org.apache.axis2.AxisFault;
-import org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver;
+import org.apache.axis2.receivers.AbstractInOutMessageReceiver;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.MessageContext;
@@ -104,7 +104,7 @@
AxisEngine.receive(mc);
}
- public class NullMessageReceiver extends AbstractInOutSyncMessageReceiver {
+ public class NullMessageReceiver extends AbstractInOutMessageReceiver {
public void invokeBusinessLogic(MessageContext inMessage,
MessageContext outMessage)
diff --git a/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java b/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java
index 6456e5f..9ddc657 100644
--- a/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java
+++ b/modules/integration/test/org/apache/axis2/engine/MessageWithServerTest.java
@@ -23,6 +23,9 @@
import junit.framework.Test;
import junit.framework.TestSuite;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
import org.apache.axis2.description.AxisModule;
import org.apache.axis2.description.AxisOperation;
import org.apache.axis2.description.AxisService;
@@ -32,6 +35,7 @@
import org.apache.axis2.dispatchers.RequestURIBasedDispatcher;
import org.apache.axis2.dispatchers.SOAPActionBasedDispatcher;
import org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher;
+import org.apache.axis2.handlers.AbstractHandler;
import org.apache.axis2.integration.UtilServer;
import org.apache.axis2.integration.UtilServerBasedTestCase;
import org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver;
@@ -156,4 +160,12 @@
rReader.close();
socket.close();
}
+
+ class InstanceDispatcher extends AbstractHandler {
+
+ public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
+ return InvocationResponse.CONTINUE;
+ }
+ }
+
}
diff --git a/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java b/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
deleted file mode 100644
index c0aa16f..0000000
--- a/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.axis2.engine;
-
-/**
- * Dispatcher based on the WS-Addressing properties.
- * @deprecated use org.apache.axis2.dispatchers.AddressingBasedDispatcher
- */
-public class AddressingBasedDispatcher extends org.apache.axis2.dispatchers.AddressingBasedDispatcher {
-}
diff --git a/modules/kernel/src/org/apache/axis2/engine/HTTPLocationBasedDispatcher.java b/modules/kernel/src/org/apache/axis2/engine/HTTPLocationBasedDispatcher.java
deleted file mode 100644
index aac34fe..0000000
--- a/modules/kernel/src/org/apache/axis2/engine/HTTPLocationBasedDispatcher.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.axis2.engine;
-
-/**
- * Dispatches the operation based on the information from the target endpoint URL.
- *
- * @deprecated use org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher
- */
-public class HTTPLocationBasedDispatcher extends org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher {
-}
diff --git a/modules/kernel/src/org/apache/axis2/engine/InstanceDispatcher.java b/modules/kernel/src/org/apache/axis2/engine/InstanceDispatcher.java
deleted file mode 100644
index 4cf7a23..0000000
--- a/modules/kernel/src/org/apache/axis2/engine/InstanceDispatcher.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.axis2.engine;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.handlers.AbstractHandler;
-
-/**
- * By the time the control comes to this handler, the dispatching must have happened
- * so that the message context contains the AxisServiceGroup, AxisService and
- * AxisOperation.
- * This will then try to find the Contexts of ServiceGroup, Service and the Operation.
- * @deprecated The functionality of this class has moved into the DispatchPhase postconditions
- */
-public class InstanceDispatcher extends AbstractHandler {
-
- /**
- * This doesn't do anything, as the functionality is now in DispatchPhase.checkPostConditions()
- * The class remains for backwards compatibility of axis2.xml files, but it should go away after
- * 1.3.
- *
- * @param msgContext the <code>MessageContext</code> to process with this <code>Handler</code>.
- * @return An InvocationResponse that indicates what the next step in the message processing
- * should be.
- * @throws org.apache.axis2.AxisFault if the handler encounters an error
- */
- public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
- return InvocationResponse.CONTINUE;
- }
-}
diff --git a/modules/kernel/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java b/modules/kernel/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java
deleted file mode 100644
index 29a05a6..0000000
--- a/modules/kernel/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.axis2.engine;
-
-/**
- * Dispatches the service based on the information from the target endpoint URL.
- *
- * @deprecated use org.apache.axis2.dispatchers.RequestURIBasedDispatcher
- */
-public class RequestURIBasedDispatcher extends org.apache.axis2.dispatchers.RequestURIBasedDispatcher {
-}
diff --git a/modules/kernel/src/org/apache/axis2/engine/RequestURIOperationDispatcher.java b/modules/kernel/src/org/apache/axis2/engine/RequestURIOperationDispatcher.java
deleted file mode 100644
index 031dcf6..0000000
--- a/modules/kernel/src/org/apache/axis2/engine/RequestURIOperationDispatcher.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.axis2.engine;
-
-/**
- * Dispatches the operation based on the information from the target endpoint URL.
- *
- * @deprecated use org.apache.axis2.dispatchers.RequestURIOperationDispatcher
- */
-public class RequestURIOperationDispatcher extends org.apache.axis2.dispatchers.RequestURIOperationDispatcher {
-}
diff --git a/modules/kernel/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java b/modules/kernel/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java
deleted file mode 100644
index f446d94..0000000
--- a/modules/kernel/src/org/apache/axis2/engine/SOAPActionBasedDispatcher.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.axis2.engine;
-
-/**
- * Dispatches based on the SOAPAction.
- *
- * @deprecated use org.apache.axis2.dispatchers.SOAPActionBasedDispatcher
- */
-public class SOAPActionBasedDispatcher extends org.apache.axis2.dispatchers.SOAPActionBasedDispatcher {
-}
-
diff --git a/modules/kernel/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java b/modules/kernel/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java
deleted file mode 100644
index 9307c89..0000000
--- a/modules/kernel/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.axis2.engine;
-
-/**
- * Dispatches based on the namespace URI of the first child of
- * the body.
- *
- * @deprecated use org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher
- */
-public class SOAPMessageBodyBasedDispatcher extends org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher {
-}
diff --git a/modules/kernel/src/org/apache/axis2/receivers/AbstractInOutSyncMessageReceiver.java b/modules/kernel/src/org/apache/axis2/receivers/AbstractInOutSyncMessageReceiver.java
deleted file mode 100644
index 6fb94f2..0000000
--- a/modules/kernel/src/org/apache/axis2/receivers/AbstractInOutSyncMessageReceiver.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.axis2.receivers;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.engine.AxisEngine;
-import org.apache.axis2.util.MessageContextBuilder;
-
-/**
- * This is the Absract IN-OUT MEP MessageReceiver. The
- * protected abstract methods are only for the sake of breaking down the logic
- *
- * @deprecated use AbstractInOutMessageReceiver
- */
-public abstract class AbstractInOutSyncMessageReceiver extends AbstractMessageReceiver {
- public abstract void invokeBusinessLogic(MessageContext inMessage, MessageContext outMessage)
- throws AxisFault;
-
- public final void invokeBusinessLogic(MessageContext msgContext) throws AxisFault {
- MessageContext outMsgContext = MessageContextBuilder.createOutMessageContext(msgContext);
- outMsgContext.getOperationContext().addMessageContext(outMsgContext);
-
- invokeBusinessLogic(msgContext, outMsgContext);
- replicateState(msgContext);
-
- AxisEngine.send(outMsgContext);
- }
-}
diff --git a/modules/kernel/src/org/apache/axis2/receivers/AbstractRobustInMessageReceiver.java b/modules/kernel/src/org/apache/axis2/receivers/AbstractRobustInMessageReceiver.java
deleted file mode 100644
index 897cd71..0000000
--- a/modules/kernel/src/org/apache/axis2/receivers/AbstractRobustInMessageReceiver.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.axis2.receivers;
-
-/**
- * This is takes care of the IN-OUT sync MEP in the server side
- *
- * @deprecated not needed, since in-only MessageReceivers can throw faults
- */
-public abstract class AbstractRobustInMessageReceiver extends AbstractMessageReceiver{
-}
diff --git a/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOutAsyncMessageReceiver.java b/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOutAsyncMessageReceiver.java
deleted file mode 100644
index 6ff1768..0000000
--- a/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOutAsyncMessageReceiver.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.axis2.receivers;
-
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.context.MessageContext;
-
-/**
- * The RawXMLINOutAsyncMessageReceiver MessageReceiver hands over the raw request received to
- * the service implementation class as an OMElement. The implementation class is expected
- * to return back the OMElement to be returned to the caller. This is an asynchronous
- * MessageReceiver, and finds the service implementation class to invoke by referring to
- * the "ServiceClass" parameter value specified in the service.xml and looking at the
- * methods of the form OMElement <<methodName>>(OMElement request)
- *
- * @see RawXMLINOnlyMessageReceiver
- * @see RawXMLINOutMessageReceiver
- * @deprecated use RawXMLINOutMessageReceiver and the DO_ASYNC property instead....
- */
-public class RawXMLINOutAsyncMessageReceiver extends RawXMLINOutMessageReceiver {
- public void receive(final MessageContext messageCtx) throws AxisFault {
- messageCtx.setProperty(DO_ASYNC, Boolean.TRUE);
- super.receive(messageCtx);
- }
-}
diff --git a/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOutMessageReceiver.java b/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOutMessageReceiver.java
index cadef20..80c3739 100644
--- a/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOutMessageReceiver.java
+++ b/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOutMessageReceiver.java
@@ -26,8 +26,10 @@
import org.apache.axis2.AxisFault;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.engine.AxisEngine;
import org.apache.axis2.engine.MessageReceiver;
import org.apache.axis2.i18n.Messages;
+import org.apache.axis2.util.MessageContextBuilder;
import java.lang.reflect.Method;
@@ -42,7 +44,7 @@
* @see RawXMLINOnlyMessageReceiver
* @see RawXMLINOutAsyncMessageReceiver
*/
-public class RawXMLINOutMessageReceiver extends AbstractInOutSyncMessageReceiver
+public class RawXMLINOutMessageReceiver extends AbstractMessageReceiver
implements MessageReceiver {
private Method findOperation(AxisOperation op, Class implClass) {
@@ -108,4 +110,14 @@
throw AxisFault.makeFault(e);
}
}
+
+ public final void invokeBusinessLogic(MessageContext msgContext) throws AxisFault {
+ MessageContext outMsgContext = MessageContextBuilder.createOutMessageContext(msgContext);
+ outMsgContext.getOperationContext().addMessageContext(outMsgContext);
+
+ invokeBusinessLogic(msgContext, outMsgContext);
+ replicateState(msgContext);
+
+ AxisEngine.send(outMsgContext);
+ }
}
diff --git a/modules/kernel/src/org/apache/axis2/util/Base64.java b/modules/kernel/src/org/apache/axis2/util/Base64.java
deleted file mode 100644
index 4d23002..0000000
--- a/modules/kernel/src/org/apache/axis2/util/Base64.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.axis2.util;
-
-/**
- * @deprecated
- */
-public class Base64 extends org.apache.axiom.om.util.Base64 {
-}
\ No newline at end of file
diff --git a/modules/kernel/test/org/apache/axis2/engine/AbstractEngineTest.java b/modules/kernel/test/org/apache/axis2/engine/AbstractEngineTest.java
index a954270..9333e58 100644
--- a/modules/kernel/test/org/apache/axis2/engine/AbstractEngineTest.java
+++ b/modules/kernel/test/org/apache/axis2/engine/AbstractEngineTest.java
@@ -22,7 +22,8 @@
import junit.framework.TestCase;
import org.apache.axis2.AxisFault;
import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver;
+import org.apache.axis2.receivers.AbstractMessageReceiver;
+import org.apache.axis2.util.MessageContextBuilder;
public class AbstractEngineTest extends TestCase {
public AbstractEngineTest() {
@@ -32,12 +33,22 @@
super(arg0);
}
- public class NullMessageReceiver extends AbstractInOutSyncMessageReceiver {
+ public class NullMessageReceiver extends AbstractMessageReceiver {
public void invokeBusinessLogic(MessageContext inMessage,
MessageContext outMessage)
throws AxisFault {
}
+
+ public final void invokeBusinessLogic(MessageContext msgContext) throws AxisFault {
+ MessageContext outMsgContext = MessageContextBuilder.createOutMessageContext(msgContext);
+ outMsgContext.getOperationContext().addMessageContext(outMsgContext);
+
+ invokeBusinessLogic(msgContext, outMsgContext);
+ replicateState(msgContext);
+
+ AxisEngine.send(outMsgContext);
+ }
}
}
diff --git a/modules/ping/src/org/apache/axis2/ping/PingMessageReceiver.java b/modules/ping/src/org/apache/axis2/ping/PingMessageReceiver.java
index 33c00d2..b73f472 100644
--- a/modules/ping/src/org/apache/axis2/ping/PingMessageReceiver.java
+++ b/modules/ping/src/org/apache/axis2/ping/PingMessageReceiver.java
@@ -26,7 +26,7 @@
import org.apache.axis2.description.AxisOperation;
import org.apache.axis2.engine.MessageReceiver;
import org.apache.axis2.engine.Pingable;
-import org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver;
+import org.apache.axis2.receivers.AbstractInOutMessageReceiver;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -34,7 +34,7 @@
import java.util.ArrayList;
import java.util.Iterator;
-public class PingMessageReceiver extends AbstractInOutSyncMessageReceiver implements PingConstants {
+public class PingMessageReceiver extends AbstractInOutMessageReceiver implements PingConstants {
private static Log log = LogFactory.getLog(PingMessageReceiver.class);
public void invokeBusinessLogic(MessageContext inMessage, MessageContext outMessage) throws AxisFault {
@@ -44,7 +44,7 @@
AxisOperation axisOperation;
PingResponse pingResponse = new PingResponse();
pingResponse.initPingResponse(inMessage);
- Iterator opListIterator = getAxisOperations(inMessage);
+ Iterator<AxisOperation> opListIterator = getAxisOperations(inMessage);
while (opListIterator.hasNext()) {
axisOperation = (AxisOperation) opListIterator.next();
@@ -75,9 +75,9 @@
* @return Iterator for the list of AxisOperations
* @throws AxisFault
*/
- private Iterator getAxisOperations(MessageContext inMessage) throws AxisFault {
+ private Iterator<AxisOperation> getAxisOperations(MessageContext inMessage) throws AxisFault {
boolean serviceLevel = false;
- Iterator operationsIterator;
+ Iterator<AxisOperation> operationsIterator;
OMElement element = null;
OMElement pingRequestElement = inMessage.getEnvelope().
@@ -95,8 +95,8 @@
if (!serviceLevel && element != null) {
//Operations to be pinged has been specified in the ping request
- Iterator elementIterator = pingRequestElement.getChildrenWithName(new QName(TAG_OPERATION));
- ArrayList operationList = new ArrayList();
+ Iterator<?> elementIterator = pingRequestElement.getChildrenWithName(new QName(TAG_OPERATION));
+ ArrayList<AxisOperation> operationList = new ArrayList<AxisOperation>();
AxisOperation axisOperation;
while (elementIterator.hasNext()) {
diff --git a/modules/scripting/src/org/apache/axis2/scripting/ScriptReceiver.java b/modules/scripting/src/org/apache/axis2/scripting/ScriptReceiver.java
index 36fbc08..f36d275 100644
--- a/modules/scripting/src/org/apache/axis2/scripting/ScriptReceiver.java
+++ b/modules/scripting/src/org/apache/axis2/scripting/ScriptReceiver.java
@@ -24,7 +24,7 @@
import org.apache.axis2.context.ServiceContext;
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.Parameter;
-import org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver;
+import org.apache.axis2.receivers.AbstractInOutMessageReceiver;
import org.apache.axis2.scripting.convertors.ConvertorFactory;
import org.apache.axis2.scripting.convertors.OMElementConvertor;
import org.apache.bsf.BSFEngine;
@@ -76,7 +76,7 @@
* The script language is determined by the file name suffix when using scripts
* in seperate files or the script parameter name suffix when using inline scripts.
*/
-public class ScriptReceiver extends AbstractInOutSyncMessageReceiver {
+public class ScriptReceiver extends AbstractInOutMessageReceiver {
public static final String SCRIPT_ATTR = "script";
public static final String FUNCTION_ATTR = "function";
@@ -161,7 +161,7 @@
}
} else {
// the script is defined inline within the services.xml
- ArrayList parameters = axisService.getParameters();
+ ArrayList<Parameter> parameters = axisService.getParameters();
for (int i=0; scriptFileParam == null && i<parameters.size(); i++) {
Parameter p = (Parameter) parameters.get(i);
if (p.getName().startsWith("script.")) {