I'm getting a NullPointerException from DelegatingNamespaceContext when I add
the StaxTransform feature to a jaxws endpoint. Here is the difference in
inputs,

working fine:
    <ns2:getAreas xmlns:ns2="http://api.company.com/";>
    <siteId>1</siteId>
    </ns2:getAreas>

not working:
    <getAreas xmlns="http://api.company.com/";>
    <siteId xmlns="">1</siteId>
    </getAreas>

exception:

java.lang.NullPointerException
    at
org.apache.cxf.staxutils.transform.DelegatingNamespaceContext.getPrefix(DelegatingNamespaceContext.java:75)
    at
org.apache.cxf.staxutils.transform.InTransformReader.getNamespacePrefix(InTransformReader.java:322)
    at
org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:1053)
    at
org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:1011)
    at
org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:226)
    at
com.company.service.WSS4JInInterceptor.getSOAPMessage(WSS4JInInterceptor.java:57)

getSOAPMessage() in my code is the first statement in a subclass of
AbstractWSS4JInInterceptor, that immediately calls
SAAJInInterceptor.handleMessage().

The transform feature is POST_STREAM which is prior to my WSS4JInInterceptor
which is registered PRE_PROTOCOL.

If I remove the transform feature the request succeeds. I don't have control
over the client sending this xml - is this a bug in CXF or am I misusing the
interceptors?

Thanks,
Ryan






--
View this message in context: 
http://cxf.547215.n5.nabble.com/Namespace-exception-when-Transform-feature-enabled-tp5719871.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to