Return-Path: Mailing-List: contact axis-user-help@xml.apache.org; run by ezmlm Delivered-To: mailing list axis-user@xml.apache.org Received: (qmail 88637 invoked from network); 8 Jan 2002 17:46:43 -0000 Received: from ns-3.macromedia.com (216.35.148.254) by daedalus.apache.org with SMTP; 8 Jan 2002 17:46:43 -0000 Received: from mailhub.macromedia.com (mailhub.macromedia.com [10.2.0.16]) by ns-3.macromedia.com (8.11.0/8.9.3) with ESMTP id g08HmeS25302 for ; Tue, 8 Jan 2002 09:48:40 -0800 (PST) Received: from S1001EXM01.macromedia.com (smtp-newton.allaire.com [10.4.48.130]) by mailhub.macromedia.com (8.11.1/8.11.1) with ESMTP id g08HkkH28905 for ; Tue, 8 Jan 2002 09:46:46 -0800 (PST) Received: by S1001EXM01.macromedia.com with Internet Mail Service (5.5.2650.21) id ; Tue, 8 Jan 2002 12:46:46 -0500 Message-ID: From: Glen Daniels To: "'axis-user@xml.apache.org'" Subject: RE: Using Axis without deployment (totally dynamic) Date: Tue, 8 Jan 2002 12:51:40 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C1986C.703FC9B8" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C1986C.703FC9B8 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Thomas! =20 Comments inline: -----Original Message----- From: Thomas B=F6rkel=20 Sent: Freitag, 28. Dezember 2001 16:29 To: Axis Mailinglist Subject: Using Axis without deployment (totally dynamic) HI!=20 I'd like to use Axis in the following way:=20 - no deployment files (.wsdd) AT ALL =20 Definitely doable. =20 - my own transport =20 Yup. =20 - my own dispatcher (with my own security) =20 What exactly do you mean by this - your own transport listener = (replace AxisServlet)? =20 - dynamic WSDL generation =20 Yup.=20 What I already know:=20 - how to generate WSDL dynamically as file=20 - how to DEPLOY my own dispatcher=20 - how to implement my own transport (nice file transport example in = alpha3!)=20 Now, the question is:=20 Can Axis work without ANY deployment files in my case?=20 To test my own dispatcher, I already created some "dummy" deployment = with a dummy class and dummy method because my dispatcher should work = totally dynamic, without having to deploy each and every class and = method first. But that seems to me like a hack. Is there another way to = create a dispatcher that does not need each and every class and method = to be deployed? If working without deployment of my dispatcher is not possible, at = least how can I tell Axis from where to load the .wsdd files?=20 Hm - again, I'm not sure exactly what you mean by "dispatcher", but I = think some of what you want is pretty easy, so I'll describe it and = then you can let us know if this is good enough. First of all, Axis gets its deployment info from a = ConfigurationProvider. The default one is = org.apache.axis.configuration.FileProvider, which reads a WSDD file and = deploys it into the engine. There is also an "XMLStringProvider" in = that package, which accepts a WSDD deployment in String form without = touching the filesystem. We use this class to hardcode configurations = for some of our tests - check out test.wsdd.* for examples. So that's = one option. Another option is to simply write your own = ConfigurationProvider and have it directly deploy things into the = engine using AxisEngine.deployService(), etc. So how do you ensure a particular ConfigurationProvider is the one that = gets used in creating an AxisEngine (either a client or a server)? = There are a few ways. If you're on the client side of things, you need = to pass your desired ConfigurationProvider to the Service = (org.apache.axis.client.Service) object, either in the constructor or = by calling service.setConfigProvider() - note that this won't have any = effect after the Service has already been initialized and used. =20 On the server, you can see how things work by looking at the = AxisServlet. We get an AxisServerFactory (which will usually be = org.apache.axis.server.DefaultAxisServerFactory), and then we can = either pass in a ConfigurationProvider, or rely on the default = initialization to get us one. Default initialization will check a = system property ("axis.configProviderClass") for a classname, and use = one of those if it finds one - otherwise it uses a FileProvider = pointing to the default config file location. See = DefaultAxisServerFactory.java for details. Alternately, you can just create an AxisServer with the NullProvider, = which provides no configuration to the engine at all. Then you can = dynamically deploy things using the engine APIs. So, does this help you at all? Thanks!=20 Regards and happy new year,=20 Thomas=20 ------_=_NextPart_001_01C1986C.703FC9B8 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Using Axis without deployment (totally dynamic)
Hi=20 Thomas!
 
Comments inline:
-----Original Message-----
From: Thomas B=F6rkel =
Sent: Freitag, 28. Dezember 2001 16:29
To: = Axis=20 Mailinglist
Subject: Using Axis without deployment = (totally=20 dynamic)

HI!

I'd like to use Axis in the following way: =

- no deployment files (.wsdd) AT = ALL  

Definitely doable.

 
- my own=20 transport  

Yup.

 
- my own=20 dispatcher (with my own security)   

 What=20 exactly do you mean by this - your own transport listener = (replace=20 AxisServlet)?

 
- dynamic=20 WSDL generation  

Yup. 

What I already know:
- = how to=20 generate WSDL dynamically as file
- how = to DEPLOY my=20 own dispatcher
- how to implement my own = transport=20 (nice file transport example in alpha3!)

Now, the question is:
Can Axis work=20 without ANY deployment files in my case?

To test my own dispatcher, I already created some = "dummy"=20 deployment with a dummy class and dummy method because my = dispatcher should=20 work totally dynamic, without having to deploy each and every class = and=20 method first. But that seems to me like a hack. Is there another = way to=20 create a dispatcher that does not need each and every class and = method to be=20 deployed?

If working without deployment of my dispatcher is = not=20 possible, at least how can I tell Axis from where to load the .wsdd = files? 

Hm - again, I'm not sure exactly what you mean by=20 "dispatcher", but I think some of what you want is pretty = easy, so I'll=20 describe it and then you can let us know if this is good=20 enough.

First of all, Axis gets its deployment info from=20 a ConfigurationProvider.   The default one is=20 org.apache.axis.configuration.FileProvider, which reads a WSDD file = and=20 deploys it into the engine.  There is also an = "XMLStringProvider" in=20 that package, which accepts a WSDD deployment in String form = without=20 touching the filesystem.  We use this class to hardcode = configurations=20 for some of our tests - check out test.wsdd.* for examples.  = So that's=20 one option.  Another option is to simply write your own=20 ConfigurationProvider and have it directly deploy things into the = engine=20 using AxisEngine.deployService(), etc.

So=20 how do you ensure a particular ConfigurationProvider is = the one=20 that gets used in creating an AxisEngine (either a client or a=20 server)?  There are a few ways.  If you're on the client = side of=20 things, you need to pass your desired ConfigurationProvider to the = Service=20 (org.apache.axis.client.Service) object, either in the constructor = or by=20 calling service.setConfigProvider() - note that this won't have any = effect=20 after the Service has already been initialized and used. =20

On=20 the server, you can see how things work by looking at the = AxisServlet. =20 We get an AxisServerFactory (which will usually be=20 org.apache.axis.server.DefaultAxisServerFactory), and then we can = either=20 pass in a ConfigurationProvider, or rely on the default = initialization to=20 get us one.  Default initialization will check a system = property=20 ("axis.configProviderClass") for a classname, and use one of those = if it=20 finds one - otherwise it uses a FileProvider pointing to the = default config=20 file location.  See DefaultAxisServerFactory.java for=20 details.

Alternately, you can just create an = AxisServer with=20 the NullProvider, which provides no configuration to the engine at=20 all.  Then you can dynamically deploy things using the engine=20 APIs.

So,=20 does this help you at all?

Thanks!

Regards and happy new year,
Thomas

------_=_NextPart_001_01C1986C.703FC9B8--