You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Kieran Simpson (JIRA)" <ji...@apache.org> on 2017/03/22 22:49:41 UTC

[jira] [Updated] (CAMEL-11052) Soap11DataFormatAdapter throwing exception when using JAXB/JAX-WS generated code

     [ https://issues.apache.org/jira/browse/CAMEL-11052?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kieran Simpson updated CAMEL-11052:
-----------------------------------
    Estimated Complexity: Novice  (was: Unknown)

> Soap11DataFormatAdapter throwing exception when using JAXB/JAX-WS generated code
> --------------------------------------------------------------------------------
>
>                 Key: CAMEL-11052
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11052
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-soap
>    Affects Versions: 2.18.3
>            Reporter: Kieran Simpson
>            Priority: Minor
>              Labels: soap11
>
> When using WsImport, the structure of the generated Exception class for SOAP Faults have only a two arg constructor generated ie:
> {code:java}public MyException(String message, <Type> faultInfo) {}{code}
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)