Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-11052

Soap11DataFormatAdapter throwing exception when using JAXB/JAX-WS generated code

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.18.3
    • Fix Version/s: 2.19.0
    • Component/s: camel-soap
    • Labels:
    • Estimated Complexity:
      Novice

      Description

      When using WsImport, the structure of the generated Exception class for SOAP Faults have only a two arg constructor generated ie:

      public MyException(String message, <Type> faultInfo) {}

      However in Soap11DataFormatAdapter::createExceptionFromFault the code is trying to get a reference to the single argument constructor, before it tries to find/use the two argument constructor, which would cause a NoSuchMethodException to be thrown as no such constructor exits on the class.

      The solution is to move the messageConstructor variable inside the catch block. So we try to get/use the two arg constructor and if that fails then we try to get/use the single argument constructor, which is the real logic of that try/catch block anyway.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                onders Onder Sezgin
                Reporter:
                kierans777 Kieran Simpson
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: