Exception har misvisende feiltekst
Closed this issue · 2 comments
Har opplevd å få følgende feilmelding:
no.difi.sdp.client.domain.exceptions.SendException: An unhandled exception occured while performing request at no.difi.sdp.client.internal.DigipostMessageSenderFacade.performRequest(DigipostMessageSenderFacade.java:142) at no.difi.sdp.client.internal.DigipostMessageSenderFacade.performRequest(DigipostMessageSenderFacade.java:123) Caused by: no.difi.sdp.client.domain.exceptions.NoekkelException: Klarte ikke å verifisere signatur på responsen. Dette kan skyldes at det tiltrodde rotsertifikatet mangler i keystore/trust store. Hvis dette plutselig begynner å skje kan det skyldes at den andre parten har skiftet sertifikat at no.difi.sdp.client.internal.UserFriendlyWsSecurityExceptionMapper.resolveException(UserFriendlyWsSecurityExceptionMapper.java:27) at org.springframework.ws.soap.security.AbstractWsSecurityInterceptor.handleValidationException(AbstractWsSecurityInterceptor.java:299) Caused by: org.springframework.ws.soap.security.wss4j.Wss4jSecurityValidationException: Invalid timestamp: The security semantics of the message have expired; nested exception is org.apache.wss4j.common.ext.WSSecurityException: Invalid timestamp: The security semantics of the message have expired at no.digipost.api.interceptors.Wss4jInterceptor.validateMessage(Wss4jInterceptor.java:341) at org.springframework.ws.soap.security.AbstractWsSecurityInterceptor.handleResponse(AbstractWsSecurityInterceptor.java:243) Caused by: org.apache.wss4j.common.ext.WSSecurityException: Invalid timestamp: The security semantics of the message have expired at org.apache.wss4j.dom.validate.TimestampValidator.validate(TimestampValidator.java:62) at no.digipost.api.interceptors.Wss4jInterceptor.verifyTimestamp(Wss4jInterceptor.java:470)
NoekkelException med teksten: "Klarte ikke å verifisere signatur på responsen. Dette kan skyldes at det tiltrodde rotsertifikatet mangler i keystore/trust store. Hvis dette plutselig begynner å skje kan det skyldes at den andre parten har skiftet sertifikat", når rot årsaken er: "Invalid timestamp: The security semantics of the message have expired".
Här kunde klient-bilioteket differentierat på lite fler fel-typer, se WSSecurityException.ErrorCode enum. (I detta tillfället ErrorCode.MESSAGE_EXPIRED)