Class TransactionClearingException
- All Implemented Interfaces:
OperationResult,XMLMarshallable,Serializable
Important Note
In an offline charging scenario, the SAP CC system
may include this HCI exception in the BatchChargeException or RerateSubscriptionException as the cause.
Reasons
The following typical errors are possible:
| Failure | Reason Code (Java) | Reason Code (XML) | Next Steps |
|---|---|---|---|
Invalid transaction set |
1 (INVALID_TRANSACTION_SET) |
invalidTransactionSet | See the note |
Bad configuration |
2 | badConfiguration | |
Unable to reclear |
10 | unableToReclear | |
Cannot calculate tax |
11 | cannotCalculateTax |
Note
Many reasons are deprecated and revoked. They are not in the table above.
Note
See the Field Detail section for more information about troubleshooting operations to solve the problem.
Exception and Error Handling
Depending on your business requirements, design and develop the handling functions in your client application.
- See Also:
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="transactionClearingFault">
<xs:complexType>
<xs:attribute name="error" type="TransactionClearingFaultErrorType"/>
<xs:attribute name="message" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:simpleType name="TransactionClearingFaultErrorType">
<xs:restriction base="xs:string">
<xs:enumeration value="databaseFailure"/> <!-- d e p r e c a t e d -->
<xs:enumeration value="invalidTransactionSet"/>
<xs:enumeration value="badConfiguration"/>
<xs:enumeration value="invalidAccountCurrency"/> <!-- d e p r e c a t e d -->
<xs:enumeration value="accountLocked"/> <!-- d e p r e c a t e d -->
<xs:enumeration value="accountClosed"/> <!-- d e p r e c a t e d -->
<xs:enumeration value="cannotCreateAccount"/> <!-- d e p r e c a t e d -->
<xs:enumeration value="accountDoesntExist"/> <!-- d e p r e c a t e d -->
<xs:enumeration value="cannotChargePrepaidAccount"/> <!-- d e p r e c a t e d -->
<xs:enumeration value="invoicingForbidden"/> <!-- d e p r e c a t e d -->
<xs:enumeration value="unableToReclear"/>
<xs:enumeration value="cannotCalculateTax"/>
<xs:enumeration value="invalidReservationSessionID"/> <!-- d e p r e c a t e d -->
<xs:enumeration value="invalidChargedItemMapping"/> <!-- d e p r e c a t e d -->
<xs:enumeration value="invalidChargedItemClass"/>
<xs:enumeration value="cifException"/>
<xs:enumeration value="cannotStoreTax"/>
<xs:enumeration value="invalidRefillRecordClass"/>
<xs:enumeration value="internalError"/>
<xs:enumeration value="outputItemLoadingInvalidItemError"/>
<xs:enumeration value="outputItemLoadingCommunicationError"/>
</xs:restriction>
</xs:simpleType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.Not used anymorestatic final intDeprecated.This reason code is deprecated and can no longer be returned by the SAP CC system.static final intDeprecated.Not used anymorestatic final int2: Constant error for a bad configuration.static final int11: Unable to calculate tax; an invalid tax is identified by the charged item framework implementation.static final intDeprecated.Not used anymorestatic final intDeprecated.Not used anymorestatic final int17: Unable to calculate taxstatic final int16: Error in the Charging output Integration Framework (CIF).static final intDeprecated.This reason code is deprecated and can no longer be returned by the SAP CC systemstatic final int-1: Other internal reasonsstatic final intDeprecated.Not used anymorestatic final int15: Charged item class is invalidstatic final intDeprecated.Not used anymorestatic final int18: Refill record class is invalidstatic final intDeprecated.Not used anymorestatic final int1: Constant error when clearing an invalid transaction set.static final intDeprecated.Not used anymorestatic final int20: Error while loading output item(s) because of a communication errorstatic final int19: Error while loading output item(s) because of an invalid item errorstatic final int10: Constant error when reclearing is unable; This error occurs when the rerating process is not supported by the charged item framework implementation. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty exception.TransactionClearingException(int error, String message) Constructs an exception with an error code and a message; The message contains a human readable text. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.intgetError()Returns the numerical reason code why the clearing of acharged transaction setfailed.Returns the comprehensive message explaining why the clearing of acharged transaction setfailed.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.Methods inherited from class com.highdeal.hci.OperationFailureException
getOperandReferenceMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
DATABASE_FAILURE
Deprecated.This reason code is deprecated and can no longer be returned by the SAP CC system0: Constant error for a database failure.- See Also:
-
INVALID_TRANSACTION_SET
public static final int INVALID_TRANSACTION_SET1: Constant error when clearing an invalid transaction set.- See Also:
-
BAD_CONFIGURATION
public static final int BAD_CONFIGURATION2: Constant error for a bad configuration.Next Steps
Verify the related error message and fix the charge item framework configuration accordingly.
- See Also:
-
INVALID_ACCOUNT_CURRENCY
Deprecated.Not used anymore3: Constant error for an invalid account currency.- See Also:
-
ACCOUNT_LOCKED
Deprecated.Not used anymore4: Constant error when an account is locked.- See Also:
-
ACCOUNT_CLOSED
Deprecated.Not used anymore5: Constant error when an account is closed.- See Also:
-
CANNOT_CREATE_ACCOUNT
Deprecated.Not used anymore6: Constant error when an account cannot be created- See Also:
-
ACCOUNT_DOESNT_EXIST
Deprecated.This reason code is deprecated and can no longer be returned by the SAP CC system.7: Constant error when an account does not exist- See Also:
-
CANNOT_CHARGE_PREPAID_ACCOUNT
Deprecated.Not used anymore8: Constant error when clearing into a prepaid account is impossible- See Also:
-
INVOICING_FORBIDDEN
Deprecated.Not used anymore9: Constant error when reinvoicing is not allowed- See Also:
-
UNABLE_TO_RECLEAR
public static final int UNABLE_TO_RECLEAR10: Constant error when reclearing is unable; This error occurs when the rerating process is not supported by the charged item framework implementation.- See Also:
-
CANNOT_CALCULATE_TAX
public static final int CANNOT_CALCULATE_TAX11: Unable to calculate tax; an invalid tax is identified by the charged item framework implementation.Next Steps
Verify the related error message and fix the tax computation system accordingly
- See Also:
-
INVALID_RESERVATION_SESSION_ID
Deprecated.Not used anymore12: Constant error when trying to confirm a reservation with a bad session ID- See Also:
-
INVALID_CHARGED_ITEM_MAPPING
Deprecated.Not used anymore14: Charged item mapping is invalid- See Also:
-
INVALID_CHARGED_ITEM_CLASS
public static final int INVALID_CHARGED_ITEM_CLASS15: Charged item class is invalid- See Also:
-
CIF_EXCEPTION
public static final int CIF_EXCEPTION16: Error in the Charging output Integration Framework (CIF).- See Also:
-
CANNOT_STORE_TAX
public static final int CANNOT_STORE_TAX17: Unable to calculate tax- See Also:
-
INVALID_REFILL_RECORD_CLASS
public static final int INVALID_REFILL_RECORD_CLASS18: Refill record class is invalid- See Also:
-
INTERNAL_ERROR
public static final int INTERNAL_ERROR-1: Other internal reasons- See Also:
-
OUTPUT_ITEM_LOADING_INVALID_ITEM_ERROR
public static final int OUTPUT_ITEM_LOADING_INVALID_ITEM_ERROR19: Error while loading output item(s) because of an invalid item error- See Also:
-
OUTPUT_ITEM_LOADING_COMMUNICATION_ERROR
public static final int OUTPUT_ITEM_LOADING_COMMUNICATION_ERROR20: Error while loading output item(s) because of a communication error- See Also:
-
-
Constructor Details
-
TransactionClearingException
public TransactionClearingException()Constructs an empty exception. -
TransactionClearingException
Constructs an exception with an error code and a message; The message contains a human readable text.- Parameters:
message- The messageerror- The error
-
-
Method Details
-
getError
public int getError()Returns the numerical reason code why the clearing of acharged transaction setfailed.- Returns:
- The error code
-
getMessage
Returns the comprehensive message explaining why the clearing of acharged transaction setfailed.- Overrides:
getMessagein classThrowable- Returns:
- The detailed message
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Parameters:
atts- TheXML attributesof the current element
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Parameters:
cData- The character data to be added
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Parameters:
output- TheXML outputto marshal the object into
-