io.github.carlosthe19916.webservices.exceptions.ValidationWebServiceException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sunat-web-services Show documentation
Show all versions of sunat-web-services Show documentation
Sunat Web Services Endpoints
package io.github.carlosthe19916.webservices.exceptions;
import io.github.carlosthe19916.webservices.managers.SUNATCodigoErrores;
import io.github.carlosthe19916.webservices.utils.Util;
import javax.xml.ws.soap.SOAPFaultException;
public class ValidationWebServiceException extends AbstractWebServiceException {
public ValidationWebServiceException(SOAPFaultException exception) {
super(exception);
}
public Integer getSUNATErrorCode() {
return Util.getErrorCode(exception).orElse(-1);
}
public String getSUNATErrorMessage() {
Integer errorCode = getSUNATErrorCode();
return SUNATCodigoErrores.getInstance().get(errorCode);
}
public String getSUNATErrorMessage(int maxLength) {
Integer errorCode = getSUNATErrorCode();
return SUNATCodigoErrores.getInstance().getWithMaxLength(errorCode, maxLength);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy