axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fernandez Martinez, Alejandro" <a.fernandez.marti...@ibermatica.com>
Subject [patch] Handler to deploy services programmatically
Date Wed, 10 Apr 2002 16:39:30 GMT
Hi folks,

We have found no way to deploy services programatically, so we set to the
task.

We needed to use Axis to publish some SOAP services programatically. Also,
these should be provided by our own custom-created objects, not instantiated
by Axis. This is very useful when you want to use Axis as an embedded SOAP
platform, instead of letting it handle all the SOAP application. The
following two classes implement a handler that sets the correct service
provider.

Sorry I could not make a proper patch, one of the problems of developing on
Windows I guess :)  Given the level of interest the issue raised in a former
message (null), probably it will be ignored anyway.

The provided .jar file contains both necessary classes to use it, in the
correct locations. If I can do something to improve the patch, please let me
know.

In the file server-config.wsdd, it's enough to add the following line: 

   <requestFlow>
    <handler type="java:org.apache.axis.handlers.JWSHandler"/>
+   <handler type="java:org.apache.axis.handlers.ProxyHandler"/>
   </requestFlow>

To publish an object 'theObject' that implements an interface Class
'theInterface', it's enough to call (in server space):
	
org.apache.axis.providers.java.ProxyProvider.getInstance().publishService(th
eInterface, theObject);

To call the object, you would use the URL
	http://localhost:8080/axis/services/fully.qualified.interface.Name

If someone is interested, I'll post some classes to test the service. The
only problem is that, as expected, you have to publish it in the VM of the
server; it can be done via a servlet, or (for testing purposes) in the same
ProxyProvider.

Un saludo,

Alex.


Mime
View raw message