Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2998

Unwrapped responses with 2 or more elements and -exsh throws exception on request

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.10, 2.3
    • 2.3, 2.2.11
    • None
    • None
    • CXF 2.3-SNAPSHOT (2.2.10 also tested with identical results) running inside of a Jetty 6 container on Ubuntu Linux 10.10.

    • Unknown

    Description

      This JIRA incident was created by suggestion from the Nabble CXF Forums in the following thread: http://cxf.547215.n5.nabble.com/Problem-with-unwrapped-responses-containing-multiple-elements-td2841497.html#a2841497

      Essentially, if a message is unwrapped and contains multiple response elements, a valid XML request will trigger the following exception in the server:
      Sep 16, 2010 12:15:44 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
      WARNING: Application

      {urn:wsdl.test.cxf.com}

      WSTestService#

      {urn:wsdl.test.cxf.com}

      Test has thrown exception, unwinding now
      org.apache.cxf.interceptor.Fault: wrong number of arguments while invoking public void com.cxf.test.wsdl.WSTestPortTypeImpl.test(com.cxf.test.messages.ClientInfoHeader,javax.xml.ws.Holder,javax.xml.ws.Holder) with params [].
      at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:159)
      at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:86)
      at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:133)
      at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:60)
      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:441)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
      at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:244)
      at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:110)
      at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:311)
      at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:275)
      at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
      at org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      at org.mortbay.jetty.Server.handle(Server.java:326)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalArgumentException: wrong number of arguments
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)
      at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)
      ... 28 more

      CXF fails to find the matching function prototype for the corresponding request in this case. Note that this does work as expected if the "-exsh" switch isn't used; extracting SOAP headers seems to affect whether CXF will properly route the request or not.

      Attachments

        1. TestMessages.xsd
          1 kB
          Justin Lindh
        2. cxf-unwrap-bug.wsdl
          2 kB
          Justin Lindh

        Issue Links

          Activity

            People

              dkulp Daniel Kulp
              justinlindh Justin Lindh
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: