Skip to content

Commit

Permalink
Merge pull request #2948 from dulanjalidilmi/master
Browse files Browse the repository at this point in the history
Fix soap12 response issue on failed operation
  • Loading branch information
dulanjalidilmi authored Aug 25, 2023
2 parents 6bfa102 + 5dd253b commit fc668f4
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 fc668f4

Please sign in to comment.