J. Moldawski created CXF-7648:
---------------------------------
Summary: @WebFault-Exceptions schouldn't have Constructors without
faultInfo-parameter
Key: CXF-7648
URL: https://issues.apache.org/jira/browse/CXF-7648
Project: CXF
Issue Type: Wish
Components: Tooling
Affects Versions: 3.1.6
Reporter: J. Moldawski
Attachments: MyException_Exception.java
The tool wsdl2java generates Exception classes which have public constructors
without parameter faultInfo, for example: MyException_Exception.java. It has:
...
public MyException_Exception() {
super();
}
public MyException_Exception(String message) {
super(message);
}
public MyException_Exception(String message, Throwable cause) {
super(message, cause);
}
...
The problem:
=============
If the implementation of the web service throws MyException_Exception using one
of these constructors, no information about thrown MyException_Exception would
be returned to the caller: it would receive a generic SOAPFault instead of
MyException_Exception.
Wish
======
In oder to not mislead a developer of webservices to throw exceptions which
wouldn't arrive the caller, it was better to not generate these constructor at
all. Note, that the jdk tool wsimport do behave in this manner: it doesn't
generate "generic" constructors for @WebFault-Exceptions.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)