WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Exception reporting by Weblogic back to client

    Posted Mon March 27, 2023 09:15 AM

    Hello,

    I have a simple Web application that implements EJB Web services. My application throws an IllegalArgumentException at runtime. This is an expected behaviour. The client (SOAPUI in this case) never sees a soap fault message from WebSphere. Further, upon inspecting log files I do not seem to find any indication of the exception. It is almost as if WebSphere did not bubble up the exception back to the client. Instead, it seems that WebSphere chewed up the exception never to be seen again.

    How can I get WebSphere to report back the exception back to the client? I am using WebSphere 9.5.0.12

    Any ideas or thougths are appreciated.



    ------------------------------
    octavio echevarria
    ------------------------------


  • 2.  RE: Exception reporting by Weblogic back to client

    Posted Mon March 27, 2023 09:20 AM
      |   view attached
    Hi,

    Did you make sure that the exception is thrown and not caught in your code ?





  • 3.  RE: Exception reporting by Weblogic back to client

    Posted Mon March 27, 2023 12:29 PM

    Hi Octavio,

    I'm assuming that you can see that your application is throwing the IllegalArgumentException on the WebSphere provider side and therefore it was actually invoked.  That would rule out any errors that might have occurred before the web services engine was invoked.

    Set this trace spec to see you can find anything amiss in the trace.log file:

    *=info:com.ibm.ws.webservices.*=all:org.apache.*=all:com.ibm.ws.websvcs.*=all:com.ibm.ws.metadata.*=all



    ------------------------------
    Barbara Jensen
    ------------------------------



  • 4.  RE: Exception reporting by Weblogic back to client

    Posted Mon April 03, 2023 12:17 PM

    Hi Barbara,

    I set the trace spec as you suggested.  I can see both the Inbound and Outbound HTTP SOAP messages in the trace.log file. I also see System.out.println() statements that I put right before I throw the exception. So I am pretty confident the exception is taking place.However, I do not see any indications that the web services engine is processing any sort of exception. 
    Is it possible that I need to configure/enable the engine to actually do something when the exception occurrs? 



    ------------------------------
    octavio echevarria
    ------------------------------



  • 5.  RE: Exception reporting by Weblogic back to client

    Posted Tue April 04, 2023 12:28 PM

    Hi Octavio,

    Does your Outtbound message have a SOAPFault in it, or something else?  An error in a web service is supposed to result in a SOAPFault.



    ------------------------------
    Barbara Jensen
    ------------------------------



  • 6.  RE: Exception reporting by Weblogic back to client

    Posted Tue April 04, 2023 01:33 PM

    Hello Barbara,

    The outbound message does not have a SOAPFault message in it. Oddly enough, it looks like a normal (non-fault) SOAP response. I hate to make comparisons, however I wll mention that when I ran the same app on JBoss EAP I do get the expected SOAPFault message which includes a reference to the exception that was thrown by my application. Do you think that differences between Axis2 and CXF web services engines  could have something to do with this?



    ------------------------------
    octavio echevarria
    ------------------------------



  • 7.  RE: Exception reporting by Weblogic back to client

    Posted Wed April 05, 2023 10:26 AM

    WebSphere always maps the exception to SoapFault in response message, I am not sure why the SoapFault is not sent in response. Can you open a Salesforce case, so we can investigate this issue? 



    ------------------------------
    Syed Wadood
    ------------------------------