users@jax-rpc.java.net

Re: passing properties via deployment descriptors to a JAX-RPC service developed using the EJB model

From: trebor iksrazal <iksrazal_at_yahoo.com>
Date: Thu, 28 Jul 2005 16:54:22 -0700 (PDT)

Try to clarify what you are trying to accomplish.

1) Handlers can be client side or servier side.

Either way, you can do:

 public void init(HandlerInfo config)
 {
    Map configProps = config.getHandlerConfig();
    ...
 }

2) On the client side you pass a map into the
HandlerRegistry:

HashMap handlerConfig;
//add ClientHandler to chain of events
      java.util.List list =
svc.getHandlerRegistry().getHandlerChain(portQN);
      list.add(new
javax.xml.rpc.handler.HandlerInfo(ClientHandler.class,this.handlerConfig,null));

The syntax is a little different between axis/jwsdp.

3) Server side, I only know how to do it with axis,
via a *.wsdd file:

 <handler name="ServiceHandler"
          
type="java:org.apache.axis.handlers.JAXRPCHandler">
    <parameter name="scope" value="session"/>
    <parameter name="className"
value="gov.infoseg.mr.xtservices.ServiceHandler"/>
    <parameter name="host" value="xtrans"/>
    <parameter name="verbose" value="off"/>
  </handler>


Host and Verbose get placed into HandlerConfig on
deployment.

4) Only the handler itself can view these properties,
without hacking them into a messageContext --> xml
---> put vars --> messageContext transformation. The
Web Service itself, AFIK, cannot view these
parameters.

5) Using a SessionBean as your WebService class does
not change any of the above steps.

HTH,
iksrazal

--- Mark Hansen <mark_at_javector.com> wrote:

> I'm packaging a JAX-RPC web service as SessionBean
> according the the
> JAX-RPC 1.1 / JSR-109 specifications.
>
> I'd like to pass some properties to the SessionBean
> via the
> javax.xml.rpc.handler.MessageContext instance that
> is available via
> SessionContext.getMessageContext().
>
> Can I do this, or is the only way to set properties
> in the
> MessageContext via a JAX-RPC handler?
>
> If I can't do this, what is "best practice" for
> passing properties into
> a JAX-RPC web service deployed as SessionBean and
> deployed on a servlet
> container based JAX-RPC runtime system?
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe_at_jax-rpc.dev.java.net
> For additional commands, e-mail:
> users-help_at_jax-rpc.dev.java.net
>
>


"None are more hopelessly enslaved than those who falsely believe they are free. -- Goethe"

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com