com.highdeal.pnr.hci
Class BatchChargeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.highdeal.hci.OperationFailureException
              extended by com.highdeal.pnr.hci.BatchChargeException
All Implemented Interfaces:
OperationResult, XMLMarshallable, java.io.Serializable

public class BatchChargeException
extends OperationFailureException

Exception thrown to your client application when a batch charging operation of a collection of chargeable items fails in the connected SAP CC Core Server system; Batch charging is an operation available in the Offline Charging Services (OFCS) provided by SAP Convergent Charging.

This exception includes a list of subexceptions that refer to an initial chargeable item. The possible subexceptions are:

Refer to their documentation.

Important Note

This exception is specified in a Java package of HCI but it is only available in the Message TCP technical interface of SAP Convergent Charging.

Related Business Operations

Your charging client has triggered one of the following batch operations:

Async. Comm. Sync. Comm.
batchCharge(java.util.Vector, java.lang.Long, short, com.highdeal.pnr.hci.AccessibleChargeType, int, boolean, com.highdeal.hci.MessageHeader.TransactionMode, java.lang.String, com.highdeal.cnd.message.BatchChargeEventListener)

See: com.highdeal.cnd.message.AsyncBatchServiceClient

batchCharge(java.util.Vector, java.lang.Long, short, com.highdeal.pnr.hci.AccessibleChargeType, int, boolean, com.highdeal.hci.MessageHeader.TransactionMode, java.lang.String)}

See: com.highdeal.cnd.message.BatchServiceClient

Reasons

There is no specific reason defined for the overall exception. Each subexception relates to an issue with one particular initial chargeable item. The first-level reasons are:

Failure Reason Code (HCI) Customizing and Integration Troubleshooting (Next Steps)
Forbidden charge failure forbiddenChargeFault

To design the exception and error handling functions (automated treatments, logging and manual treatments), see the Field Detail section of this exception. Refer to the information available in the Customizing subsection of each possible subfailure to develop your integration code.

Note

For troubleshooting investigations, see the Field Detail section. Refer to the information available in the Next Steps subsection of each subfailure.

Transaction clearing failure transactionClearingFault

To design the exception and error handling functions (automated treatments, logging and manual treatments), see the Field Detail section of this exception. Refer to the information available in the Customizing subsection of each possible subfailure to develop your integration code.

Note

For troubleshooting investigations, see the Field Detail section. Refer to the information available in the Next Steps subsection of each subfailure.

Invalid item failure invalidItemFault

To design the exception and error handling functions (automated treatments, logging and manual treatments), see the Field Detail section of this exception. Refer to the information available in the Customizing subsection of each possible subfailure to develop your integration code.

Note

For troubleshooting investigations, see the Field Detail section. Refer to the information available in the Next Steps subsection of each subfailure.

Implementation in Your Client Application

Exception and Error Handling

Depending on your business requirements, design and develop the handling functions in your client application.

Get the list of subexceptions. Use the index information to determine the chargeable items that cannot be charged in batch mode by the SAP CC system.

Similar Exception

See the Acquisition exception in this Java API Reference documentation.

See Also:
AsyncBatchServiceClient, BatchServiceClient, Serialized Form

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="batchChargeFault">
   <xs:complexType>
     <xs:sequence>
       <xs:choice>
         <xs:element ref="forbiddenChargeFault" minOccurs="1" maxOccurs="1"/>
         <xs:element ref="transactionClearingFault" minOccurs="1" maxOccurs="1"/>
         <xs:element ref="invalidItemFault" minOccurs="1" maxOccurs="1"/>
       </xs:choice>
     </xs:sequence>
   <xs:attribute name="index" type="xs:integer" use="optional"/>
   </xs:complexType>
  </xs:element>


Field Summary
protected  OperationFailureException error
           
protected  int index
           
 
Constructor Summary
BatchChargeException()
          Builds an empty multiple charge exception.
BatchChargeException(OperationFailureException error)
          Constructs an exception with an operation failure exception that explains why the batch charging has failed.
BatchChargeException(OperationFailureException error, int index)
          Constructs an exception with an operation failure exception that explain why the multiple charging has failed.
 
Method Summary
 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 getIndex()
          In the transmitted chargeParameters list, returns the position of the chargeable item that cannot be charged.
 OperationFailureException getInternalError()
          Returns the error that forbids the charging operation.
 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.
 
Methods inherited from class com.highdeal.hci.OperationFailureException
getOperandReference
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

error

protected OperationFailureException error

index

protected int index
Constructor Detail

BatchChargeException

public BatchChargeException()
Builds an empty multiple charge exception.


BatchChargeException

public BatchChargeException(OperationFailureException error,
                            int index)
Constructs an exception with an operation failure exception that explain why the multiple charging has failed. If the index is greater than or equal to 0, this identifies the chargeable item which fails in the list of chargeParameters. If the index is equal to -1, it means the exception occurred before the Activation process of the chargeable items.

Parameters:
error - The exception
index - The position of chargeable item which fails in chargeParameters list

BatchChargeException

public BatchChargeException(OperationFailureException error)
Constructs an exception with an operation failure exception that explains why the batch charging has failed.

Parameters:
error - The exception
Method Detail

getInternalError

public OperationFailureException getInternalError()
Returns the error that forbids the charging operation.

Returns:
The internal error

getIndex

public int getIndex()
In the transmitted chargeParameters list, returns the position of the chargeable item that cannot be charged.

If the index is greater than or equal to 0, this identifies the chargeable item which fails in the list of chargeParameters.

Note

If the index is equal to -1, it means the exception occurred before the activation process of the chargeable items.

Returns:
The position in chargeParameters of chargeable item which fails

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(java.lang.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(java.lang.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

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)