Throwable
objects (that means exceptions and errors) can’t be transferred directly, because they can’t be serialized to XML (the StackTraceElement
doesn’t have a no-arg constructor, which is required by JAXB).
You have to use SOAP faults for that. See this question. It points you to the @WebFault
annotation which you should put on your exception class. (Also probably check this and this)