Bug 781067 (SOA-3554)

Summary: New Behavior for consideration-- on HTTP 500, have SOAPClient throw an Exception that is palatable downstream
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: Rick Wagner <rwagner>
Component: unspecifiedAssignee: Mark Little <mark.little>
Status: ON_QA --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.3.0 GACC: jcoleman, tcunning
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-3554
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
When SOAPClient is used and an HTTP 500 Error is encountered, SOA-P throws an Exception containing the HTTP 500 stack trace which is not handled by ActionProcessingPipeline, resulting in an uninformative message.
Story Points: ---
Clone Of:
: 874196 (view as bug list) Environment:
SOA-P 5.x (5.1, 5.2)
Last Closed: Type: Support Patch
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 874196, 860046    

Description Rick Wagner 2011-11-03 17:44:55 UTC
Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A0000007qe6OIAQ&sfdc.override=1
Steps to Reproduce: Use SOAPClient where the backend service will give an HTTP 500.  Observe results after that.
project_key: SOA

For future consideration.
We have a customer complaint about ESB behavior when SOAPClient is used and an HTTP 500 is encountered.  SOA-P in this case throws an Exception that contains the HTTP 500 stack trace, which ActionProcessingPipeline receives. In forming replyTo Msg, it uses Util and fails because the Exception isn't in a format it is prepared to handle.

The end result is that the pipeline does not provide a useful message.

A fix is suggested below. By properly formatting the Exception, Util is happy with the results and everything works as it should.  The customer that opened the case validates that the symptom reported has not happened since using this code.

// Code from SOAPClient, as fixed.  To find the spot, grep for 'if(responseAsOgnlMap) then compare from there.


       if(responseAsOgnlMap) {
            try {
                String mergedResponse = soapUIInvoker.mergeResponseTemplate(wsdl, getEndpointOperation(), soapServiceName, response.getBody(), httpClientProps, null, soapNs);
                response.setBody(mergedResponse);
            } catch (IOException e) {
                Exception validException = new Exception("IOException in attempt to set Response body with merged result, possibly as result of an HTTP 500");
                throw new ActionProcessingException("soapUI Client Service invocation failed3.", validException);
            } catch (SAXException e) {
                throw new ActionProcessingException("soapUI Client Service invocation failed4.", e);
            }
        }

Comment 2 Rick Wagner 2012-11-12 16:17:12 UTC
This fix incorporated in changeset found at [1].

Provided via JBESB-3872.


[1] https://source.jboss.org/changelog/JBossESB?cs=38240

Comment 3 JBoss JIRA Server 2012-11-20 19:32:19 UTC
Tom Cunningham <tcunning> updated the status of jira JBESB-3872 to Closed