cancel
Showing results for 
Search instead for 
Did you mean: 

Your library doesn't work.... examples too ...

neouf
Champ in-the-making
Champ in-the-making
In a first time, i modified your path architecture for examples because it didn't work very well.
and now i can try to do something.. (go to login page for example ) but when i would like try to login to browse or do something with your "stable" version i have an error.

what is this : WSDoAllReceiver: security processing failed (actions number mismatch) !!

I can't do anything with your php package… no comments.. examples doesn't work…

Can u do something..

Ty
10 REPLIES 10

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

In 1.2.0 the method 'Timestamp' has been added to the required WS security header. This was done in order to support .NET.

The PHP client has been updated to send this header.

Please ensure that both the client PHP and the repository are both on the 1.2.0 code base.  If there is a mis-match then you will likely get the error reported.

Let me know how you get on,

Cheers,
Roy

greg
Champ in-the-making
Champ in-the-making
I receive the same error:
Mar 12 12:23:18 mystech apache2: An error was encountered when calling web service: WSDoAllReceiver: security processing failed; nested exception is:  ^Iorg.apache.ws.security.WSSecurityException: An error was discovered processing the <wsseSmiley Frustratedecurity> header. (WSSecurityEngine: Invalid timestamp The security semantics of message have expired)

I have Alfresco repository 1.2 and the alfresco 1.2 php library installed. This is on Ubuntu Linux with Tomcat. I realize that you have stated elsewhere that the php libraries have been tested exclusively on Windows, could this be the issue?

Not applicable
what is this : WSDoAllReceiver: security processing failed (actions number mismatch) !!

See http://wiki.alfresco.com/wiki/Talk:Web_Service_Samples_for_Java

You need to change the deployment definition so that a timestamp is sent in the SOAP call security header.

flafeer
Champ in-the-making
Champ in-the-making
I receive the same error:
Mar 12 12:23:18 mystech apache2: An error was encountered when calling web service: WSDoAllReceiver: security processing failed; nested exception is:  ^Iorg.apache.ws.security.WSSecurityException: An error was discovered processing the <wsseSmiley Frustratedecurity> header. (WSSecurityEngine: Invalid timestamp The security semantics of message have expired)

I have Alfresco repository 1.2 and the alfresco 1.2 php library installed. This is on Ubuntu Linux with Tomcat. I realize that you have stated elsewhere that the php libraries have been tested exclusively on Windows, could this be the issue?

I was having a similar problem with the ruby test client. (security semantics have expired). The problem was the ruby test client was setting the timestamp in the security header to local time, not UTC.

I'm not familiar with PHP, but looking at the PHP library quickly, it seems maybe the PHP example has the same little mistake.

A bug which, of course, our British friends wouldn't notice in the winter.  :wink:

eron123
Champ in-the-making
Champ in-the-making
Did anyone find a fix to the error in the previous post?

I have the same issue on alfresco 1.2, php lib 1.2, tomcat5.5, SUSE linux.

The code is in:
alfresco/webservice/WebServiceUtils.php

function addSecurityHeader($client, $user, $ticket)

Thanks!

flafeer
Champ in-the-making
Champ in-the-making
Did anyone find a fix to the error in the previous post?

I have the same issue on alfresco 1.2, php lib 1.2, tomcat5.5, SUSE linux.

The code is in:
alfresco/webservice/WebServiceUtils.php

function addSecurityHeader($client, $user, $ticket)

Thanks!

In the case of the ruby client, yes, I was able to fix it. The fix was to insert UTC time, not local time in the security header.

I thought I submitted a patch for this on the jira, but I may have forgotten. I'll check.

- Firoze

eron123
Champ in-the-making
Champ in-the-making
Here ais the code for the timestamp creation:

 $createdDate = date("Y-m-d\TH:i:s\Z");
  $expiresDate = date("Y-m-d\TH:i:s\Z", mktime(date("H")+1, date("i"), date("s"), date("m"), date("d"), date("Y")));

      $created =& new SOAP_Value('{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Created', false, $createdDate);;
      $expires =& new SOAP_Value('{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Expires', false, $expiresDate);;
      $timestamp =& new SOAP_Value('{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp', false, array($created, $expires));

I believe the \Z in the dates is for UTC time?

eron123
Champ in-the-making
Champ in-the-making
If you see this error in the Apache log.
An error was encountered when calling web service: WSDoAllReceiver: security processing failed; nested exception is: \n\torg.apache.ws.security.WSSecurityException: An error was discovered processing the <wsseSmiley Frustratedecurity> header. (WSSecurityEngine: Invalid timestamp The security semantics of message have expired)

Modify the file:

/usr/share/php5/alfresco/webservice/WebServiceUtils.php


   //   $createdDate = date("Y-m-d\TH:i:s\Z");
   //   $expiresDate = date("Y-m-d\TH:i:s\Z", mktime(date("H")+1, date("i"), date("s"), date("m"), date("d"), date("Y")));

      $createdDate = date("Y-m-d\TH:i:s");
      $expiresDate = date("Y-m-d\TH:i:s", mktime(date("H")+1, date("i"), date("s"), date("m"), date("d"), date("Y")));

      $createdDate .= "-08:00"; //your timezone
      $expiresDate .= "-08:00";

      $created =& new SOAP_Value('{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Created', false, $createdDate);;
      $expires =& new SOAP_Value('{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Expires', false, $expiresDate);;
      $timestamp =& new SOAP_Value('{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp', false, array($created, $expires));

flafeer
Champ in-the-making
Champ in-the-making
And for those of you using the ruby client and having the same problem, the fix is to actually get the UTC time instead of the local time:

Replace:
-   created = Time.now.strftime("%Y-%m-%dT%H:%M:%SZ")
-   expires = (Time.now + 60*60).strftime("%Y-%m-%dT%H:%M:%SZ")

With:

+  created = Time.now.utc.strftime("%Y-%m-%dT%H:%M:%SZ")
+  expires = (Time.now + 60*60).utc.strftime("%Y-%m-%dT%H:%M:%SZ")

in testWebServices.rb (or any similar code you may be using in your own project)
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.