Hi,
I don't understand everything in the exception handling in JAXWS.
I written a small webservice; the code is here under:
package com.kiala.handler.test.webservice;
import javax.ejb.Stateless;
import javax.jws.HandlerChain;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import com.kiala.handler.test.exception.UserException;
@Stateless
@WebService
@HandlerChain(file = "handler-chain.xml")
@SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.LITERAL)
public class ExceptionService {
public String throwException(String s) throws UserException {
if ("Hello".equals(s)) {
return "World!";
} else {
throw new UserException(s);
}
}
}