I have created a stateless EJB annotated with the @WebServiceProvider annotatoin and made it point to a WSDL file I created (contract first web services) and implemented the Interface javax.xml.ws.Provider. the web service is correctly started in JBoss and I can consume it using SoapUI.
I would like to enhance the web service a little bit so that it gives error responses back to SoapUI, my ideal situation would be throwing a RuntimeException from the invoke() method and see it's stacktrace back in SoapUI log, but I cannot nail it.
I also tried returning a javax.xml.transform.Source object but I see nothing in the SoapUI log. Reading a little bit I came across this phrase on this link:
The faults are returned to the sender only if request/response messaging is in use. If a Web service operation is configured as one-way, the SOAP fault is not returned to the sender, but stored for further processing.
So I guess the answer to my question is to have a request/response messaging in use but how can I do that is it something to configure in the WSDL or in the Java classes?