Class InvalidItemException
- All Implemented Interfaces:
OperationResult,XMLMarshallable,IChargingResultHolderException,Serializable
- the transactional data sent in the
chargeable itemcoming from your client application (mediation system, CRM, ERP, provisionning system) - the business configuration in a master data managed by the running SAP CC system: the
chargeable item classdefined in the identified pricing catalog of the digital service delivered by the service provider.
Important Notes
- This exception is specified in HCI, but it can be thrown via the Message TCP technical interface that supports convergent charging services.
-
In asynchronous communications, the
invalid item listenercustomized in your client application manages this type of exception. -
In an offline charging scenario, the SAP CC system
may include this exception in the
BatchChargeExceptionor theRerateSubscriptionExceptionas the cause.
Reasons
The possible reasons are:
| Failure | Reason Code | Reason Code (HCI) | Customizing and Integration | Troubleshooting (Next Steps) |
|---|---|---|---|---|
Bad configuration
| 0 | badConfiguration
|
Note To design the exception and error handling functions (automated treatments, logging and manual treatments), see the Field Detail section in this topic. Refer to the information available in the Customizing subsection of each failure to develop your integration code. |
Note For troubleshooting investigations, see the Field Detail section in this topic. Refer to the information available in the Next Steps subsection of each failure. |
Wrong property type
| 1 | wrongPropertyType
| ||
Property not found
| 2 | propertyNotFound
| ||
Division by zero
| 4 | divisionByZero
| ||
Incompatible currencies
| 5 | incompatibleCurrencies
| ||
Chargeable item (CI) null
| 6 | nullChargeableItem
| ||
Invalid property
| 7 | invalidPropertyValue
| ||
Unrated (deprecated and now revoked)
| 3 | unrated
|
Consider the detailed information in the Field Detail section in this topic.
Tip
For troubleshooting during the implementation of SAP Convergent Charging, see the SAP CC Error Code Reference in the SDK or in SAP Help Portal.
Implementation in Your Client Application
Exception and Error Handling
Depending on your business requirements, design and develop the handling functions in your client application.
- See Also:
-
- Error Code Reference
- Serialized Form
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="invalidItemFault">
<xs:complexType>
<xs:sequence>
<xs:element ref="cause" minOccurs="0" maxOccurs="1"/> <!-- Due to legacy use of this exception, no error may be provided -->
<xs:element ref="causedBy" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="error" type="InvalidItemFaultErrorType"/>
<xs:attribute name="message" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:simpleType name="InvalidItemFaultErrorType">
<xs:restriction base="xs:string">
<xs:enumeration value="notAuthorized"/>
<xs:enumeration value="badConfiguration"/>
<xs:enumeration value="wrongPropertyType"/>
<xs:enumeration value="propertyNotFound"/>
<xs:enumeration value="unrated"/> <!-- deprecated -->
<xs:enumeration value="divisionByZero"/>
<xs:enumeration value="incompatibleCurrencies"/>
<xs:enumeration value="nullChargeableItem"/>
<xs:enumeration value="invalidPropertyValue"/>
</xs:restriction>
</xs:simpleType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int0: Error when the price plan is badly configured in the pricing catalog (in master data) configured in the connected SAP CC system.static final int6: Error when the chargeable item (CI) is null or its name is null.static final int4: Error when a division by zero occured during the processing.static final int5: Error when currencies are not compatible; This kind of error happens when there is a mismatch between the currency of the account and the currency declared at the charge level.static final int7: Error when a property of the rating context has an invalid value.static final int-1: Error when a no access is raised when executing a price plan in a charge configured in master data.static final int2: Error when a property is not found in the rating context.static final intDeprecated.This reason code is deprecated and can no longer be returnedstatic final int1: Error when a property in the rating context of the charging operation request does not have the right type. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty exception.InvalidItemException(int reason, String message) Constructs an exception with an error code and a message; The message contains a human readable text.InvalidItemException(int reason, String message, IError error) Constructs an exception with an error code and a message; The message contains a human readable text.InvalidItemException(int reason, String message, IError error, ChargingResult chargingResult) Constructs an exception with a cause, a message, an error, and aChargingResultthat explain why the charging is forbidden.InvalidItemException(int reason, String message, ChargingResult chargingResult) 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.Returns theChargingResultthat provides structured information about theexception.intgetError()Deprecated.UsegetReason()instead.Returns the detailed message explaining why the rating context is invalid.intReturns the reason why the rating context is invalid.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.voidMethods 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
-
NOT_AUTHORIZED
public static final int NOT_AUTHORIZED-1: Error when a no access is raised when executing a price plan in a charge configured in master data.- See Also:
-
BAD_CONFIGURATION
public static final int BAD_CONFIGURATION0: Error when the price plan is badly configured in the pricing catalog (in master data) configured in the connected SAP CC system.Next Steps
Use the same inputs in the rating context that generates such error and use the trial run tool in the SAP CC Core Tool user interface to detect the price plan component in error and correct the configuration accordingly.
- See Also:
-
WRONG_PROPERTY_TYPE
public static final int WRONG_PROPERTY_TYPE1: Error when a property in the rating context of the charging operation request does not have the right type.Detailed Information
This kind of error might come when there is a mismatch between the type of the property declared in the chargeable item class and the one sent in the chargeable item.
Next Steps
- Verify the properties transmitted from mediation system to SAP CC and their types. It can be done through the logs of mediation system by checking the chargeable item data sent to SAP CC for rating.
- For each property declared in the chargeable item class, check if it has the same type than the one transmitted in the chargeable item using the previous step.
- Update the mediation system to send the right type of each property included in the chargeable item.
- Use the same inputs in the rating context that generates such error and use the trial run tool of SAP CC graphical interface in order to detect the component in error and correct the configuration accordingly.
- See Also:
-
PROPERTY_NOT_FOUND
public static final int PROPERTY_NOT_FOUND2: Error when a property is not found in the rating context.- See Also:
-
UNRATED
Deprecated.This reason code is deprecated and can no longer be returned3: Error when the inputchargeable item (CI)is not rated by executing the price plan.- See Also:
-
DIVISION_BY_ZERO
public static final int DIVISION_BY_ZERO4: Error when a division by zero occured during the processing.- See Also:
-
INCOMPATIBLE_CURRENCIES
public static final int INCOMPATIBLE_CURRENCIES5: Error when currencies are not compatible; This kind of error happens when there is a mismatch between the currency of the account and the currency declared at the charge level.Next Steps
- Detect which account is raising this error by checking chargeable item data
- Cancel the prepaid account and create a new one using the correct currency
- See Also:
-
CI_NULL
public static final int CI_NULL6: Error when the chargeable item (CI) is null or its name is null.- See Also:
-
INVALID_PROPERTY_VALUE
public static final int INVALID_PROPERTY_VALUE7: Error when a property of the rating context has an invalid value.- See Also:
-
-
Constructor Details
-
InvalidItemException
public InvalidItemException()Constructs an empty exception. -
InvalidItemException
Constructs an exception with an error code and a message; The message contains a human readable text.- Parameters:
message- The messagereason- The error
-
InvalidItemException
Constructs an exception with an error code and a message; The message contains a human readable text. It explains the reason why the charge process is forbidden, and it provides a structured information in theChargingResult.- Parameters:
message- The messagereason- The errorchargingResult- TheChargingResultwhich provides structured information about the exception
-
InvalidItemException
Constructs an exception with an error code and a message; The message contains a human readable text.- Parameters:
message- The messagereason- The reasonerror- Theerrorassociated to this exception
-
InvalidItemException
public InvalidItemException(int reason, String message, IError error, ChargingResult chargingResult) Constructs an exception with a cause, a message, an error, and aChargingResultthat explain why the charging is forbidden. The message contains a human readable text. It explains the reason why the charge process is forbidden, and it provides a structured information in theChargingResult.- Parameters:
reason- The reasonmessage- The messageerror- The error codechargingResult- TheChargingResultwhich provides structured information about the exception
-
-
Method Details
-
getError
Deprecated.UsegetReason()instead. Deprecated since version 3.0.Returns the reason why the rating context is invalid.- Returns:
- The error code
- See Also:
-
getReason
public int getReason()Returns the reason why the rating context is invalid.- Returns:
- The error code
- See Also:
-
getMessage
Returns the detailed message explaining why the rating context is invalid.- Overrides:
getMessagein classThrowable- Returns:
- The detailed message
-
getIError
- Returns:
- The error contained in this exception
-
setError
- Parameters:
error- The error contained in this exception
-
getChargingResult
Description copied from interface:IChargingResultHolderExceptionReturns theChargingResultthat provides structured information about theexception.Example
The
ForbiddenChargeExceptionandInvalidItemExceptionexceptions include such acharging resultcomplex object.- Specified by:
getChargingResultin interfaceIChargingResultHolderException- Returns:
- The
ChargingResultthat provides structured information about the exception
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- TheXML attributesof the current element
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- 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.- Specified by:
addChildin interfaceXMLMarshallable- 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.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-