Invocationctx.Getcontextdata() Does Not Include Webservicecontext Parameters
(Doc ID 1408723.1)
Last updated on MAY 06, 2020
Applies to:
Oracle WebLogic Server - Version 10.3.3 and laterInformation in this document applies to any platform.
Symptoms
An EJB method is called as a web service in 10.3.3 WLS.
EJB interceptor mechanism is used to intercept this EJB method call.
When intercepting this method call, the following code is executed :
@Resource
WebServiceContext wsContext;
/*
* The method called at the @AroundInvoke aspect to intercept the orginal
* Service Request.
*/
@AroundInvoke
public Object intercept(InvocationContext invocationCtx) throws Exception
{
String ctxValue = (String)invocationCtx.getContextData().get("KEY");
String wsValue = (String)wsContext.getMessageContext().get("KEY");
return "From intercept: Value from invocationCtx: " +
ctxValue +
". Value from wsContext: " + wsValue;
}
}
The invocationCtx.getContextData("KEY") method returns NULL .
And, wsContext.getMessageContext().get("KEY") returns a non NULL value
Referring to EJB 3.0 core specification (section 12.5 InvocationContext) :
endpoint, the map returned by getContextData will be the JAX-WS
MessageContext [32].'
Therefore, if s wsContext().get("KEY") returns a non NULL value, invocationCtx.getContextData("KEY") should return the same non NULL value.
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |