Package org.springframework.ws.soap.server.endpoint.annotation

Examples of org.springframework.ws.soap.server.endpoint.annotation.SoapFault


*/
public class SoapFaultAnnotationExceptionResolver extends AbstractSoapFaultDefinitionExceptionResolver {

    @Override
    protected final SoapFaultDefinition getFaultDefinition(Object endpoint, Exception ex) {
        SoapFault faultAnnotation = ex.getClass().getAnnotation(SoapFault.class);
        if (faultAnnotation != null) {
            SoapFaultDefinition definition = new SoapFaultDefinition();
            if (faultAnnotation.faultCode() != FaultCode.CUSTOM) {
                definition.setFaultCode(faultAnnotation.faultCode().value());
            }
            else if (StringUtils.hasLength(faultAnnotation.customFaultCode())) {
                definition.setFaultCode(QName.valueOf(faultAnnotation.customFaultCode()));
            }
            definition.setFaultStringOrReason(faultAnnotation.faultStringOrReason());
            definition.setLocale(StringUtils.parseLocaleString(faultAnnotation.locale()));
            return definition;
        }
        else {
            return null;
        }
View Full Code Here

TOP

Related Classes of org.springframework.ws.soap.server.endpoint.annotation.SoapFault

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.