You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "jimma (JIRA)" <ji...@apache.org> on 2010/07/27 08:31:16 UTC
[jira] Created: (CXF-2911) HttpServletRequest.getScheme() returns
null in one way webservice method
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.
[jira] Resolved: (CXF-2911) HttpServletRequest.getScheme() returns
null in one way webservice method
Posted by "jimma (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-2911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
jimma resolved CXF-2911.
------------------------
Resolution: Fixed
> 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.