SWS-486 - SaajSoap11Body.getFault() does not conforms to interface specification - if no fault is present IllegalArgumentException is thrown instead of returning null.
This commit is contained in:
@@ -36,13 +36,13 @@ import org.springframework.ws.soap.soap11.Soap11Fault;
|
||||
*/
|
||||
class SaajSoap11Body extends SaajSoapBody implements Soap11Body {
|
||||
|
||||
public SaajSoap11Body(SOAPBody body) {
|
||||
SaajSoap11Body(SOAPBody body) {
|
||||
super(body);
|
||||
}
|
||||
|
||||
public SoapFault getFault() {
|
||||
SOAPFault fault = getImplementation().getFault(getSaajBody());
|
||||
return new SaajSoap11Fault(fault);
|
||||
return fault != null ? new SaajSoap11Fault(fault) : null;
|
||||
}
|
||||
|
||||
public Soap11Fault addFault(QName faultCode, String faultString, Locale faultStringLocale) {
|
||||
|
||||
@@ -36,13 +36,13 @@ import org.springframework.ws.soap.soap12.Soap12Fault;
|
||||
*/
|
||||
class SaajSoap12Body extends SaajSoapBody implements Soap12Body {
|
||||
|
||||
public SaajSoap12Body(SOAPBody body) {
|
||||
SaajSoap12Body(SOAPBody body) {
|
||||
super(body);
|
||||
}
|
||||
|
||||
public SoapFault getFault() {
|
||||
SOAPFault fault = getImplementation().getFault(getSaajBody());
|
||||
return new SaajSoap12Fault(fault);
|
||||
return fault != null ? new SaajSoap12Fault(fault) : null;
|
||||
}
|
||||
|
||||
public SoapFault addClientOrSenderFault(String faultString, Locale locale) {
|
||||
|
||||
Reference in New Issue
Block a user