I believe that I don't understand what you mean. What I expect is that when I
declare a custom exception in my wsdl (and thus in my interface), and throw
it on the server side in the implementation class, the client that invokes a
method, will get exactly that declared exception.

To illustrate:

I have

@WebMethod...
public void foo() throws MyCustomException;

@WebException...
class MyCustomException extends Exception

And client invokes:

try {
 ws.foo();
catch (MyCustomException e) {
 do.failsafe();
}

I do expect my failsafe to work instead of client bailing out with a boom
and SoapFaultException stacktrace. And I have a good reason for the
expectations like that - it should work and moreover in some cases it works
fine.  But there is a set of situations, where it just breaks down. 

My problem is, that those situations happen more or less random and there is
no change (that I can locate) in WSDL nor in generated classes that would
sanction this different behaviour.

Best regards,
Piotr Berlowski


Glen Mazza-2 wrote:
> 
> 
> I'm missing something here.  What is it that you are expecting the
> client to receive instead--why is the above wrong?  You're not expecting
> a SOAP server to be sending Java exceptions to the SOAP client, right?
> 
> Glen
> 
> 
>> CXF version is 2.0.2. You can find generated exception
>> class, exception details class and relevant parts od wsdl attached to
>> this message.
>> 
>> If any more information is required, I will be more than happy to post
>> it. We are really stuck with this!
>> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JAX-WS-%2B-JAXB-problem---javax.xml.ws.soap.SOAPFaultException-thrown-instead-of-custom-exception-tf4669782.html#a13360841
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to