Ani
I think it should work..... but it might be easiest to write a
provider that dynamically loads the JWSFL when a request comes in.
Paul
On 5/13/05, Ani Marius <[EMAIL PROTECTED]> wrote:
> Hi and thank you for your response.
> I already have a class called JWSFLDeployer which
> deploys a WS at runtime.
> What I want is this : to deploy a WS at runtime only
> if it is requested and if it is not yet deployed, and
> also the request to be intercepted by my custom
> provider.
> Thanks.
>
> --- Jaliya Ekanayake <[EMAIL PROTECTED]> wrote:
>
> > Hi Ani,
> >
> > Check whether these will help you to solve your
> > problem.
> >
> > To deploy a different provider for a service at the
> > deployment time, use the
> > following lines in the service deployment file (say
> > serivce-deploy.wsdd)
> >
> > -------------------------------------
> >
> > <service name="MyService" provider="Handler">
> > <parameter name="handlerClass"
> > value="your.package.MyProvider"/>
> > <parameter name="className" value="
> > your.package.MyService "/>
> > <parameter name="allowedMethods" value="*"/>
> > <parameter name="scope" value="request"/>
> > </service>
> > -------------------------------------
> >
> > If you want to deploy a service with a particular
> > provider at the runtime,
> > you can do it using the following code fragment.
> >
> > -------------------------------------
> > SimpleProvider sp = new SimpleProvider();
> >
> > SimpleChain reqHandlers = new SimpleChain();
> > reqHandlers.addHandler(new MyHandler() );//This is
> > optional
> > //You can pass null to request and response handler
> > chains.
> > SimpleChain resHandlers = new SimpleChain();
> >
> > MyProvider rmp = new MyProvider();
> > SOAPService rmService = new SOAPService(reqHandlers,
> > rmp, resHandlers);
> >
> > JavaServiceDesc desc = new JavaServiceDesc();
> > rmService.setOption("className","
> > your.package.MyService ");
> > rmService.setOption("allowedMethods","*");
> >
> > desc.setName("MyService ");
> > rmService.setServiceDescription(desc);
> >
> sp.deployService(Constants.ClientProperties.RMSERVICE,
> > rmService);
> >
> >
> > -------------------------------------
> >
> > Cheers,
> >
> > Jaliya
> >
> >
> >
> > -----Original Message-----
> > From: Ani Marius [mailto:[EMAIL PROTECTED]
> > Sent: Friday, May 13, 2005 12:29 PM
> > To: [email protected]; Srinath Perera
> > Subject: Re: Providers and Handlers
> >
> > Hi Srinath and thank you for your reply.
> > But, the problem I face is that I create a new Web
> > Service not from the java classes, but from the WSDL
> > file...I don't need any java classes for the new ws,
> > because its behaviour will be defined in a custom
> > XML
> > file.
> > So, I created a Handler which deploys a WS if the WS
> > is not yet deployed...the service is deployed, I can
> > see it in the list of deployed WS's. But then, the
> > request must reach my provider which in turn will
> > begin the execution for the corresponding ws, which
> > is
> > defined in the XML file.
> > --- Srinath Perera <[EMAIL PROTECTED]> wrote:
> > > Hi Ani;
> > >
> > > I think the problem you face is whn u deploy the
> > new
> > > Web Service you
> > > do not have the classes at the classpath?
> > >
> > > There is a class called ClassUtils in axis
> > provides
> > > static method for
> > > help classloading. It has method
> > > setClassLoader(String
> > > classname,ClassLoader cl); to overide/register
> > > classloaders for
> > > loading a given class. ClassUtils is used by Axis
> > to
> > > load the classes
> > > all time
> > >
> > > Before deploy your service create a classloader
> > for
> > > the class files of
> > > the serveive and register them agiens the impl
> > class
> > > of the service
> > > you want to deploy, agienst Classloader using
> > > setClassLoader(String
> > > classname,ClassLoader cl);
> > >
> > > Cheers
> > > Srinath
> > >
> > > On 5/12/05, Ani Marius <[EMAIL PROTECTED]> wrote:
> > > > Hi!
> > > > I have one urgent question :
> > > > I have my custom provider, and I want to do the
> > > > following: if I receive a request for a Web
> > > Service
> > > > that is not yet deployed, I would automatically
> > > deploy
> > > > it (there is the bussines for deploying a web
> > > service)
> > > > and to set the provider of the ws to my
> > > provider...I
> > > > tried adding a Handler in the Transport Request
> > > (which
> > > > verifies if the service is deployed, and if not
> > it
> > > > deploys it) but this didn't solve my problem
> > > entirely.
> > > > Please help me!!!
> > > > Thanks.
> > > >
> > > >
> > > > __________________________________
> > > > Yahoo! Mail Mobile
> > > > Take Yahoo! Mail with you! Check email on your
> > > mobile phone.
> > > > http://mobile.yahoo.com/learn/mail
> > > >
> > >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Small Business - Try our new resources site!
> > http://smallbusiness.yahoo.com/resources/
> >
> >
> >
> >
>
> __________________________________
> Yahoo! Mail Mobile
> Take Yahoo! Mail with you! Check email on your mobile phone.
> http://mobile.yahoo.com/learn/mail
>