HttpServletRequest.getScheme() returns null in one way webservice method -------------------------------------------------------------------------
Key: CXF-2911 URL: https://issues.apache.org/jira/browse/CXF-2911 Project: CXF Issue Type: Bug Components: WS-* Components Affects Versions: 2.2.9 Reporter: jimma Assignee: jimma Fix For: 2.3 When this SEI is deployed in tomcat , the httpServletRequest.getScheme() returns null value: @Addressing(required=true) @WebService(serviceName = "SOAPService", endpointInterface = "org.apache.hello_world.Greeter", targetNamespace = "http://apache.org/hello_world") public class GreeterImpl implements Greeter { @Resource WebServiceContext wscontext; private String myName; public GreeterImpl() { this("defaultGreeter"); } public GreeterImpl(String name) { myName = name; } public String greetMe(String me) { return "Hello " + me; } public String sayHi() { return "Bonjour from " + myName; } public void pingMe() { MessageContext msgContext = wscontext.getMessageContext(); HttpServletRequest httpServletRequest = (HttpServletRequest)msgContext.get(MessageContext.SERVLET_REQUEST); System.out.println(httpServletRequest.getScheme()); } } >From the code , the WSA interceptor will create another thread to run the >serviceInvoker interceptor and servlet thread (receives the http request) will >cleanup the request information. The serviceInvoker in the new created thread always get null value from schemeMB. package org.apache.coyote; public final class Request{ public void recycle() { bytesRead=0; contentLength = -1; contentTypeMB = null; charEncoding = null; headers.recycle(); serverNameMB.recycle(); serverPort=-1; localPort = -1; remotePort = -1; available = 0; cookies.recycle(); parameters.recycle(); unparsedURIMB.recycle(); uriMB.recycle(); decodedUriMB.recycle(); queryMB.recycle(); methodMB.recycle(); protoMB.recycle(); schemeMB.recycle(); instanceId.recycle(); remoteUser.recycle(); authType.recycle(); attributes.clear(); } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.