axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Onur Ulusu (Garanti Teknoloji)" <>
Subject NullPointerException in isSecurityFault method
Date Fri, 24 Aug 2012 11:32:11 GMT

We have same problem mentioned below, getTextAsQName() method returns null in our example,
so we are getting nullPointerException from isSecurityFault() method. faultCode variable returned
from service is "<faultcode>{HATA KODU:}K060</faultcode>" in our case. We are
using Rampart version 1.6.2 in our project.

Is there any fixed versions for this case, if not, do you have any suggestion as a workaround?



if (soapVersionURI.equals(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI)) {
                  // This is a fault processing the security header
                  if (faultCode.getTextAsQName().getNamespaceURI().equals(WSConstants.WSSE_NS))
                        return true;

      at org.apache.rampart.RampartEngine.isSecurityFault(
      at org.apache.rampart.RampartEngine.process(
      at org.apache.rampart.handler.RampartReceiver.invoke(


Sagara Gunathunga  updated RAMPART-358:


    Fix Version/s:     (was: 1.6.2)


Moved to next release.

Possible NullPointerException in


                Key: RAMPART-358


            Project: Rampart

         Issue Type: Bug

         Components: rampart-core

           Reporter: Filippo Ortolan

            Fix For: 1.7.0

  Original Estimate: 10m

Remaining Estimate: 10m

in RampartEngine class I get a NullPointerException in line 369 (method:
isSecurityFault). Seems that this line:

if (faultCode.getTextAsQName().getNamespaceURI().equals(WSConstants.WSSE_NS)) {

                                               return true;


throws the exception because getTextAsQName() can return null and this should be


QName faultCodeQName = faultCode.getTextAsQName();

if (faultCodeQName == null) {

// handle exception

   return false; // ?

} else {

   if (faultCodeQName.getNamespaceURI().equals(WSConstants.WSSE_NS)) {

      return true;




This message is automatically generated by JIRA.

If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa

For more information on JIRA, see:


To unsubscribe, e-mail:

For additional commands, e-mail:

View raw message