WSDoAllReceiver throws NPE if older WssNS is used
-------------------------------------------------

         Key: WSS-41
         URL: http://issues.apache.org/jira/browse/WSS-41
     Project: WSS4J
        Type: Bug

    Reporter: Yevgeny Rouban
 Assigned to: Davanum Srinivas 
    Priority: Minor


In the following part of the WSDoAllReceiver I encountered a 
NullPointerException (headerElement == null
ath the last command) because my SOAP envelope had wsseNS other than 
WSConstants.WSSE_NS.
Actually that was set to WSSE_NS_OASIS_2003_06. So I suggest to change 

hE.getNamespaceURI().equals(WSConstants.WSSE_NS)  
to 
hE.getNamespaceURI().equals(reqData.getWssConfig().getWsseNS())

---------------------------------------- WSDoAllReceiver.java
           Iterator headers = sHeader.examineHeaderElements(actor);

            SOAPHeaderElement headerElement = null;
            while (headers.hasNext()) {
                org.apache.axis.message.SOAPHeaderElement hE = 
(org.apache.axis.message.SOAPHeaderElement) headers.next();
                if (hE.getLocalName().equals(WSConstants.WSSE_LN)
                        && hE.getNamespaceURI().equals(WSConstants.WSSE_NS)) {
                    headerElement = hE;
                    break;
                }
            }
            ((org.apache.axis.message.SOAPHeaderElement) headerElement)
                    .setProcessed(true);
---------------------------------------- 


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to