Version confusion .-) All my fault, as I did not notice the mention of the axis2.xml file.

 

Thanks for clearing this up :=) If you have any ideas on how to do this using axis 1.3.

Please don’t hesitate to post J

 

Glenn

 

________________________________________

From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]

Sent: 29. januar 2006 11:11

To: [email protected]

Subject: Re: Passing properties via MessageContext

 

It's possible.... You can use MessageContext injection for that. This is the standard mechanism provided by Axis2 to access MessageContext from service impl's....

 

 public void init(MessageContext msgcts) {

        this.msgcts = msgcts;

 

    }

http://svn.apache.org/viewcvs.cgi/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/swa/EchoSwA.java?view=markup

 

HTH,

 

~Thilina

 

 

On 1/27/06, glenn bech <[EMAIL PROTECTED]> wrote:

The problem is that it is impossible, to my knowledge, to access the message

context from your service class.

 

I've seen some pages on the web describing

a way to include the message context in the method signature of the

operation etc, but I remember thinking of it as "hacky" -)

 

The only way I've been able to do what you describe, is by using a class

with static members. In the handler you invoke a method that modifies

the static members of a class, the Service class can then use "getters"

on that class to retrieve the data put in by the handler..

 

Now... Im sure some people will call this "hacky" as well... .-)

 

Hope this helps.

 

Glenn

 

 

 

-----Original Message-----

From: Denis Goeury [mailto: [EMAIL PROTECTED]

Sent: 27. januar 2006 06:49

To: [email protected]

Subject: Passing properties via MessageContext

 

Hi,

 

Is it possible to set MessageContext properties in a handler and

retrieve them from a service class? I have tried with both the module

being referenced in the axis2.xml and later in the service.xml but no

luck.

 

Thanks in advance,

 

-denis

 

 

 

 

--

"May the SourcE be with u"            

http://webservices.apache.org/~thilina/

http://thilinag.blogspot.com/                  http://www.bloglines.com/blog/Thilina              

Reply via email to