Hi
I am new to Jboss resteasy, I am using a oneway=true in the requets url, I also got the PreProcessInterceptor working fine, when the client calls the webservice with oneway=true then the client is able to get the response as 202. But in the interceptor, I see the request is of type org.jboss.resteasy.mock.MockHttpRequest and I was unable to get the request.getAttribute () (is always null) which the client has specified while calling the service. If I do not use oneway=true then request.getAttribute ("attribute") is not null. When I decompiled the code org.jboss.resteasy.core.AsynchronousDispatcher.invoke(HttpRequest in, HttpResponse response, ResourceInvoker invoker) found that
if(queryParameters.get("oneway") != null)
oneway(in, response, invoker);
public void oneway(HttpRequest request, HttpResponse response, final ResourceInvoker invoker)
{
logger.debug("IN ONE WAY!!!!!");
final MockHttpRequest in;
try
{
in = MockHttpRequest.deepCopy(request);
}
org.jboss.resteasy.mock.MockHttpRequest.
deepCopy(HttpRequest request)
throws IOException
{
MockHttpRequest mock = new MockHttpRequest();
mock.uri = request.getUri();
mock.httpHeaders = (HttpHeadersImpl)request.getHttpHeaders();
mock.httpMethod = request.getHttpMethod();
byte bytes[] = ReadFromStream.readFromStream(1024, request.getInputStream());
mock.inputStream = new ByteArrayInputStream(bytes);
mock.preprocessedPath = request.getPreprocessedPath();
return mock;
}
I see that in the deepcopy method of MockHttpRequest, the attributes are getting missed. Can I know why the attributes are getting missed?
Any help would greatly appreciated.
Thanks