Skip to content

Commit

Permalink
Fix soap12 response issue on failed operation
Browse files Browse the repository at this point in the history
Fix #2934
  • Loading branch information
dulanjalidilmi committed Aug 23, 2023
1 parent e1cb99f commit 5dd253b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,12 @@ public InvocationResponse invoke(MessageContext msgCtx) throws AxisFault {
if (faultCodeObject instanceof SOAP11FaultCodeImpl) {
faultCode = ((SOAP11FaultCodeImpl) faultCodeObject).getTextContent();
} else if (faultCodeObject instanceof SOAP12FaultCodeImpl) {
faultCode = ((SOAP12FaultSubCodeImpl) ((SOAP12FaultCodeImpl) faultCodeObject).getSubCode()).getTextContent();
if (null != ((SOAP12FaultCodeImpl) faultCodeObject).getSubCode()) {
faultCode = ((SOAP12FaultSubCodeImpl) ((SOAP12FaultCodeImpl) faultCodeObject)
.getSubCode()).getTextContent();
} else {
faultCode = ((SOAP12FaultCodeImpl)faultCodeObject).getTextContent();
}
}

if (faultCode != null && faultCode.contains("FailedAuthentication")) { // this is standard error code according to the WS-Sec
Expand Down

0 comments on commit 5dd253b

Please sign in to comment.