cancel
Showing results for 
Search instead for 
Did you mean: 

The message has expired (WSSecurityEngine: Invalid timestamp The security semantics of message have expired) while uploading large file using java webservice(SOAP))

hariharanv
Champ on-the-rise
Champ on-the-rise

Hi.
We have fully integrated webservice APIs for alfresco community edition 4.0. When we try to upload files > 12MB thru the webservice APIs, we get this error.

"org.apache.ws.security.WSSecurityException: The message has expired (WSSecurityEngine: Invalid timestamp The security semantics of message have expired)"

We are struck on this for more than couple of days now, i tried to scout for solutions online but none could help.

Let me know if you guys have any solutions. Thanks.

Here is the Exception stack trace;

org.apache.ws.security.WSSecurityException: The message has expired (WSSecurityEngine: Invalid timestamp The security semantics of message have expired)

2016-10-15 17:36:28,795 ERROR AlfrescoDocumentConnectorImpl - AxisFault

faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException

faultSubcode:

faultString: WSDoAllReceiver: security processing failed; nested exception is:

    org.apache.ws.security.WSSecurityException: The message has expired (WSSecurityEngine: Invalid timestamp The security semantics of message have expired)

faultActor:

faultNode:

faultDetail:

    {http://xml.apache.org/axis/}hostname:localhost

WSDoAllReceiver: security processing failed; nested exception is:

    org.apache.ws.security.WSSecurityException: The message has expired (WSSecurityEngine: Invalid timestamp The security semantics of message have expired)

    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)

    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)

    at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)

    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)

1 ACCEPTED ANSWER

mitpatoliya
Star Collaborator
Star Collaborator

As kayne zhang​ suggested this seems to be because of non synchronized clock.

Check this out Got error WSSecurityEngine: Invalid timestamp The security..

View answer in original post

2 REPLIES 2

kaynezhang
World-Class Innovator
World-Class Innovator

It seems your webservcie client and alfresco server clock are not synchronized.Have you error checked you client and server's clock,maybe you need to configure same NTP for client and server.

And alfresco native webservice api is not recommeded ,you'd better use other api (cmis/webscript) instead.

mitpatoliya
Star Collaborator
Star Collaborator

As kayne zhang​ suggested this seems to be because of non synchronized clock.

Check this out Got error WSSecurityEngine: Invalid timestamp The security..