How can I throw exceptions using JAX-WS 2.0?
I have been using NetBeans5.5 to develop a web service from a WSDL i.e. I write the XSD and WSDL first then generate the web service code in NetBeans5.5. How can I throw an exception so that details of the exception will be contained within the SOAP xml response? For example:
<soapenv:Body>
<soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>MyFaultCode</faultcode>
<faultstring>MyFaultString</faultstring>
</soapenv:Fault>
</soapenv:Body>
In the above sample message FaultCode and FaultString would be something that I can specify, perhaps the contents of another caught exception. I really need to have some way to display meaningful data to anyone which consumes this web service and where an exception occurs.

