I'm working on a legacy project with Camel 2.16.2.  The project uses
JAX-RS/JAXB to make requests to a SOAP WS maintained by a different team.

The structure of the generated Exception class for SOAP Faults is

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

with the code generator not generating a constructor with just a message
argument.

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 is causing my app to
error out with a NoSuchMethodException.

I think 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.

If none of the smarter, wiser devs on this project has a problem, I'll raise
an issue in Jira and look at fixing it.

Thanks very much.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Bug-in-Soap11DataFormatAdapter-when-using-JAXB-JAX-WS-generated-classes-tp5795845.html
Sent from the Camel Development mailing list archive at Nabble.com.

Reply via email to