In the course of evaluating Atmos, I've tried to write a small java uploader, "translating" from the .NET version of the quick start guide. This is what I've come up with:
where "my token" = subtenantid/tokenid (tried all combinations - only subtenant/only token) and "my secret"=shared secret as per the confirmation e-mail.
Τρι, 26 Μαϊ 2009 12:31:09 GMT /rest/namespacenull?metadata/system x-emc-uid:c936ea05fce94111914de4d593f2fcc5/NTUA0F21D9CF00B06914 338 [main] DEBUG com.emc.esu.api.rest.EsuRestApi - Hash: hOlmZW2PlhCpaw3UFL+j0sLGW5Q= 813 [main] DEBUG com.emc.esu.api.rest.EsuRestApi - Error response: 1031 The request timestamp was outside the valid time window.
867 [main] DEBUG com.emc.esu.api.rest.EsuRestApi - Error: 1031 message: The request timestamp was outside the valid time window.
So the question is am I doing something wrong during the initialization fase? Should I try to mess with the calendar info, the metadata, or is it simply an access denied error?
Yes, this solution does work, as well as changing the default locale which is how I've figured it out in the first place.
I am just thinking aloud here, but since we are only interested in determining time and date, why not use something more concise like ISO 8601's format - date_T_time (e.g. 20090602T172022)? Not as pretty, but should work everywhere. Changing locales is an elegant solution to a problem that should not exist, I think.
I agree, ISO8601 is much nicer, but after some research it appers that the HTTP spec states that the Date header should be in RFC-822 format (http://tools.ietf.org/html/rfc822#section-5) and not very locale friendly
I'll update the Java wrapper code with this fix. Thanks for pointing it out.
eangelou
3 Posts
656
0
Posted May 26th, 2009 03:00
OK, sorry, there is an exception thrown when evaluating time and using a different locale - it seems it was all Greek to the java bindings.