@WebFault is a JAX-WS annotation.   Thus, the simple frontend that you 
are using doesn't know anything about it.   If you want to use the 
JAX-WS annotation, you should be using the jax-ws frontend.  For the 
most part, just changing from simple:server to jaxws:server and adding 
the @WebService annotation should do it.


Dan


On Monday 24 September 2007, Kaleb Walton wrote:
> Can anyone speak to this issue? I have not yet found a solution.
>
> Regards,
> Kaleb
> |
>   >-------------------------------------------------------------------
>   >-------------------------------------------------------------------
>   >------------|
>   >
>   |Specifying an exception as a WebFault using Simple Server
>   | (simple:server)                                                   
>   |                      |
>   |
>   >-------------------------------------------------------------------
>   >-------------------------------------------------------------------
>   >------------|
>
> Exceptions that I throw are not rendered as Fault's to web service
> clients even after specifying WebFault annotations on the Exception
> class. I can see the ServiceException in the WSDL but the methods
> themselves are just ignoring the fact that I'm throwing exceptions.
> Can anyone point me in the right direction?
>
> I have an exception defined as follows:
>
> @WebFault(name="ServiceFault")
> public class ServiceException extends Exception {
>   // Custom Exception Implementation
> }
>
>
> I'm using Spring to configure a simple:server:
>
> <simple:server id="myServer" serviceClass="a.b.c.MyService"
> serviceBean="#myService" address="/MyService"/>
>
>
> I'm throwing ServiceExceptions on each method in MyService:
>
> class MyService {
>   public ServiceResult find(ServiceArg arg) throws ServiceException {
>     // do stuff
>   }
> }
>
> Regards,
> Kaleb



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to