Bug 838409 - NullPointerException in CXF DOMUtils when soap header contains null namespace element
Summary: NullPointerException in CXF DOMUtils when soap header contains null namespace...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: EAP
Version: 5.2.0 GA
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: CR1
: 5.3.0 GA
Assignee: Default User
QA Contact: Martin Vecera
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-09 02:57 UTC by Kyle Lape
Modified: 2018-11-29 20:59 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Method findAllElementsByTagNameNS in cxf/trunk/api/src/main/java/org/apache/cxf/helpers/DOMUtils.java attempts to perform elementList.add(el) when el.getNamespaceURI() == null. This means that when ReadHeaderInterceptor processes an inbound SOAP message with a null namespace Header element, the user encounters a NullPointerException. Method findAllElementsByTagNameNS now additionally checks that el.getNamespaceURI() != null before proceeding to perform elementList.add(el). ReadHeaderInterceptor can now process an inbound SOAP message with a null namespace Header element and the user no longer encounters the Exception.
Clone Of:
Environment:
Last Closed: 2014-10-15 17:26:00 UTC
Type: Support Patch
Embargoed:


Attachments (Terms of Use)
cxf-4408 patch (733 bytes, application/octet-stream)
2012-07-09 02:57 UTC, Kyle Lape
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Apache JIRA CXF-4408 0 None None None 2012-07-09 02:57:16 UTC

Description Kyle Lape 2012-07-09 02:57:15 UTC
Created attachment 596970 [details]
cxf-4408 patch

When ReadHeaderInterceptor processes the following inbound SOAP message, DOMUtils throws a NullPointerException for the null namespace Header element:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:foo="http://cxf.apache.org/foo" xmlns:bar="http://cxf.apache.org/bar">
  <soapenv:Header>
    <foo:myheader>
      <Header>
        <bar:type>mytype</head:type>
      </Header>
    </foo:myheader>
  </soapenv:Header>
  ...

A NPE guard is needed.

Comment 1 Rick Wagner 2012-07-09 20:58:15 UTC
GSS will work to manage customer expectations concerning timing.  If this patch must come after 5.3GA, that's acceptable.

Comment 2 Ryan Zhang 2012-07-20 06:34:59 UTC
Please verify this issue on 5.3.0 CR1.

Comment 3 Ryan Zhang 2012-07-20 09:02:49 UTC
The patched cxf build is fetched from https://brewweb.devel.redhat.com/buildinfo?buildID=220711

Comment 4 Jiri Pechanec 2012-07-25 11:42:07 UTC
Verified in CR1


Note You need to log in before you can comment on or make changes to this bug.