I'm sorry - I still don't understand.
Do you have an HTTP request header which is named 'RequestHeader' and looks like
RequestHeader : userId=foo ?
or is it something like
userId : foo
?
HeaderParam value has to match a header name
Cheers, Sergey
----- Original Message -----
From: "Ragini Bajpai" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, November 27, 2008 5:04 PM
Subject: RE: [Jax-rs]How to get Request Header in webservice
Yes I have this userId in RequestHeader as an attribute which contains some
value.
Regards,
Ragini
-----Original Message-----
From: Sergey Beryozkin [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2008 9:22 PM
To: [email protected]
Subject: Re: [Jax-rs]How to get Request Header in webservice
Do you an HTTP header in the request body named 'userId' ?
I meant not the actual 'body' of the request, but the whole raw HTTP
request..., sorry about the confusion if any
Hi
Do you an HTTP header in the request body named 'userId' ?
CXF 2.2-SNAPSHOT supports 1.0 api
Cheers, Sergey
----- Original Message -----
From: "Ragini Bajpai" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, November 27, 2008 3:44 PM
Subject: [Jax-rs]How to get Request Header in webservice
Hi,
I want to access Request Header data in the following piece of code.This method
is in webservice class which is mapped in
cxf-webservice.xml under <jaxrs:server/> bean.
@POST
@Path("/placeOrder")
public Response placeOrder(@HeaderParam("userId") String userId) {
String userIdString = userId;
}
Here I am getting userId null.
I am using CXF-2.1.2 which is supporting jsr311-api-0.8.
When I tried to take jsr311-api-1.0.jar then my war is not getting deployed.
Please help me. This is very urgent...
Regards,
Ragini