This is one of the "bizzare" things in the JAX-WS spec.     By default, it's 
always "server".   However, you can control things if you set the "cause" of 
the custom exception to a javax.xml.ws.soap.SOAPFaultException  that has the 
fault code and such in it.   Note: the fault string then comes from that 
SOAPFaultException as well.


Dan


On Tuesday 09 September 2008 4:04:56 pm Carlos Eduardo Rodrigues de Almeida 
wrote:
> Hi all,
>
> I have a web service that throws a custom Exception, like:
>
> public interface SimpleService
>     public int getId(String user, String password) throws
> WrongUserException; }
>
> public class WrongUserException extends Exception{
>     private int transactionId;
>
>     public WrongUserException(String message) {
>         super(message);
>     }
>
>     public int getTransactionId() {
>          return transactionId;
>     }
> }
>
> This exception is mapped to a fault, the transactionId is mapped to
> the faultDetails, the message is mapped to the faultString but I´m not
> able to change the faultCode, it is always Server. I would like to map
> it to Client.Authentication for example.
>
> I´m using CXF with Spring.
>
> Thank you,
> Eduardo



-- 
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to