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




Reply via email to