You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the option/approach provided by the library to send the CALLERROR message from server to client with custom error information and correct messageId
#205
Open
rayan99 opened this issue
Aug 29, 2022
· 1 comment
I have implemented a server based on the example given in
ocpp-v1_6-example/json_server_example/src/main/java/eu/chargetime/ocpp/jsonserverimplementation/config/ServerCoreProfileConfig.java
I have a question regarding the following implementation as an example:
@OverRide
public StartTransactionConfirmation handleStartTransactionRequest(UUID sessionIndex, StartTransactionRequest request) {
}
In this function, if I provide the StartTransactionConfirmation correctly everything works fine.
For negative cases where I have to provide CALLERROR as per the following OCPP format:
MessageTypeId, MessageId, errorCode errorDescription, {}]
What is the option/approach provided by the library to send the error message to client with:
a) Proper error code
b) My own values for error description and details
c) Message Id. (Currently message id is not received in handler)..
Pls Note:
I explored the option of throwing runtime exception, but it has three shortcomings:
I am not able to send proper error code, description and details
I do not know the message Id which I have to send back since the function does not get it as parameter/any other way
The error message is printed in the server but it does not reach the client
What do you consider a "negative case"? The only "negative case" in which you are allowed to reply with a CALLERROR is a malformed request, i.e. if you cannot parse the StartTransactionRequest. In that case, consider that the charge point cannot really make much of the CALLERROR. It would only help if you had a charge point developer debugging on their side, but if you're in that position, you might as well tell them directly what's wrong with their requests.
For all properly formed StartTransactionRequests, you're required to reply with a StartTransactionConfirmation.
I have implemented a server based on the example given in
ocpp-v1_6-example/json_server_example/src/main/java/eu/chargetime/ocpp/jsonserverimplementation/config/ServerCoreProfileConfig.java
I have a question regarding the following implementation as an example:
@OverRide
public StartTransactionConfirmation handleStartTransactionRequest(UUID sessionIndex, StartTransactionRequest request) {
}
In this function, if I provide the StartTransactionConfirmation correctly everything works fine.
For negative cases where I have to provide CALLERROR as per the following OCPP format:
MessageTypeId, MessageId, errorCode errorDescription, {}]
What is the option/approach provided by the library to send the error message to client with:
a) Proper error code
b) My own values for error description and details
c) Message Id. (Currently message id is not received in handler)..
Pls Note:
I explored the option of throwing runtime exception, but it has three shortcomings:
I am using following build:
The text was updated successfully, but these errors were encountered: