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 "Garzon Maldonado, Jesus Javier" <jg...@indra.es> on 2005/05/31 12:14:00 UTC
Question about handlers
Hello all,
Is there any way to pass data from handlers to service implementations?, (that is, XXXBindingImpl classes)
For example, a handler perform user authentication and service implementation needs that user to login a database.
Thanks.
Javi Garzón
Re: Question about handlers
Posted by mm...@aessuccess.org.
Don't know if this is the best way, but I've done it through setting and
getting properties.
Handler
ctx.setProperty("USER", "SOME USER");
Implementation
String user = (String) ctx.getProperty("USER");
You can also setProperty in the implementation and have a post handler pick
it up with the getProperty.
Mark Malinoski
Consultant
AES/PHEAA
"Garzon
Maldonado, Jesus
Javier" To
<jgarzon@indra.es <ax...@ws.apache.org>
> cc
05/31/2005 06:14 Subject
AM Question about handlers
Please respond to
axis-user@ws.apac
he.org
Hello all,
Is there any way to pass data from handlers to service implementations?,
(that is, XXXBindingImpl classes)
For example, a handler perform user authentication and service
implementation needs that user to login a database.
Thanks.
Javi Garzón
RE: Question about handlers
Posted by Mark Ford <ma...@active-endpoints.com>.
You can pass information between handlers in the chain using the
MessageContext, but I don't see how you could pass information directly to
the service endpoint class. A workaround would be to install a custom
handler in the chain and have this handler set the credentials or other
information on a static class with a ThreadLocal that you could then read
from your endpoint.
-----Original Message-----
From: Garzon Maldonado, Jesus Javier [mailto:jgarzon@indra.es]
Sent: Tuesday, May 31, 2005 6:14 AM
To: axis-user@ws.apache.org
Subject: Question about handlers
Hello all,
Is there any way to pass data from handlers to service implementations?,
(that is, XXXBindingImpl classes)
For example, a handler perform user authentication and service
implementation needs that user to login a database.
Thanks.
Javi Garzón