Ørjan Mjelde created CXF-5677:
---------------------------------

             Summary: Operation without body but non empty header causes 
IllegalArgumentException
                 Key: CXF-5677
                 URL: https://issues.apache.org/jira/browse/CXF-5677
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.7.10, 2.7.5
            Reporter: Ørjan Mjelde


Hi, we have a web service operation with an empty body but with a header. The 
header is defined in a separate name space and xsd. The service is exposed and 
accessed using JAX-WS.

When called we get an IllegalArgumentException with message, "Wrong number of 
arguments". 

Attached is a maven project with the service definitions and a unit test 
reproducing the issue.

The stack trace is as follows:

{code}
WARNING: Application 
{http://example.com/products/v1}ProductInfoService#{http://example.com/products/v1}getProducts
 has thrown exception, unwinding now 
org.apache.cxf.interceptor.Fault: wrong number of arguments while invoking 
public java.util.List 
com.example.ProductInfoSEI.getProducts(com.example.meta.v2.Head) with params 
[com.example.meta.v2.Head@184f8b33, com.example.meta.v2.Head@184f8b33]. 
        at 
org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:174)
 
        at 
org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:272)
 
        at 
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:148) 
        at 
org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.invoke(AbstractJAXWSMethodInvoker.java:237)
 
        at 
org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:68) 
        at 
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75) 
        at 
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
 
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
        at 
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
 
        at 
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:107)
 
        at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
 
        at 
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
 
        at 
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:355)
 
        at 
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:319)
 
        at 
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
 
        at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088)
 
        at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024)
 
        at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) 
        at 
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
 
        at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) 
        at org.eclipse.jetty.server.Server.handle(Server.java:370) 
        at 
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
 
        at 
org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
 
        at 
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
 
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) 
        at 
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) 
        at 
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
 
        at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
 
        at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
 
        at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
 
        at 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) 
        at java.lang.Thread.run(Thread.java:724) 
Caused by: java.lang.IllegalArgumentException: wrong number of arguments 
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 
        at java.lang.reflect.Method.invoke(Method.java:606) 
        at 
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:188)
 
        at 
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:104) 
        ... 30 more
{code}




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to