Hi,
you can look at the following article:
http://cxf.apache.org/docs/defining-contract-first-webservices-with-wsdl-generation-from-java.html
The NoSuchCustomerException shows how to use the Webfault annotation.
You have to use it on the Exception class not on the interface.
Greetings
Christian
Pydipati, Karuna schrieb:
This is what I am using...
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.ws.WebFault;
import com.xxx.webservices.common.XXXFault;
@WebService(targetNamespace = "http://user.api.xxxx.com/", name = "Internal")
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@WebFault(targetNamespace = "http://user.api.xxx.com/", name = "XXXFault", faultBean =
"XXXFault")
public interface Internal {
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@WebResult(targetNamespace = "http://user.api.xxx.com/", partName = "parameters",
name = "GetUserIdResponse")
@WebMethod
public GetUserIdResponse getUserId(
@WebParam(targetNamespace = "http://user.api.xxx.com/", partName =
"parameters", name = "GetUserIdRequest")
com.xxx.api.user.GetUserIdRequest parameters,
@WebParam(targetNamespace = "http://user.api.xxx.com/",
name="AuthHeader", header=true, partName="AuthHeader")
com.xxx.webservices.common.AuthHeader authHeader)throws
XXXFault;
}
Regards
Karuna Pydipati
StubHub/eBay - Platform & Services
Phone: (415)222-8752
Email: kpydip...@ebay.com
-----Original Message-----
From: Janvier F [mailto:jmfa...@hotmail.com]
Sent: Tuesday, September 22, 2009 8:17 AM
To: cxf users
Subject: Using @WebFaul annotation
Hey People,
I browsed CXF web site in order to get an example usage of JAX-WS @Webfault
annotation, but with no luck.
Does anyone of you know a pointer to a sample annotated interface that makes
use of this.
I writing a java-first sample webservice and I would like to be able to return
a soap fault segment.
Any idea?
Thanks in advance!
J.
_________________________________________________________________
Inédit ! Des Emoticônes Déjantées! Installez les dans votre Messenger !
http://www.ilovemessenger.fr/Emoticones/EmoticonesDejantees.aspx
--
Christian Schneider
---
http://www.liquid-reality.de