users@jax-rpc.java.net

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

From: Mark Hansen <mark_at_javector.com>
Date: Fri, 29 Jul 2005 17:11:32 -0400

Thanks for your response. Here is some clarification:

(1) I'm deploying web services as described in the Web Services for J2EE
v1.1 specification (JSR-109). Sometimes the web services are deployed
in an EJB container (Session Beans) and sometimes in a web container
(JAX-RPC Service Implementation Beans).
(2) I'd like the bean, when it gets a message, to be able to determine
which endpoint that message was deliverd to.
(3) Problem is, endpoint enablement is not part of teh WSEE or JAX-RPC
specifications. So, I'm not sure - but I'm hoping that it is possible
to determine the endpoint address a message was delivered on by examing
the MessageContext.

Any ideas?

Thanks,

Mark


trebor iksrazal wrote:
> 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
>
> ---------------------------------------------------------------------
> 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
>