axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian Szczygiel" <sebastian.szczyg...@openknowledge.de>
Subject [Axis2] Stacktrace output in SoapFault
Date Tue, 20 Jun 2006 16:34:00 GMT
Hi,

Due to security reasons I need to deactivate the java stacktrace output
in SoapFault (inside XML tag <Exception>).

The constructor of AxisFault allows me easily to set the value of
<faultstring>, but how can I change the value of <Exception>?

I tried following code, but still get the full stacktrace in SoapFault:

} catch (Exception t) {
SOAPFactory soapFactory = OMAbstractFactory.getSOAP11Factory();
AxisFault axisFault = new AxisFault(t.getMessage());
QName qName = new QName("http://schemas.xmlsoap.org/soap/envelope/",
"Fault");
OMElement detail = soapFactory.createOMElement(qName, null);
qName = new QName("", "Exception");
OMElement exception = soapFactory.createOMElement(qName, null);
exception.setText(t.getMessage());
detail.addChild(exception);
axisFault.setDetail(detail);
throw axisFault;
}

Regards,
Sebastian


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message