You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by juliocest <ju...@gmail.com> on 2007/11/15 13:54:24 UTC
Get HTTP ContentType
Hi!
I would like to read the content of HTTP header, in my service provider with
encapsulate some XML. I am trying to do:
String httpconstant = HTTPConstants.HTTP_CONTENT_TYPE;
But I just receive:
Content-Type
Thanks.
Júlio
--
View this message in context: http://www.nabble.com/Get-HTTP-ContentType-tf4811689.html#a13767057
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Get HTTP ContentType
Posted by Peter Hrastnik <Pe...@sonydadc.com>.
Hi!
If you want to retrieve the Content-Type HTTP header of the current call,
you could do:
MessageContext context = MessageContext.getCurrentMessageContext();
HttpServletRequest req = (HttpServletRequest)
context.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
String contentType = req.getHeader(HTTPConstants.HEADER_CONTENT_TYPE));
Bye,
Peter.
juliocest <ju...@gmail.com> schrieb am 15.11.2007 13:54:24:
>
> Hi!
>
> I would like to read the content of HTTP header, in my service provider
with
> encapsulate some XML. I am trying to do:
>
> String httpconstant = HTTPConstants.HTTP_CONTENT_TYPE;
>
> But I just receive:
>
> Content-Type
>
> Thanks.
>
> Júlio
> --
> View this message in context: http://www.nabble.com/Get-HTTP-
> ContentType-tf4811689.html#a13767057
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org