Author: richard.opalka(a)jboss.com
Date: 2009-01-22 09:50:23 -0500 (Thu, 22 Jan 2009)
New Revision: 9095
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java
Log:
[JBWS-2114] fixing issue
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java 2009-01-22
14:44:06 UTC (rev 9094)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/AbstractInvoker.java 2009-01-22
14:50:23 UTC (rev 9095)
@@ -63,6 +63,8 @@
*/
public abstract class AbstractInvoker implements Invoker
{
+ private static final Object[] NO_ARGS = new Object[]{};
+
public Object invoke(Exchange exchange, Object o)
{
// set up the webservice request context
@@ -90,16 +92,19 @@
MethodDispatcher md =
(MethodDispatcher)exchange.get(Service.class).get(MethodDispatcher.class.getName());
Method m = md.getMethod(bop);
- Object[] params;
- if (o instanceof List<?>)
+ Object[] params = NO_ARGS;
+ if (m.getParameterTypes().length != 0)
{
- List<Object> paramList = CastUtils.cast((List<?>)o);
- params = paramList.toArray();
+ if (o instanceof List<?>)
+ {
+ List<Object> paramList = CastUtils.cast((List<?>)o);
+ params = paramList.toArray();
+ }
+ else
+ {
+ params = new Object[]{o};
+ }
}
- else
- {
- params = new Object[]{o};
- }
Endpoint ep = EndpointAssociation.getEndpoint();
InvocationHandler invHandler = ep.getInvocationHandler();
Show replies by date