powered by Jive Software

Problem with Axis web service in plugin

I try to develop plugin with Axis web service interface. Axis servlet is deploing correctly. When i try to invoke this servlet I receive the following responce.

AXIS error

No service is available at this URL[/b]

I think it happens because the Axis servlet cann’'t find configuration .wsdd file.

I place this file to web/WEB-INF folder in the plugin folder. Am I right?

Have anybody any experience in such plugin development?

I’‘m trying to do the same thing, but i d’'ont know how to use axis in a plugin, could you help me ?

I’‘ve done some tests and i think that it’'s impossible possible.

The cause of this is plugin servlets initialization process. Wildfire init plugin servlests with root context and all axis configuration stays out of the board.

I’‘ve found one decision. I’‘ve checked out wildfire from SVN and put my Web Service in to server and made some necessary changes in wildfire’'s web.xml

Then build and deploy to Tomcat.

One thing you can do is manually add your plugin as a webapp to Jetty. We use this trick in Fastpath. Here’'s an example:

public void initializePlugin(PluginManager pluginManager, File pluginDirectory) {

// Make the expanded plugin directory be the “fastpath” webapp in the

// embedded Jetty server.

jetty = AdminConsolePlugin.getJettyServer();

try {

webapp = jetty.addWebApplication("/" + pluginDirectory.getName(), pluginDirectory.getAbsolutePath());

// The embedded web server doesn’'t know how to compile JSPs. Therefore, we have

// to manually parse a generated web.xml file and add the entries as servlets

// to the webapp.

try {

ServletHandler servletHandler = webapp.getServletHandler();

// Make the reader non-validating so that it doesn’'t try to resolve external

// DTD’‘s. Trying to resolve external DTD’'s can break on some firewall configurations.

SAXReader saxReader = new SAXReader(false);

            saxReader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd",

false);

Document doc = saxReader.read(new File(pluginDirectory, “WEB-INF” +

File.separator + “web.xml.generated”));

// Find all entries to discover name to URL mapping.

List names = doc.selectNodes("//servlet-mapping");

for (int i = 0; i < names.size(); i++) {

Element nameElement = (Element)names.get(i);

String name = nameElement.element(“servlet-name”).getTextTrim();

String url = nameElement.element(“url-pattern”).getTextTrim();

servletHandler.addServlet(name, url, (String)classMap.get(name));

}

}

catch (Exception e) {

Log.error(e);

}

}

catch (IOException ioe) {

Log.error(ioe);

}

try {

webapp.stop();

webapp.start();

}

catch (Exception e) {

Log.error(e);

}

}

public void destroyPlugin() {

try {

webapp.stop();

webapp.destroy();

}

catch (Exception e) {

Log.error(e);

}

webapp = null;

jetty = null;

}[/code]