Enum Error
- java.lang.Object
-
- java.lang.Enum<Error>
-
- net.webpdf.wsclient.exception.Error
-
- All Implemented Interfaces:
Serializable,Comparable<Error>
public enum Error extends Enum<Error>
Errorenumerates the known webPDF wsclient errors.Important: The enumerated error codes are explicitly handling wsclient failures, and should not be confused with the webPDF server´s error codes.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADMIN_PERMISSION_ERRORUser access violation.AUTH_ERRORAnExceptionhas occurred during the authentication/authorization step.AUTHENTICATION_FAILUREAuthentication of the session failed for the provided material - please check whether the webPDF server is running and reachable and whether the provided authentication material is correct.FAILED_TO_CLOSE_DATA_SOURCEThe data handlers of aSoapDocumentfailed to close.HTTP_CUSTOM_ERRORThe response is not as expected, it may contain an error description.HTTP_EMPTY_ENTITYThe request failed unexpectedly.HTTP_IO_ERRORAn error has occurred, while processing your HTTP/HTTPS request.INVALID_AUTH_MATERIALThe provided authentication/authorization material is invalid and a session may not be established.INVALID_DOCUMENTThe selected document/documentID is not known to the document manager, try uploading the document first.INVALID_HISTORY_DATAHistory data could not be found for the given document/documentID, try uploading the document first and check whether your webPDF server is running and reachable and whether collecting history data is enabled.INVALID_HTTP_MESSAGE_CONTENTAn HTTP request´s/response´s content could not be translated to valid XML or JSON.INVALID_RESULT_DOCUMENTThis error should never occur, the webPDF server should either provide a valid result document, or should provide a proper exception, that should have been parsed and thrown prior to this, but the server did neither.INVALID_SOURCE_DOCUMENTThe selected source document could not be read, please check whether it exists and is accessible.INVALID_URLThe given URL (or URI) is not well-formed and does not point to a valid resource.INVALID_WEBSERVICE_SESSIONCreating a SOAP or REST Webservice call failed for the given session.INVALID_WEBSERVICE_URLDeprecated.This error code is no longer in use.NO_DOCUMENTDeprecated.This error code is no longer in use.NO_OPERATION_DATADeprecated.This error code is no longer in use.REST_EXECUTIONA client side REST execution error occurred.SESSION_REFRESH_FAILURERefreshing the session token failed - please check whether the webPDF server is running and reachable.
Alternatively your access and refresh token expired in the meantime und you need to reauthorize.SOAP_EXECUTIONA client side SOAP execution error occurred.TLS_INITIALIZATION_FAILUREInitializing theTLSContextfailed, please check your TLS settings.UNKNOWN_EXCEPTIONAn unexpected Exception has occurred, the wsclient does not define a matching fallback behaviour for the situation.UNKNOWN_HTTP_METHODThe used HTTP method is unknown.UNKNOWN_SESSION_TYPEThe used webservice protocol is unknown.UNKNOWN_WEBSERVICE_PROTOCOLThe selected webservice protocol ist unknown, currently onlyWebServiceProtocol.SOAPorWebServiceProtocol.RESTare supported.UNKNOWN_WEBSERVICE_TYPEThe selected webservice type is unknown, the wsclient is not prepared to execute requests to that endpoint.WSDL_INVALID_FILEThe server´s WSDL could not be downloaded, please check, if the webPDF server is running and accessible.WSDL_INVALID_URLThe WSDL URL did not point to a valid resource, please check your server configuration and whether the webPDF server is running and accessible.XML_OR_JSON_CONVERSION_FAILUREFailed to parse a given JSON or XML source.
Should this fail to parse a given raw OperationData stream: Please check, whether the operation data is well formed.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCode()Returns the numeric wsclient error code.@NotNull StringgetMessage()Returns an error message describing theError.static @NotNull ErrorgetName(int errorCode)Returns theErrorrepresenting the given errorCode.static ErrorvalueOf(String name)Returns the enum constant of this type with the specified name.static Error[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN_EXCEPTION
public static final Error UNKNOWN_EXCEPTION
An unexpected Exception has occurred, the wsclient does not define a matching fallback behaviour for the situation.
-
UNKNOWN_WEBSERVICE_PROTOCOL
public static final Error UNKNOWN_WEBSERVICE_PROTOCOL
The selected webservice protocol ist unknown, currently onlyWebServiceProtocol.SOAPorWebServiceProtocol.RESTare supported.
-
UNKNOWN_WEBSERVICE_TYPE
public static final Error UNKNOWN_WEBSERVICE_TYPE
The selected webservice type is unknown, the wsclient is not prepared to execute requests to that endpoint. Possibly the selected wsclient version does not match that of your webPDF server?
-
INVALID_WEBSERVICE_URL
@Deprecated public static final Error INVALID_WEBSERVICE_URL
Deprecated.This error code is no longer in use.The selected URL is not valid - more specific:null
-
INVALID_SOURCE_DOCUMENT
public static final Error INVALID_SOURCE_DOCUMENT
The selected source document could not be read, please check whether it exists and is accessible.
-
INVALID_HTTP_MESSAGE_CONTENT
public static final Error INVALID_HTTP_MESSAGE_CONTENT
An HTTP request´s/response´s content could not be translated to valid XML or JSON.
-
INVALID_DOCUMENT
public static final Error INVALID_DOCUMENT
The selected document/documentID is not known to the document manager, try uploading the document first.
-
NO_OPERATION_DATA
@Deprecated public static final Error NO_OPERATION_DATA
Deprecated.This error code is no longer in use.No operation data has been provided for the webservice call, try setting the required parameters first.
-
NO_DOCUMENT
@Deprecated public static final Error NO_DOCUMENT
Deprecated.This error code is no longer in use.No document has been selected to execute the operation on.
-
INVALID_HISTORY_DATA
public static final Error INVALID_HISTORY_DATA
History data could not be found for the given document/documentID, try uploading the document first and check whether your webPDF server is running and reachable and whether collecting history data is enabled.
-
INVALID_WEBSERVICE_SESSION
public static final Error INVALID_WEBSERVICE_SESSION
Creating a SOAP or REST Webservice call failed for the given session. Please check whether the selected
WebServiceProtocolmatches that of your session.
To produceRestWebServiceinstances you require the protocol typeWebServiceProtocol.RESTand must also provide aRestSession.
To produceSoapWebServiceinstances you require the protocol typeWebServiceProtocol.SOAPand must also provide aSoapSession.
-
INVALID_RESULT_DOCUMENT
public static final Error INVALID_RESULT_DOCUMENT
This error should never occur, the webPDF server should either provide a valid result document, or should provide a proper exception, that should have been parsed and thrown prior to this, but the server did neither.
At the moment of writing this, no scenario is known where this might ever be the case.
However: future webservices might not necessarily return a result document.
Please check whether the used wsclient version matches your webPDF server.
-
FAILED_TO_CLOSE_DATA_SOURCE
public static final Error FAILED_TO_CLOSE_DATA_SOURCE
The data handlers of aSoapDocumentfailed to close.
-
INVALID_URL
public static final Error INVALID_URL
The given URL (or URI) is not well-formed and does not point to a valid resource.
A
Sessionwas unable to create a proper baseURL or subPath from theURLprovided to theSessionContext- please check if that URL is correct.
-
HTTP_IO_ERROR
public static final Error HTTP_IO_ERROR
An error has occurred, while processing your HTTP/HTTPS request. Please check whether the webPDF server is running and reachable, also you might want to check your configuredSessionContext.
-
TLS_INITIALIZATION_FAILURE
public static final Error TLS_INITIALIZATION_FAILURE
Initializing theTLSContextfailed, please check your TLS settings.
-
HTTP_EMPTY_ENTITY
public static final Error HTTP_EMPTY_ENTITY
The request failed unexpectedly. The server´s response is empty.
-
HTTP_CUSTOM_ERROR
public static final Error HTTP_CUSTOM_ERROR
The response is not as expected, it may contain an error description.
-
UNKNOWN_HTTP_METHOD
public static final Error UNKNOWN_HTTP_METHOD
The used HTTP method is unknown. The currently supported HTTP methods areHttpMethod.GET,HttpMethod.PUT,HttpMethod.POSTandHttpMethod.DELETE.
-
UNKNOWN_SESSION_TYPE
public static final Error UNKNOWN_SESSION_TYPE
The used webservice protocol is unknown. The currently supported protocols areWebServiceProtocol.RESTandWebServiceProtocol.SOAP.
-
XML_OR_JSON_CONVERSION_FAILURE
public static final Error XML_OR_JSON_CONVERSION_FAILURE
Failed to parse a given JSON or XML source.
Should this fail to parse a given raw OperationData stream: Please check, whether the operation data is well formed.
-
INVALID_AUTH_MATERIAL
public static final Error INVALID_AUTH_MATERIAL
The provided authentication/authorization material is invalid and a session may not be established.
-
AUTHENTICATION_FAILURE
public static final Error AUTHENTICATION_FAILURE
Authentication of the session failed for the provided material - please check whether the webPDF server is running and reachable and whether the provided authentication material is correct.
-
SESSION_REFRESH_FAILURE
public static final Error SESSION_REFRESH_FAILURE
Refreshing the session token failed - please check whether the webPDF server is running and reachable.
Alternatively your access and refresh token expired in the meantime und you need to reauthorize.
-
WSDL_INVALID_FILE
public static final Error WSDL_INVALID_FILE
The server´s WSDL could not be downloaded, please check, if the webPDF server is running and accessible.
-
WSDL_INVALID_URL
public static final Error WSDL_INVALID_URL
The WSDL URL did not point to a valid resource, please check your server configuration and whether the webPDF server is running and accessible.
-
SOAP_EXECUTION
public static final Error SOAP_EXECUTION
A client side SOAP execution error occurred.
-
REST_EXECUTION
public static final Error REST_EXECUTION
A client side REST execution error occurred.
-
AUTH_ERROR
public static final Error AUTH_ERROR
AnExceptionhas occurred during the authentication/authorization step. (look at the providingAuthResultException´s cause for more details.)
-
ADMIN_PERMISSION_ERROR
public static final Error ADMIN_PERMISSION_ERROR
User access violation. An Administration role user is required.
-
-
Method Detail
-
values
public static Error[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Error c : Error.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Error valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getName
@NotNull public static @NotNull Error getName(int errorCode)
Returns theErrorrepresenting the given errorCode.
-
getMessage
@NotNull public @NotNull String getMessage()
Returns an error message describing theError.- Returns:
- ane error message describing the
Error.
-
getCode
public int getCode()
Returns the numeric wsclient error code.- Returns:
- the numeric wsclient error code.
-
-