Ok. I'm not sure this is what you really want (or need) but FYI here is an
extract from code I have written to deploy a handler to a service
dynamically ( the service I want to associate with the handler is created
dynamically so I can't do this at deploy time by editing the
server-config.wsdd file)
// get axis engine
AxisEngine engine = MessageContext.getCurrentContext().getAxisEngine() ;
// get engine configuration (e.g. server-config.wsdd)
EngineConfiguration config = engine.getConfig();
if (!(config instanceof FileProvider)) {
throw new
GridServiceException(MessageUtils.getMessage("configProviderNotSupported00")
);
}
FileProvider wsddProvider = (FileProvider)config;
WSDDDeployment deployment = wsddProvider.getDeployment();
// pick out a service element in configuration
WSDDService service = deployment.getWSDDService(new QName("", "molpak/" +
serviceName ));
// pick out handler definition (not associated with service yet)
org.apache.axis.Handler handler = null ;
try
{
handler = deployment.getHandler(new QName("", serviceName + "Handler"))
;
}catch(ConfigurationException ce)
{System.err.println(ce) ; }
if(handler==null)
{
System.out.println("Handler is null !" ) ;
}
else
{
// properties associated with handler
System.out.println("handler name: " + handler.getName()) ;
System.out.println("input_filename: " +
handler.getOption("input_filename")) ;
System.out.println("xslt_file: " + handler.getOption("xslt_file")) ;
System.out.println("command: " + handler.getOption("command")) ;
this.command = (String) handler.getOption("command") ;
}
// create new handler object
WSDDHandler wsddHandler = new WSDDHandler() ;
wsddHandler.setType(new QName("", handler.getName() ) );
// create new requestFlow object add add new handler to it
WSDDRequestFlow rflow = new WSDDRequestFlow() ;
rflow.addHandler(wsddHandler) ;
System.out.println("added handler to request flow") ;
// associate request flow with our chosen service
service.setRequestFlow(rflow) ;
System.out.println("added request flow to service") ;
Hope that is informative.
Ben
----- Original Message -----
From: "Frank Schoenau" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 18, 2003 7:01 AM
Subject: RE: Deploy a Service in a ServiceObject??
> I would use Axis and there must be a way.
> Does anybody know how to get the AxisEngine inside a Service?
> When i have the running Engine, it must be possible to deploy a service
and
> to have the
> reference inside my service.
>
> I tryed to get the engine, but no way??
>
>
>
> > Another possiblity would be UDDI, which is designed specifically to
> > solve dynamic service registration and discovery.
> >
> > -----Original Message-----
> > From: Anne Thomas Manes [mailto:[EMAIL PROTECTED]
> > Sent: Friday, August 15, 2003 1:12 PM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Deploy a Service in a ServiceObject??
> >
> >
> > WS-Addressing describes a way to reference a Web service by its
> > endpoint. See
> > http://www-106.ibm.com/developerworks/webservices/library/ws-add/
> >
> > Anne
> >
> > At 06:44 PM 8/15/2003 +0200, you wrote:
> > >Yes i know!
> > >
> > >Ok, i wrote an app and this app is the webservice. I need another
> > >webservice to let my app communicate with many other nodes. At the
> > >moment i communicate from node to app about another service. My
> > >question is, how can one Webservice communicate with another by
> > >reference? So that my nodes can tell the app by a webservice who is not
> >
> > >the same i use to start the app.
> > >when i deploy my services there is no way to give the one a reference
> > to the
> > >other??
> > >
> > >I know it must go with dynamic deploying, but it doesnt work correct.
> > >
> > >???
> > >
> > > > What do you mean by "create"? Generating code and compiling it into
> > > > a class or just constructing using new. This is all just Java. You
> > > > can call any object you create, just like usual.
> > > >
> > > > > -----Original Message-----
> > > > > From: Frank Schoenau [mailto:[EMAIL PROTECTED]
> > > > > Sent: Friday, August 15, 2003 11:07 AM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: Deploy a Service in a ServiceObject??
> > > > >
> > > > >
> > > > > Hi
> > > > >
> > > > > is there any way to deploy an Object that was created in a Service
> >
> > > > > as a new Service?
> > > > >
> > > > > What i mean is that i deploy a service A, who creates an Object B.
> >
> > > > > Now i would deploy this Object B as a Service from service A.
> > > > >
> > > > > I need this two services to communicate to each other??
> > > > >
> > > > > Is there no other way than let them comm. via http??
> > > > >
> > > > > thanks Frank
> > > > >
> > > > > --
> > > > > COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
> > > > > --------------------------------------------------
> > > > > 1. GMX TopMail - Platz 1 und Testsieger!
> > > > > 2. GMX ProMail - Platz 2 und Preis-Qualit�tssieger!
> > > > > 3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday -
> >
> > > > > 8. e-Post
> > > > >
> > > >
> > >
> > >--
> > >COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
> > >--------------------------------------------------
> > >1. GMX TopMail - Platz 1 und Testsieger!
> > >2. GMX ProMail - Platz 2 und Preis-Qualit�tssieger!
> > >3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8.
> > >e-Post
> >
> >
>
> --
> COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
> --------------------------------------------------
> 1. GMX TopMail - Platz 1 und Testsieger!
> 2. GMX ProMail - Platz 2 und Preis-Qualit�tssieger!
> 3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8.
e-Post
>