Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-2686

Multiple custom exceptions for a service: org.xml.sax.SAXException: Invalid element in XYZ

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Blocker
    • Resolution: Unresolved
    • None
    • None
    • None
    • sparc solaris

    Description

      I have a service that throws two custom
      exceptions(ExceptionA, ExceptionB) from its methods. wsdd file is configured with the corresponding typemapping for these exceptions. Now when I am testing, if the server implementation throws ExceptionA it works perfectly. But if it throws ExceptionB, I get the following error on client side which refers to ExceptionA. When server throws ExceptionB, why should it tries to deserialize it as ExceptionA?

      [java] org.xml.sax.SAXException: Invalid element in ExceptionA - errorCode
      [java] org.xml.sax.SAXException: Invalid element in ExceptionA - errorCode
      [java] at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:258)
      [java] at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
      [java] at org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
      [java] at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1214)
      [java] at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1227)
      [java] at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
      [java] at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
      [java] at javax.xml.parsers.SAXParser.parse(SAXParser.java:374)
      [java] at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
      [java] at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
      [java] at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
      [java] at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
      [java] at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
      [java] at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
      [java] at org.apache.axis.client.Call.invoke(Call.java:2767)
      [java] at org.apache.axis.client.Call.invoke(Call.java:2443)
      [java] at org.apache.axis.client.Call.invoke(Call.java:2366)
      [java] at org.apache.axis.client.Call.invoke(Call.java:1812)

      Attachments

        Activity

          People

            Unassigned Unassigned
            narayans007 Narayan Singh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: