public class TransactionClearingException extends OperationFailureException
Important Note
In an offline charging scenario, the SAP CC system
may include this HCI exception in the BatchChargeException or RerateSubscriptionException as the cause.
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.
Depending on your business requirements, design and develop the handling functions in your client application.
ChargedTransactionSet,
Serialized FormThe 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>
| Modifier and Type | Field and Description |
|---|---|
static int |
ACCOUNT_CLOSED
Deprecated.
Not used anymore
|
static int |
ACCOUNT_DOESNT_EXIST
Deprecated.
This reason code is deprecated and can no longer be returned by the SAP CC system.
|
static int |
ACCOUNT_LOCKED
Deprecated.
Not used anymore
|
static int |
BAD_CONFIGURATION
2: Constant error for a bad configuration.
|
static int |
CANNOT_CALCULATE_TAX
11: Unable to calculate tax; an invalid tax is identified by the charged item framework implementation.
|
static int |
CANNOT_CHARGE_PREPAID_ACCOUNT
Deprecated.
Not used anymore
|
static int |
CANNOT_CREATE_ACCOUNT
Deprecated.
Not used anymore
|
static int |
CANNOT_STORE_TAX
17: Unable to calculate tax
|
static int |
CIF_EXCEPTION
16: Error in the Charging output Integration Framework (CIF).
|
static int |
DATABASE_FAILURE
Deprecated.
This reason code is deprecated and can no longer be returned by the SAP CC system
|
static int |
INTERNAL_ERROR
-1: Other internal reasons
|
static int |
INVALID_ACCOUNT_CURRENCY
Deprecated.
Not used anymore
|
static int |
INVALID_CHARGED_ITEM_CLASS
15: Charged item class is invalid
|
static int |
INVALID_CHARGED_ITEM_MAPPING
Deprecated.
Not used anymore
|
static int |
INVALID_REFILL_RECORD_CLASS
18: Refill record class is invalid
|
static int |
INVALID_RESERVATION_SESSION_ID
Deprecated.
Not used anymore
|
static int |
INVALID_TRANSACTION_SET
1: Constant error when clearing an invalid transaction set.
|
static int |
INVOICING_FORBIDDEN
Deprecated.
Not used anymore
|
static int |
OUTPUT_ITEM_LOADING_COMMUNICATION_ERROR
20: Error while loading output item(s) because of a communication error
|
static int |
OUTPUT_ITEM_LOADING_INVALID_ITEM_ERROR
19: Error while loading output item(s) because of an invalid item error
|
static int |
UNABLE_TO_RECLEAR
10: Constant error when reclearing is unable; This error occurs when the rerating process
is not supported by the charged item framework implementation.
|
| Constructor and Description |
|---|
TransactionClearingException()
Constructs an empty exception.
|
TransactionClearingException(int error,
java.lang.String message)
Constructs an exception with an error code and a message; The message contains
a human readable text.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element.
|
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
int |
getError()
Returns the numerical reason code why the clearing of
a
charged transaction set failed. |
java.lang.String |
getMessage()
Returns the comprehensive message explaining why
the clearing of a
charged transaction set failed. |
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
getOperandReference@Deprecated public static final int DATABASE_FAILURE
public static final int INVALID_TRANSACTION_SET
public static final int BAD_CONFIGURATION
Verify the related error message and fix the charge item framework configuration accordingly.
@Deprecated public static final int INVALID_ACCOUNT_CURRENCY
@Deprecated public static final int ACCOUNT_LOCKED
@Deprecated public static final int ACCOUNT_CLOSED
@Deprecated public static final int CANNOT_CREATE_ACCOUNT
public static final int ACCOUNT_DOESNT_EXIST
@Deprecated public static final int CANNOT_CHARGE_PREPAID_ACCOUNT
@Deprecated public static final int INVOICING_FORBIDDEN
public static final int UNABLE_TO_RECLEAR
public static final int CANNOT_CALCULATE_TAX
Verify the related error message and fix the tax computation system accordingly
@Deprecated public static final int INVALID_RESERVATION_SESSION_ID
@Deprecated public static final int INVALID_CHARGED_ITEM_MAPPING
public static final int INVALID_CHARGED_ITEM_CLASS
public static final int CIF_EXCEPTION
public static final int CANNOT_STORE_TAX
public static final int INVALID_REFILL_RECORD_CLASS
public static final int INTERNAL_ERROR
public static final int OUTPUT_ITEM_LOADING_INVALID_ITEM_ERROR
public static final int OUTPUT_ITEM_LOADING_COMMUNICATION_ERROR
public TransactionClearingException()
public TransactionClearingException(int error,
java.lang.String message)
message - The messageerror - The errorpublic int getError()
charged transaction set failed.public java.lang.String getMessage()
charged transaction set failed.getMessage in class java.lang.Throwablepublic void setAttributes(XMLAttributes atts)
XMLMarshallableatts - The XML attributes of the current elementpublic void addCharacterData(java.lang.String cData)
XMLMarshallablecData - The character data to be addedpublic void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.tagName - The name of tag for the childchild - The child to be addedpublic void marshal(XMLOutputter output)
XMLMarshallableoutput - The XML output to marshal the object into