axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <>
Subject Re: Embedding Axis
Date Tue, 11 Mar 2003 21:01:56 GMT
OK, I've spent a bit more time probing around axis (and this time it is 
*not* 2 AM :) ).  I think I can ask some more specific questions now.

As I see it, AxisServlet is pretty dependent on the configuration being 
a WSDD configuration.  For example, in the Admin class I see stuff like 
this for listing the available services:

if (config instanceof WSDDEngineConfiguration) {
   WSDDDeployment deployment =

This seems highly WSDD specific!  I do not see any other provisions in 
there to list services which are not deployed through WSDD files.

So, if I want to still be able to use AxisServlet and the AdminServlet I 
am starting to realize that my EngineConfiguration *must* be an instance 
of WSDDEngineConfiguration.  In my example that I posted previously, I 
used SimpleProvider which was definitely not an implementation of 
WSDDEngineConfiguration.  What do people use SimpleProvider for then? 
Just testing?

Also, as I see it, I have three options to deploy servies from my class:

1) Create a WSDDService descriptor by hand

2) Ditch AxisServlet and the AdminServlet

3) Ditch RPCHandler?  I know that the JWSHandler is able to compile java 
files and deploy them automatically.  I cannot understand how it 
registers its classes with Axis, but it can do so because it has its own 
handler.  But, I'm also guessing that then the JWS services aren't 
registered with the AxisServlet - so when one lists the available 
services, the JWS services won't show up.  I'll have to look at this 
more thoroughly next.


Dan Diephouse

Dan Diephouse wrote:
> I have been working on creating an Avalon service that uses Axis.  What 
> I am trying to do is allow avalon services to be exposed easily as a 
> SOAP service.  I have the first step done.  I create my configuration 
> and my AxisServer, as well as provide these this server to my servlet. I 
> can query the Version service no problem.
> Now the problem comes in hot deploying classes.  It is not clear what is 
> the best way to do this.  What I did was use the SimpleProvder.  I 
> create my SOAPService like so:
> SOAPService service = new SOAPService( new RPCProvider() );
> service.setOption( RPCProvider.OPTION_WSDL_SERVICEPORT, serviceName );
> service.setOption( RPCProvider.OPTION_CLASSNAME, classService );
> service.setOption( RPCProvider.OPTION_SCOPE, Scope.DEFAULT.getName());
> if ( methods == null)
> {
>     service.setOption( RPCProvider.OPTION_ALLOWEDMETHODS, "*" );
> }
> else
> {
>     service.setOption( RPCProvider.OPTION_ALLOWEDMETHODS, methods );
> }
> // Set up service description
> // Do I need this????
> ServiceDesc sd = service.getServiceDescription();
> TypeMappingRegistry tmr = getAxisServer().getTypeMappingRegistry();
> sd.setTypeMappingRegistry(tmr);
> sd.setTypeMapping( DefaultTypeMappingImpl.getSingleton() );
> simpleProvider.deployService( serviceName, service );
> OK, now a couple questions:
> 1) Am I even close to being on the right track for doing this kind of 
> thing?
> 2) I took the TypeMappingRegistry things from the JWSHandler.  Do I 
> actually need to worry about this - or will axis take care of it when I 
> deploy my service?
> 3) When I query the service from the Axis Servlet in my unit tests I get 
> this:
> <h2>And now... Some Services</h2>
> <ul>
> <li>null <a 
> href="http://localhost:0/services/null?wsdl"><i>(wsdl)</i></a></li>
> </ul>
> Obviously, I haven't registered my class correctly.  What might I be 
> doing wrong?
> Thanks for your time,
> Dan Diephouse

View raw message