Reputation: 21
I am using contract first approach to publish a web service using JAX-WS. There are no SOAP fault in the WSDL, but the existing web service throws fault exceptions appropriately.
I am unable to throw similar fault exception as the service method I am implementing now asks to add throws clause.
I could find this question as related one.
Upvotes: 0
Views: 1467
Reputation: 15619
If I understood you correctly, you are asking how to add the thrown exception to your wsdl?
There are a few reasons why a thrown exception doesn't show up in a generated wsdl
throws MyException
to your webservice method (you caught the exception instead).@WebFault
annotation to your exception class, but in my experience this isn't required (perhaps it depends on the jax-ws version you use).Upvotes: 1