cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramesh (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CXF-7412) PhaseInterceptorChain has thrown exception, unwinding now java.lang.NullPointerException: null at org.apache.cxf.binding.soap.saaj.SAAJUtils.getHeader(SAAJUtils.java:43)
Date Mon, 03 Jul 2017 14:31:00 GMT

     [ https://issues.apache.org/jira/browse/CXF-7412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ramesh updated CXF-7412:
------------------------
    Attachment: TestProj.zip

Hi, attached is my test maven program. Please run the SampleWsApplication class as springboot
app and request the url as http://localhost:9080/MyWeb/services/Hello. 

you will get 

java.lang.NullPointerException: null
	at org.apache.cxf.binding.soap.saaj.SAAJUtils.getHeader(SAAJUtils.java:43) ~[cxf-rt-bindings-soap-3.1.10.jar:3.1.10]
	at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.createProtocolMessageContext(SOAPHandlerInterceptor.java:261)
~[cxf-rt-frontend-jaxws-3.1.10.jar:3.1.10]
	at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessageInternal(SOAPHandlerInterceptor.java:161)
~[cxf-rt-frontend-jaxws-3.1.10.jar:3.1.10]
	at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:124)
~[cxf-rt-frontend-jaxws-3.1.10.jar:3.1.10]
	at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:71)
~[cxf-rt-frontend-jaxws-3.1.10.jar:3.1.10]
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
~[cxf-core-3.1.10.jar:3.1.10]
	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
[cxf-core-3.1.10.jar:3.1.10]


>  PhaseInterceptorChain has thrown exception, unwinding now java.lang.NullPointerException:
null at org.apache.cxf.binding.soap.saaj.SAAJUtils.getHeader(SAAJUtils.java:43)
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-7412
>                 URL: https://issues.apache.org/jira/browse/CXF-7412
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime, Soap Binding
>    Affects Versions: 3.1.10
>            Reporter: Ramesh
>         Attachments: TestProj.zip
>
>
> 	
> server.port=9080
> cxf.path=/MyWeb/services
>      @Bean
> 	public Endpoint endPoint() {
> 		EndpointImpl endpoint = new EndpointImpl(endPointSpringbus, myserviceImpl);
> 		endpoint.publish("/Hello");
> 		List<Handler> handlerChain = endpoint.getBinding().getHandlerChain();
> 		handlerChain.add(new SimpleSOAPLoggingHandler());
> 		endpoint.getBinding().setHandlerChain(handlerChain);
> 		return endpoint;
> 	}
> a) if I request the url like "http://localhost:9080/MyWeb/services/Hello" it gives exception
 **Interceptor for {http://example.com/}HelloPortImplService has thrown exception, unwinding
now java.lang.NullPointerException: null at org.apache.cxf.binding.soap.saaj.SAAJUtils.getHeader(SAAJUtils.java:43)
~[cxf-rt-bindings-soap-3.1.10.jar:3.1.10]**
> b) if I request the url like "http://localhost:9080/MyWeb/services/Hello?wsdl" i am getting
as expected
> c) if i remove my code from endpoint 
>  List<Handler> handlerChain = endpoint.getBinding().getHandlerChain();
> 		handlerChain.add(new SimpleSOAPLoggingHandler());
> 		endpoint.getBinding().setHandlerChain(handlerChain);
> and hit the url like "http://localhost:9080/MyWeb/services/Hello" then it gives 
> "No binding operation info while invoking unknown method with params unknown." exception
> Please let me know why i am getting exception from point a.
> what i am doing wrong with handler... I don't want any fault nullpointer exception should
be thrown instead at least it should say "No binding operation info while invoking unknown
method with params unknown."  Something wrong with handler chain.. when i add handler it gives
exception and when i remove handler it shows different exception.
> Here i am using handler for logging the request and response messages at single place.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message