This content has been marked as final.
Show 2 replies
-
1. Re: SoapException - InnerException is zero
jvogele May 13, 2004 10:51 AM (in response to schachi)Hello,
if your server is throwing an exception, the exceptions is packed into a soap-fault like this:<soapenv:Body> <soapenv:Fault> <faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Server.userException</faultcode> <faultstring>Exception.toString()-Methode called here</faultstring> <detail> ... </detail> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope>
so i guess your SOAPException is created by vb.net ... to see the original errormessage you could overwrite the toString() in your Java-Exception.
regards,
jv -
2. Re: SoapException - InnerException is zero
schachi May 14, 2004 3:20 AM (in response to schachi)now, it works:
Server: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( "",""), //? ex.getMessage(), "info on the actor", //? ele); }
Client:Try 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 detail:> <fault> <category>S</category> <code>900</code> </fault>