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: Mon, 1 Aug 2005 04:29:21 -0700 (PDT)

Just about everything to do with a soap message is
available via MessageContext. The larger question is,
if I understand what you are wanting correctly, that
MessageContext is not accessible at the web service
end itself, bean or otherwise. Its only availbable
externally in a Handler, AFIK.

So in order to determine who sent the message seems
more like a typical Role/Authorization issue -
controlling access in other words.

The other option would be more complex - sending a JMS
message or something at the Handler level.

Still another idea would be to have a SOAP Session ID
generated from EJB context and returned on login, and
have that passed in on subsequent requests. Another
API for you Bean web services, in other words.

I'd be interested to find out how you end up
accomplishing it.

Good luck,
iksrazal

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

> 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
> >
>
>
---------------------------------------------------------------------
> 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"


                
__________________________________
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html