If your invoker get an exception, do what you want to do, then just throw out the exception. CXF fault handler will take care of the exception for you.

Willem

On 1/6/11 8:59 PM, mailingl...@fhdw-campus.de wrote:
I am currently implementing my own Invoker, which calls a
serviceImplementation. The services wsdl defines a fault:

<wsdl:fault name="MyException">
<soap:fault name="MyException" use="literal"/>
</wsdl:fault>

When this exception is thrown by the serviceImplementation and I set it
as the return value of the invoker:

public Object invoke(Exchange ex, Object o) {
[...]
MessageContentsList messageContentsList = (MessageContentsList) o;
messageContentsList.add(returnValue);
return messageContentsList;
}

I get: java.lang.IllegalArgumentException: argument type mismatch.

So my question is: How can I make the invoker pass the "myException" to
the webservice caller without getting an illegal argument exception?

Thx in advance :)



--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Reply via email to