2 Replies Latest reply on May 14, 2004 3:20 AM by Schacher

    SoapException - InnerException is zero

    Schacher Newbie

      My webservice runs under jboss-net, the client is vb.net.

      If the webservice throws an exception, the client shows a SoapException:
      System.Web.Services.Protocols.SoapException: ch.e_act.common.util.EActException: Test
      at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
      at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
      at WindowsApplication1.WebReference1.VerwPartnerBeanService.storePartner(Int32 beratungID, String schluessel, String partner)
      at WindowsApplication1.Partner.speichern()

      The original error message (ch.e_act.common.util.EActException:Test) was packed into the stacktrace. The InnerException of the
      SoapException is zero !

      Can anyone tell me where the SoapException is created (axis ?) and how can I forward the original error message to the client?

      kind regards

        • 1. Re: SoapException - InnerException is zero
          Jochen Vogele Newbie


          if your server is throwing an exception, the exceptions is packed into a soap-fault like this:

           <faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Server.userException</faultcode>
           <faultstring>Exception.toString()-Methode called here</faultstring>
           <detail> ...

          so i guess your SOAPException is created by vb.net ... to see the original errormessage you could overwrite the toString() in your Java-Exception.


          • 2. Re: SoapException - InnerException is zero
            Schacher Newbie

            now, it works:


             try {
             } catch (EActException ex) {
             Element ele[] = new Element[1];
             String xml = "<fault>"
             + "<category>" + ex.getCategory() + "</category>"
             + "<code>" + new Integer(ex.getErrorCode()).toString() + "</code>"
             + "</fault>";
             ele[0] = XMLKit.createDocumentFromString(xml).getDocumentElement();
             throw new AxisFault(new QName( "",""), //?
             "info on the actor", //?

             Dim omath As New WebReference1.VerwPartnerBeanService
             omath.storePartner(beratungid, schluessel, xml)
             Catch ex As System.Web.Services.Protocols.SoapException
             Console.WriteLine("message:>" & ex.Message)
             Console.WriteLine("detail:>" & ex.Detail.InnerXml)
             End try

            Output Client:
            message:> test