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

If Exchange is the last parameter on the method parameter list of a JAX-WS operation, then CXF generates a part for it, so invoking the service fails because there will be too many parameters

    XMLWordPrintableJSON

    Details

      Description

      If Exchange is the last parameter on the method parameter list of a JAX-WS operation, then CXF generates a part for it, so invoking the service fails because there will be too many parameters. This happens because AbstractInvoker.insertExchange puts the Exchange on the parameter list, but the length of the params array will be the number of parameters of the method + 1. A possible solution would be to skip the Exchange parameter in the service building process.
      For STAX services it works fine.

      Example:

      This method signature doesn't work:

      public void arithmetic(@WebParam(targetNamespace = NS_URI, name = "Num1")
      double num1, @WebParam(targetNamespace = NS_URI, name = "Num2")
      double num2,
      @WebParam(targetNamespace = NS_URI, name = "Add", mode = Mode.OUT)
      Holder<Double> add,
      @WebParam(targetNamespace = NS_URI, name = "Sub", mode = Mode.OUT)
      Holder<Double> sub,
      @WebParam(targetNamespace = NS_URI, name = "Mul", mode = Mode.OUT)
      Holder<Double> mul,
      @WebParam(targetNamespace = NS_URI, name = "Div", mode = Mode.OUT)
      Holder<Double> div,
      Exchange ex) {
      ...
      }

        Attachments

          Activity

            People

            • Assignee:
              dkulp Daniel Kulp
              Reporter:
              orbang Gyorgy Orban
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: