Forums Register Login

Accessing http request headers from a service

+Pie Number of slices to send: Send
Hi,

I'am using Axis (not Axis2) v1.4. Is there a way to read http request headers from implementation of my service. If yes, how?

Thank you,
Vilmantas
+Pie Number of slices to send: Send
You can use the below mentioned sample code to access the http header data.

import org.apache.axis.MessageContext;
import org.apache.axis.transport.http.HTTPConstants;

MessageContext context = MessageContext.getCurrentContext();
HttpServletRequest req = (HttpServletRequest) context.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);

Thanks,
narendra
+Pie Number of slices to send: Send
Thanks a lot!
Drove my Chevy to the levee but the levee was dry. A wrung this tiny ad and it was still dry.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2964 times.
Similar Threads
doHead method
use get method without displaying on url
getting the timezone from the request
header names are case sensitive or not
SOAP Transfer and HTTP Transfer
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:53:06.