Class TransactionClearingException

All Implemented Interfaces:
OperationResult, XMLMarshallable, Serializable

public class TransactionClearingException extends OperationFailureException
Exception thrown when an error occurs during the clearing of a business transaction.

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 Details

    • DATABASE_FAILURE

      @Deprecated public static final int DATABASE_FAILURE
      Deprecated.
      This reason code is deprecated and can no longer be returned by the SAP CC system
      0: Constant error for a database failure.
      See Also:
    • INVALID_TRANSACTION_SET

      public static final int INVALID_TRANSACTION_SET
      1: Constant error when clearing an invalid transaction set.
      See Also:
    • BAD_CONFIGURATION

      public static final int BAD_CONFIGURATION
      2: 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 public static final int INVALID_ACCOUNT_CURRENCY
      Deprecated.
      Not used anymore
      3: Constant error for an invalid account currency.
      See Also:
    • ACCOUNT_LOCKED

      @Deprecated public static final int ACCOUNT_LOCKED
      Deprecated.
      Not used anymore
      4: Constant error when an account is locked.
      See Also:
    • ACCOUNT_CLOSED

      @Deprecated public static final int ACCOUNT_CLOSED
      Deprecated.
      Not used anymore
      5: Constant error when an account is closed.
      See Also:
    • CANNOT_CREATE_ACCOUNT

      @Deprecated public static final int CANNOT_CREATE_ACCOUNT
      Deprecated.
      Not used anymore
      6: Constant error when an account cannot be created
      See Also:
    • ACCOUNT_DOESNT_EXIST

      @Deprecated public static final int 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 public static final int CANNOT_CHARGE_PREPAID_ACCOUNT
      Deprecated.
      Not used anymore
      8: Constant error when clearing into a prepaid account is impossible
      See Also:
    • INVOICING_FORBIDDEN

      @Deprecated public static final int INVOICING_FORBIDDEN
      Deprecated.
      Not used anymore
      9: Constant error when reinvoicing is not allowed
      See Also:
    • UNABLE_TO_RECLEAR

      public static final 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.
      See Also:
    • CANNOT_CALCULATE_TAX

      public static final int CANNOT_CALCULATE_TAX
      11: 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 public static final int INVALID_RESERVATION_SESSION_ID
      Deprecated.
      Not used anymore
      12: Constant error when trying to confirm a reservation with a bad session ID
      See Also:
    • INVALID_CHARGED_ITEM_MAPPING

      @Deprecated public static final int INVALID_CHARGED_ITEM_MAPPING
      Deprecated.
      Not used anymore
      14: Charged item mapping is invalid
      See Also:
    • INVALID_CHARGED_ITEM_CLASS

      public static final int INVALID_CHARGED_ITEM_CLASS
      15: Charged item class is invalid
      See Also:
    • CIF_EXCEPTION

      public static final int CIF_EXCEPTION
      16: Error in the Charging output Integration Framework (CIF).
      See Also:
    • CANNOT_STORE_TAX

      public static final int CANNOT_STORE_TAX
      17: Unable to calculate tax
      See Also:
    • INVALID_REFILL_RECORD_CLASS

      public static final int INVALID_REFILL_RECORD_CLASS
      18: 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_ERROR
      19: 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_ERROR
      20: Error while loading output item(s) because of a communication error
      See Also:
  • Constructor Details

    • TransactionClearingException

      public TransactionClearingException()
      Constructs an empty exception.
    • TransactionClearingException

      public TransactionClearingException(int error, String message)
      Constructs an exception with an error code and a message; The message contains a human readable text.
      Parameters:
      message - The message
      error - The error
  • Method Details

    • getError

      public int getError()
      Returns the numerical reason code why the clearing of a charged transaction set failed.
      Returns:
      The error code
    • getMessage

      public String getMessage()
      Returns the comprehensive message explaining why the clearing of a charged transaction set failed.
      Overrides:
      getMessage in class Throwable
      Returns:
      The detailed message
    • setAttributes

      public void setAttributes(XMLAttributes atts)
      Description copied from interface: XMLMarshallable
      Sets the attributes of the XML representation of the element being processed.
      Parameters:
      atts - The XML attributes of the current element
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Parameters:
      cData - The character data to be added
    • addChild

      public void addChild(String tagName, XMLMarshallable child)
      Description copied from interface: XMLMarshallable
      Adds a child to the object, the child representing the marshallable object which must be added to the element.
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • marshal

      public void marshal(XMLOutputter output)
      Description copied from interface: XMLMarshallable
      Gives an XML representation of this object, including its children.
      Parameters:
      output - The XML output to marshal the object into