1 Reply Latest reply on Nov 24, 2011 3:16 AM by mnjboss

    Webservice throws org.xml.sax.SAXNotRecognizedException

    mnjboss

      Hello Community,

       

      I have a problem with a WebService-Client used in a WAR-Project (I am using the jbossws-native-client 3.1.2.GA), deployed on JBOSS-AS 5.1.0.GA, which tries to get some data from a WebService-MOCK (running on Tomcat 6.0.33).

       

      The Problem is that I get the following exception while my WebService-Client tries to parse the data which is delivered by the WS-MOCK:

       

      org.xml.sax.SAXNotRecognizedException: Feature: http://xml.org/sax/properties/lexical-handler

       

      My WS-MOCK uses the following SAX Parser:

      xerces-1.2.3.jar

       

      If I switch this SAX Parser on my WS-MOCK to:

      xercesImpl-2.2.1.jar

       

      then everything is working fine.

       

       

      Because I don't really know what the Production-Scenario WebService will deliver to me, I am trying to prepare for the worst-case.

      But I cannot get my WS-Mock with the newer SAX Parser to work.

       

      I allready tried the following:

       

      1.)

      Switch the SAX Parser libraries in JBOSS_HOME/lib/endorsed/ - The Result was that JBoss will not start because of many different Parser Errors while trying to load/parse it's config.

       

      2.) Try to user a class loader for my WAR-File - The Result was SAX Parser Errors while trying to deploy the WAR-File.

       

       

      So I'm stuck now.

      Does anyone else has an idea how to get the WebService-Client running against the WS-MOCK using the newer SAX Parser libs?

        • 1. Re: Webservice throws org.xml.sax.SAXNotRecognizedException
          mnjboss

          After some research I have some new Information.

           

          The Problem is not the WebService Client.

          I have installed SoapUI and configured my WebService MOCK to use the following Library "xerces-1.2.3", which is older not newer (what I have thought first).

          Then I tested the MOCK with SoapUI and figured out that the Error Message which I saw in my WebService Client was produced from the MOCK and not from the WebService Client.

          I saw the Exception (org.xml.sax.SAXNotRecognizedException: Feature: http://xml.org/sax/properties/lexical-handler) in the Response-XML which the MOCK delivers to my Client.

          So the MOCK Server is throwing this Exception but passes it in the Response-XML to the Client.

           

          Now I know that the xerces-1.2.3 lib is not working with tomcat 6.0.33 and axis1.4

          I think this is because xerces-1.2.3 implements SAX and not SAX2 which I think is in xercesImpl-2.x.x

           

          In conclusion - Everything is fine now.

          Problem solved!