[jbossws-issues] [JBoss JIRA] Updated: (JBWS-2432) NullPointerException processing headers without actor

Richard Opalka (JIRA) jira-events at lists.jboss.org
Tue Dec 16 14:35:54 EST 2008


     [ https://jira.jboss.org/jira/browse/JBWS-2432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Opalka updated JBWS-2432:
---------------------------------

    Fix Version/s: jbossws-native-3.0.6
         Assignee: Richard Opalka


> NullPointerException processing headers without actor
> -----------------------------------------------------
>
>                 Key: JBWS-2432
>                 URL: https://jira.jboss.org/jira/browse/JBWS-2432
>             Project: JBoss Web Services
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: jbossws-native
>    Affects Versions: jbossws-native-3.0.1
>         Environment: JBoss 4.2.3, JDK 1.6_07, Ubuntu Linux 8.04
>            Reporter: Jose Antonio
>            Assignee: Richard Opalka
>             Fix For: jbossws-native-3.0.6
>
>
> When processing headers in a handler and doing a call to SOAPMessageContext.getHeaders, It fails with a NullPointerException if the processed header does not define an actor.
> The critical part is this:
> public class SOAPMessageContextJAXWS extends MessageContextJAXWS implements SOAPMessageContext
> ...........................
>   public Object[] getHeaders(QName qname, JAXBContext context, boolean allRoles)
> .............................
>                SOAPHeaderElement hElement = headerElements.next();
>                Name hName = hElement.getElementName();
>                if (qname.equals(new QName(hName.getURI(), hName.getLocalName())))
>                {
>                   URI actor = new URI(hElement.getActor());
>                   if (roles.contains(actor) || allRoles)
>                   {
>                      headers.add(hElement);
>                      // FIXME
>                      // SOAPMessageContext.getHeaders should return unmarshalled objects
>                      // http://jira.jboss.org/jira/browse/JBWS-1105
>                   }
>                }
> .......................................
> So it calls to getActor over the header and it returns null, which makes the call to new URI to fail with NullPointerException. It should check that getActor is not null before calling to new URI.

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

        



More information about the jbossws-issues mailing list