Ok, my bad. The NPE was actually happening in my code :)
Just so you know... it was happening in my AggregationStrategy implementation:
@Override
public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
if (weHaveAnException(newExchange)) {
if (weHaveTheDepositOrCancelWithdrawResponseMessage(oldExchange)) {
return oldExchange; // ignore the exception
} else {
//noinspection ThrowableResultOfMethodCallIgnored
oldExchange.setException(newExchange.getException());
// propagate exception
return oldExchange;
}
}
...snip...
oldExchange was null, thus the NPE on oldExchange.setException(...)
I have fixed it like this:
@Override
public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
if (weHaveAnException(newExchange)) {
if (weHaveTheDepositOrCancelWithdrawResponseMessage(oldExchange)) {
return oldExchange; // ignore the exception
} else {
//noinspection ThrowableResultOfMethodCallIgnored
if (oldExchange != null) {
oldExchange.setException(newExchange.getException()); // propagate
exception
return oldExchange;
} else {
return newExchange;
}
}
}
...snip...
and everything is working as expected: cxf is returning my custom soap fault :)
Thanks for your support and keep up with the good work!
Mirko
On Wed, Aug 3, 2011 at 10:27 PM, Mirko Caserta <[email protected]> wrote:
> By looking at ObjectHelper.java:1139 I also think the NPE is happening
> somewhere else. I'll try to debug using breakpoints in IntelliJ idea first
> thing in the morning and will also try to provide more of the stack trace.
>
> Thanks for your help!
>
> Mirko
>
> Il giorno 03/ago/2011, alle ore 21:13, Claus Ibsen <[email protected]> ha
> scritto:
>
>> ObjectHelper.java:1139
>