Return-Path: Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 7966 invoked by uid 500); 2 Apr 2003 17:45:31 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 7957 invoked from network); 2 Apr 2003 17:45:31 -0000 Reply-To: From: "Clay Graham" To: Subject: Invalid WSDD element 'service' (wanted 'deployment') Date: Wed, 2 Apr 2003 09:45:28 -0800 Organization: newObjectivity, Inc. Message-ID: <000001c2f93f$a98c3830$0501a8c0@HADID> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello Axis Users! I have run into a bit of a wall here and desperately need to some advice on how to fix it. I have been looking through the archives quite a bit and haven't found anything "quite" like this problem. I have done the basic axis install to the tomcat webapp directories, I am using the latest version of xerces (2.4) with tomcat 4.1.3. My "happy" page comes up just fine: ##################BEGIN HAPPY.JSP Found SAAJ API (javax.xml.soap.SOAPMessage) at /home/tomcat/jakarta-tomcat-4.1.3/common/lib/saaj.jar Found JAX-RPC API (javax.xml.rpc.Service) at /home/tomcat/jakarta-tomcat-4.1.3/common/lib/jaxrpc-api.jar Found Apache-Axis (org.apache.axis.transport.http.AxisServlet) at /home/tomcat/jakarta-tomcat-4.1.3/webapps/axis/WEB-INF/lib/axis.jar Found Jakarta-Commons Discovery (org.apache.commons.discovery.Resource) at /home/tomcat/jakarta-tomcat-4.1.3/webapps/axis/WEB-INF/lib/commons-disco very.jar Found Jakarta-Commons Logging (org.apache.commons.logging.Log) at /home/tomcat/jakarta-tomcat-4.1.3/webapps/axis/WEB-INF/lib/commons-loggi ng.jar Found Log4j (org.apache.log4j.Layout) at /home/tomcat/jakarta-tomcat-4.1.3/webapps/axis/WEB-INF/lib/log4j-1.2.4.j ar Found IBM's WSDL4Java (com.ibm.wsdl.factory.WSDLFactoryImpl) at /home/tomcat/jakarta-tomcat-4.1.3/webapps/axis/WEB-INF/lib/wsdl4j.jar Found JAXP implementation (javax.xml.parsers.SAXParserFactory) Found Activation API (javax.activation.DataHandler) at /home/tomcat/jakarta-tomcat-4.1.3/common/lib/activation.jar ################END HAPPY.JSP And I have uncommented the administration servlet lines from web.xml because I want to be able to deploy using wsdd. So this all sounds like goodness right? The problem is when I attempt to click on the Administer Axis link on the main axis page (axis webapp) the following exeption is printed. This seems like the most basic functionality, the link is on the main page for goodness sake! org.apache.axis.deployment.wsdd.WSDDException: Invalid WSDD element 'service' (wanted 'deployment') I have attempted to use the basic deployment.wsdd that is in the user guide and I get the exact same error. ################BEGIN DEPLOYMENT.WSDD http://meis/mailservlet/ ################END DEPLOYMENT.WSDD So when this didn't work I went to a programattic approach thinking, hey I have heard rumblings about people who don't like the administrator, so why not use the servlet init approach: ################BEGIN ServicesDeploymentServlet.java /* * ServicesDeploymentServlet.java * * Created on April 1, 2003, 5:39 PM */ package com.noi.web.servlet; import java.io.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.axis.transport.http.*; import org.apache.axis.*; import org.apache.axis.deployment.wsdd.*; import javax.xml.parsers.*; import org.w3c.dom.*; import org.xml.sax.*; import com.noi.utility.data.*; /** * * @author clay * @version */ public class ServicesDeploymentServlet extends HttpServlet { /** Initializes the servlet. */ public void init(ServletConfig sconfig) throws ServletException { super.init(sconfig); AxisServlet axisServlet = new AxisServlet(); ServletConfig sC = getServletConfig(); ServletContext context = this.getServletContext(); try { axisServlet.init(sC); } catch (ServletException e) { e.printStackTrace(); } try { AxisEngine engine = axisServlet.getEngine(); DocumentBuilderFactory fact = DocumentBuilderFactory.newInstance(); Document doc = null; //this should be a resource DocumentBuilder builder = fact.newDocumentBuilder(); fact.setNamespaceAware(true); URL deployURL = context.getResource("/wsdd/deploy.wsdd"); XMLDocumentReader reader = new XMLDocumentReader(); reader.parse(deployURL); doc = reader.getDocument(); Element element = doc.getDocumentElement(); System.out.println ( "Element: " + element.getNodeName() ); //-- prints out 'deployment' WSDDDocument wsddDoc = new WSDDDocument(element); //-- EXCEPTION BEING THROWN HERE EngineConfiguration config = (EngineConfiguration)engine.getConfig(); if ( config instanceof WSDDEngineConfiguration) { WSDDDeployment deployment = ((WSDDEngineConfiguration)config).getDeployment(); wsddDoc.deploy(deployment); } engine.refreshGlobalOptions(); engine.saveConfiguration(); } catch (IOException e) { e.printStackTrace(); } catch (ParserConfigurationException e) { e.printStackTrace(); } } /** Destroys the servlet. */ public void destroy() { } /** Processes requests for both HTTP GET and POST methods. * @param request servlet request * @param response servlet response */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.close(); } /** Handles the HTTP GET method. * @param request servlet request * @param response servlet response */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** Handles the HTTP POST method. * @param request servlet request * @param response servlet response */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** Returns a short description of the servlet. */ public String getServletInfo() { return "The Service Deployment Servlet"; } } ################END ServicesDeploymentServlet.java EXACT SAME ERROR. I have tried so many things now I am at wit's end on getting a wsdd to work. It seems that it barfing on the first tag, and never even seing the deployment tag, so it gets lost. I guess I will just have to use .jws files (that works) until this gets resovlved but it seems to me to be a bad solution. ----------------------------------------- Clay Graham President newObjectivity, Inc. making the mobile-world-office http://www.newobjectivity.com/