1 Reply Latest reply on Oct 19, 2004 6:51 AM by thomas.diesler

    SAXException: Element type "definitions" is not declared.

    thomas.diesler

      Hi Thomas,
      when I run the testcase "Java2WSDL20TestCase, I get the following error message.

      org.jboss.ws.wsdl.WSDLException: org.xml.sax.SAXException: Element type "definitions" is not declared. @ *unknown*[2,-1]
      at
      org.jboss.ws.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:80)
      at org.jboss.test.ws.tools.JavaToWSDL20TestCase.doWSDLTest(Unknown
      Source)
      at
      org.jboss.test.ws.tools.JavaToWSDL20TestCase.testPrimitiveTypes(Unknown
      Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      Caused by: org.xml.sax.SAXException: Element type "definitions" is not declared. @ *unknown*[2,-1]
      at org.jboss.ws.wsdl.WSDLReader.readWSDL(WSDLReader.java:67)
      at
      org.jboss.ws.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:75)
      ... 17 more

      Any clues? Does it work for you?

      The wsdl is generated fine. But the wsdl reader errors out.

      Cheers,
      Anil

        • 1. Re: SAXException: Element type
          thomas.diesler

          This is a SAX praser issue. The parser cannot validate the document using XMLSchema. The most likeliy cause is, that your client code sees the JDK's crimson parser instead of xerces.

          JBoss uses xerces via the endorsed mechanism, include the following command line switch.

           -Djava.endorsed.dirs=$JBOSS_HOME/lib/endorsed