You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by as...@apache.org on 2006/10/03 08:22:43 UTC
svn commit: r452317 - in
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2:
i18n/resource.properties receivers/RawXMLINOnlyMessageReceiver.java
receivers/RawXMLINOutMessageReceiver.java
Author: asankha
Date: Mon Oct 2 23:22:42 2006
New Revision: 452317
URL: http://svn.apache.org/viewvc?view=rev&rev=452317
Log:
fix JIRA issues AXIS2-1286 and AXIS2-1287 with better SOAP faults returned to client by the RPC message receiver, and fix the core Javadocs to give a meaningful descriptions
Modified:
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/i18n/resource.properties
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOnlyMessageReceiver.java
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOutMessageReceiver.java
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/i18n/resource.properties?view=diff&rev=452317&r1=452316&r2=452317
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/i18n/resource.properties (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/i18n/resource.properties Mon Oct 2 23:22:42 2006
@@ -63,6 +63,8 @@
unknownStyle=Unknown Style {0}
rawXmlProviderIsLimited=Raw Xml provider supports only the methods bearing the signature public OMElement <method-name>(OMElement) where the method name can be anything
methodNotImplemented=Implementation class does not define a method called
+implReturnedNull=Implementation class returned null
+invalidMethodName=Invalid method name {0} for service implementation class
blockInvocationExpectsRes=Blocking invocation always expects a response
serviceGroupIDNotFound=SOAP session information can not be retrieved from the received correlation id.
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOnlyMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOnlyMessageReceiver.java?view=diff&rev=452317&r1=452316&r2=452317
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOnlyMessageReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOnlyMessageReceiver.java Mon Oct 2 23:22:42 2006
@@ -30,7 +30,15 @@
import java.lang.reflect.Method;
/**
- * This is a Simple java Provider.
+ * The RawXMLINOnlyMessageReceiver MessageReceiver hands over the raw request received to
+ * the service implementation class as an OMElement. The implementation class is NOT
+ * expected to return any value, but may do so and it would be ignored. This is a
+ * synchronous 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 void <<methodName>>(OMElement request)
+ *
+ * @see RawXMLINOutMessageReceiver
+ * @see RawXMLINOutAsyncMessageReceiver
*/
public class RawXMLINOnlyMessageReceiver extends AbstractInMessageReceiver
implements MessageReceiver {
@@ -59,6 +67,11 @@
public RawXMLINOnlyMessageReceiver() {
}
+ /**
+ * Invokes the bussiness logic invocation on the service implementation class
+ * @param msgContext the incoming message context
+ * @throws AxisFault on invalid method (wrong signature)
+ */
public void invokeBusinessLogic(MessageContext msgContext) throws AxisFault {
try {
@@ -89,6 +102,10 @@
}
}
+ if (method == null) {
+ throw new AxisFault(Messages.getMessage("invalidMethodName",
+ methodName));
+ }
Class[] parameters = method.getParameterTypes();
if ((parameters != null) && (parameters.length == 1)
Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOutMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOutMessageReceiver.java?view=diff&rev=452317&r1=452316&r2=452317
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOutMessageReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/RawXMLINOutMessageReceiver.java Mon Oct 2 23:22:42 2006
@@ -33,7 +33,15 @@
import java.lang.reflect.Method;
/**
- * This is a Simple java Provider.
+ * The RawXMLINOutMessageReceiver 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 a synchronous
+ * 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 RawXMLINOutAsyncMessageReceiver
*/
public class RawXMLINOutMessageReceiver extends AbstractInOutSyncMessageReceiver
implements MessageReceiver {
@@ -65,6 +73,12 @@
return method;
}
+ /**
+ * Invokes the bussiness logic invocation on the service implementation class
+ * @param msgContext the incoming message context
+ * @param newmsgContext the response message context
+ * @throws AxisFault on invalid method (wrong signature) or behaviour (return null)
+ */
public void invokeBusinessLogic(MessageContext msgContext, MessageContext newmsgContext)
throws AxisFault {
try {
@@ -95,8 +109,11 @@
throw new AxisFault(Messages.getMessage("rawXmlProviderIsLimited"));
}
- OMElement result;
- result = (OMElement) method.invoke(obj, args);
+ OMElement result = (OMElement) method.invoke(obj, args);
+ if (result == null) {
+ throw new AxisFault(Messages.getMessage("implReturnedNull",
+ opDesc.getName().toString()));
+ }
AxisService service = msgContext.getAxisService();
result.declareNamespace(service.getTargetNamespace(),
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org