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.
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).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.