On Tuesday, July 24, 2012 07:04:03 AM jason.hobbs wrote: > We have a Swing application with CXF 2.5.4 communicating with a Tomcat 6 > application, also with CXF 2.5.4. Apache HTTPd is deployed in front of > Tomcat (proxying via AJP) to help with SSL. > > Sporadically, this combination results in a content type of text/plain > being returned, as in the following example. It doesn't hurt anything > CXF to CXF, but does cause some problems with interoperability (as a .NET > client in a peer organization fails to parse the response if it is > text/plain). We recently converted from Sun Metro to CXF, and did not > experience this issue before. > > I realize the bug may well be in HTTPd (v2.2 on Windows); if we connect > directly to Tomcat, we haven't seen this problem. I thought I would post > here to see if others have had a similar issue, and could suggest a fix.
Definitely not something I've ever seen before. Hmm.... Can you try a proxying using normal HTTP instead of AJP? Maybe a bug in the AJP connector? How about with Tomcat 7 instead of 6? Just throwing some stuff out to try. :-) Dan > From the client side logs: > > ID: 27 > Address: https://XXXX > Encoding: UTF-8 > Content-Type: text/xml > Headers: {Accept=[*/*], Connection=[Keep-Alive], SOAPAction=["XXXX"]} > Payload: <soap:Envelope > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">...</soap:Envelope> > -------------------------------------- > > ---------------------------- > ID: 27 > Response-Code: 200 > Encoding: ISO-8859-1 > *Content-Type: text/plain* > Headers: {connection=[Keep-Alive], content-type=[text/plain], Date=[Tue, > 24 Jul 2012 13:48:17 GMT], Keep-Alive=[timeout=5, max=99], > transfer-encoding=[chunked]} > Payload: <soap:Envelope > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">...</soap:Envelope> > -------------------------------------- > > The Tomcat logs appear to state that it sent it as text/xml, so perhaps > the handshake between Tomcat and HTTPd is the issue... > > ---------------------------- > ID: 30 > Address: https://XXXX > Encoding: UTF-8 > Http-Method: POST > Content-Type: text/xml; charset=UTF-8 > Headers: {Accept=[*/*], Cache-Control=[no-cache], connection=[keep-alive], > Content-Length=[1482], content-type=[text/xml; charset=UTF-8], > host=[XXXX], pragma=[no-cache], SOAPAction=["XXXX"], user-agent=[Apache > CXF 2.5.4]} Payload: <soap:Envelope > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> ... > </soap:Envelope> -------------------------------------- > > --------------------------- > ID: 30 > Encoding: UTF-8 > *Content-Type: text/xml* > Headers: {} > Payload: <soap:Envelope > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> ... > </soap:Envelope> -------------------------------------- > > > > > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/CXF-2-5-on-Tomcat-6-with-Apache-HTTPd-ret > urning-content-type-text-plain-sporadically-instead-of-textl-tp5711494.htm > l Sent from the cxf-user mailing list archive at Nabble.com. -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
