/ Published in: Java
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** Add this to your web.xml <servlet> <servlet-name>AutoRegisterServlet</servlet-name> <display-name>Axis Autoregister Servlet</display-name> <servlet-class>such.alejandro.ws.deploy.AutoDeploy</servlet-class> <load-on-startup>30</load-on-startup> </servlet> **/ package such.alejandro.ws.deploy; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.xml.parsers.ParserConfigurationException; import org.apache.axis.transport.http.AutoRegisterServlet; import org.xml.sax.SAXException; public class AutoDeploy extends AutoRegisterServlet { private static final long serialVersionUID = 1L; public void init() throws ServletException { for (int i = 0; i < SERVICIOS_WEB.length; i++) { try { try { this.registerStream(stream); } catch (SAXException e) { this.lanzarError(nombreRecursoServicioWeb, e); } catch (ParserConfigurationException e) { this.lanzarError(nombreRecursoServicioWeb, e); this.lanzarError(nombreRecursoServicioWeb, e); } e1.printStackTrace(); } } try { this.applyAndSaveSettings(); throw new ServletException(strError, e); } } throw new ServletException(strError, e); } }