When generating the java framework using the WSDL2Java, the exception class
(derived from fault elements in the WSDL) do not carry the message over.
The following code snippet shows what has been generated, and the second
one shows the same patched exception which carries the message over to the
client:
Is it the right way to do it ? Any feedbacks appreciated.
public class MissingRequiredInformationException extends org.apache.axis.AxisFault
{
public java.lang.String msg;
public java.lang.String getMsg() {
return this.msg;
}
public MissingRequiredInformationException() {
}
public MissingRequiredInformationException(java.lang.String msg) {
this.msg = msg;
}
}
Patched class:
public class MissingRequiredInformationException extends org.apache.axis.AxisFault
{
public java.lang.String getMsg() {
return this.getFaultString();
}
public MissingRequiredInformationException() {
}
public MissingRequiredInformationException(java.lang.String msg) {
this.setFaultString(msg);
}
}