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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to