axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reza Shafii <reza...@hotmail.com>
Subject Deploying a dynamic service using AxisServlet
Date Sat, 02 Feb 2008 03:36:13 GMT

Hi All,
 
I am trying to dynamically add a new services to the AxisEngine underlying an AxisSrvlet which
I have deployed on an embedded Jetty server. The code 
is as follows:
 
// Create a new service
SOAPService axisService = new SOAPService();
JavaServiceDesc serviceDesc = new JavaServiceDesc();
serviceDesc.setEndpointURL(servUrl);
serviceDesc.setName(servName);
serviceDesc.loadServiceDescByIntrospection(test.implementations.SampleServi=
ce.class);
axisService.setServiceDescription(serviceDesc);
 
// Dynamically deploy the service on a SimpleProvider engine
axisEngineConfiguration = new SimpleProvider();
axisEngineConfiguration.deployService(servName, axisService);
 
// Deploy an AxisServlet on Jetty
jettyServer = new Server(SERVER_PORT);
Context root = new Context(jettyServer, SERVER_ROOT, Context.SESSIONS);
AxisServlet axisServlet = new AxisServlet();
root.addServlet(new ServletHolder(axisServlet);, URL_PATTERN);
jettyServer.start();
 
// Configure the servlet's engine with the SimplePrivider configuration whe=
re the service is deployed
AxisServer tmpAxisServer = new AxisServer(axisEngineConfiguration);
axisServlet.getEngine().getConfig().configureEngine(tmpAxisServer);
 
However I get the following exception at the last line:
 
    at sun.misc.MetaIndex.mayContain(Unknown Source)
    at sun.misc.URLClassPath$JarLoader.getResource(Unknown Source)
    at sun.misc.URLClassPath.getResource(Unknown Source)
    at sun.misc.URLClassPath.getResource(Unknown Source)
    at java.lang.ClassLoader.getBootstrapResource(Unknown Source)
    at java.lang.ClassLoader.getResource(Unknown Source)
    at java.lang.ClassLoader.getResource(Unknown Source)
    at java.lang.ClassLoader.getResourceAsStream(Unknown Source)
    at org.apache.axis.utils.ClassUtils.getResourceAsStream(ClassUtils.java=
:227)
    at org.apache.axis.configuration.FileProvider.configureEngine(FileProvi=
der.java:170)
    at sample.tests.TestOne.registerBindingUrisForServices()
 
Any help would be much appreciated.
 
Regards,
_________________________________________________________________


Mime
View raw message