You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Thilina Gunarathne <cs...@gmail.com> on 2008/01/21 20:17:41 UTC

Re: getCurrentMessageContext() returns null when invoked from an EJB?

Hi,
What do you mean by invoking from an EJB..

Are you invoking the service method directly without going through Axis2
(not doing an service invocation).  If that's the case it should return a
NULL as there does not exist an Axis2 created MessageContext..

~Thilina

On Jan 21, 2008 9:39 AM, Etches, Adam (GE Infra, Energy) <ad...@ge.com>
wrote:

>  Hi all first time posting…
>
>
>
> I have been looking at implementing web services in axis2-1.3 with EJB 2.1.
> I need to get a handle on the message from with in the service implementatio
> n.  I believe the correct approach for this is to invoke the method
> getCurrentMessageContext() on MessageContext from with in the service.
>
>
>
> I have tried this in a test pojo service which correctly returns the
> message context but when called *BUT* when invoking this method from anEJBnull is returned
> .
>
>
>
> Does anyone know why the getCurrentMessageContext()  returns null when
> invoked from an EJB?
>
>
>
> thanks
>
> Adam
>
>



-- 
Thilina Gunarathne  - http://thilinag.blogspot.com

RE: getCurrentMessageContext() returns null when invoked from an EJB?

Posted by "Etches, Adam (GE Infra, Energy)" <ad...@ge.com>.
The service is called from Axis2 processing the request so I would
expect the message Context to be populated.
 
Adam

  _____  

From: Thilina Gunarathne [mailto:csethil@gmail.com] 
Sent: 21 January 2008 19:18
To: axis-user@ws.apache.org
Subject: Re: getCurrentMessageContext() returns null when invoked from
an EJB?


Hi,
What do you mean by invoking from an EJB.. 

Are you invoking the service method directly without going through Axis2
(not doing an service invocation).  If that's the case it should return
a NULL as there does not exist an Axis2 created MessageContext.. 

~Thilina


On Jan 21, 2008 9:39 AM, Etches, Adam (GE Infra, Energy)
<ad...@ge.com> wrote:


	Hi all first time posting... 

	 

	I have been looking at implementing web services in axis2-1.3
with EJB 2.1. I need to get a handle on the message from with in the
service implementation.  I believe the correct approach for this is to
invoke the method getCurrentMessageContext() on MessageContext from with
in the service.

	 

	I have tried this in a test pojo service which correctly returns
the message context but when called *BUT* when invoking this method from
an EJB null is returned.

	 

	Does anyone know why the getCurrentMessageContext()  returns
null when invoked from an EJB?   

	 

	thanks

	Adam

	 




-- 
Thilina Gunarathne  - http://thilinag.blogspot.com