cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piotr Smolinski (JIRA)" <>
Subject [jira] [Created] (CXF-4844) Response header Content-type not recognized for asynchronous soap/http
Date Wed, 20 Feb 2013 21:33:12 GMT
Piotr Smolinski created CXF-4844:

             Summary: Response header Content-type not recognized for asynchronous soap/http
                 Key: CXF-4844
             Project: CXF
          Issue Type: Bug
          Components: Transports
    Affects Versions: 2.7.3
         Environment: any
            Reporter: Piotr Smolinski

I've tried using asynchronous http webservices implementation. The test failed with NullPointerException:
	at org.apache.cxf.binding.soap.interceptor.StartBodyInterceptor.handleMessage(
	at org.apache.cxf.binding.soap.interceptor.StartBodyInterceptor.handleMessage(
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
	at org.apache.cxf.endpoint.ClientImpl.onMessage(
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$
	at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$
	at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$

The test however succeeded with synchronous call. After some investigation I realized that
the issue is missing Content-Type value which prevented StaxInInterceptor from injecting the

The problem was caused by different code handling headers parsing for synchronous and asynchronous
* URLConnectionHTTPConduit$URLConnectionWrappedOutputStream#updateResponseHeaders
* AsyncHTTPConduit$AsyncWrappedOutputStream#updateResponseHeaders

The first one gets Content Type from from connection. The latter one does interpret headers
and compare them (case-sensitive) against 'Content-Type' string. In the service I tested,
the server generates however 'Content-type' (which is still valid for RFC2616, 4.2 Message

The simplest solution is to fix AsyncWrappedOutputStream#readHeaders and replace "Content-Type".equals
with "Content-Type".equalsIgnoreCase 


This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message