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:
Arjen Poutsma
2009-05-13 10:02:06 +00:00
parent 6bafbd1d98
commit 2004935f89
2 changed files with 4 additions and 4 deletions

View File

@@ -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) {

View File

@@ -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) {