Yes, it looks like the CXF code has a static value for content-type as
well, that will lower-case it for you.

AbstractHTTPDestination.java defines PROTOCOL_HEADERS_CONTENT_TYPE like
so:

public static final String PROTOCOL_HEADERS_CONTENT_TYPE =
Message.CONTENT_TYPE.toLowerCase();

So, if you need to get the content-type, it's probably a good idea to
use that static final member rather than a String literal.

-Chris

-----Original Message-----
From: Sergey Beryozkin [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 16, 2007 12:01 PM
To: [email protected]
Subject: Re: Accessing Message Context, HttpServletRequest, and
HttpServletResponse

Hi

One thing  I've found is that if you need to access the Content-Type
request header you need to use
a lower-key value, "content-type", "Content-Type" doesn't recognized as
a key. Not  sure whether it's the case with a servlet-based 
code though

Cheers, Sergey


----- Original Message ----- 
From: "Christopher Moesel" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, April 16, 2007 4:52 PM
Subject: Accessing Message Context, HttpServletRequest, and
HttpServletResponse


I needed access to the request object from within my service
implementation. So after finding nothing in the documentation, I dug
through the samples and found a way.

I thought this would be useful to others, so I added it to the User
Guide WIKI at the bottom of:
http://cwiki.apache.org/confluence/display/CXF20DOC/Servlet+Transport

If this is the incorrect place for it, or if this is not the recommended
approach, please feel free to modify, move, or delete it at will.

Thanks,
Chris 

Reply via email to