Hi all
I am using org.soyatec.windowsazure libraries of java and everthing is working fine when I make a simlpe java application and use it but the same gives me error when using on Android simulator.
After researching a little bit on error I found that header formed was different in x-ms-date only.
In java application date header was like this
x-ms-date: Fri, 08 Oct 2010 13:34:14 GMT\r\n
while the same on Android platform was
x-ms-date: Fri, 08 Oct 2010 13:34:14 GMT+00:00\r\n
Thus it failed and said Date header in request is incorrect.
Remember: I am using same jar files of org.soyatec.windowsazure in both and there is no difference in code.
Code is also as:
import java.net.URI;
import org.soyatec.windowsazure.internal.util.TimeSpan;
import org.soyatec.windowsazure.authenticate.HttpRequestAccessor;
import org.soyatec.windowsazure.authenticate.StorageAccountInfo;
import org.soyatec.windowsazure.blob.BlobStorageClient;
import org.soyatec.windowsazure.blob.IBlobContainer;
import org.soyatec.windowsazure.blob.internal.RetryPolicies;
import org.soyatec.windowsazure.error.StorageException;
public class AzureTest {
public static void main(String[] args)
{
String BLOB_HOST_NAME = "http://blob.core.windows.net/";
String names = new String();
String user = "xxxxx";
String pass = "xxxxzzzzzzzzz";
BlobStorageClient objBlobStorageClient = BlobStorageClient
.create(URI.create(BLOB_HOST_NAME), false, user, pass);
try {
IBlobContainer objBlobContainer = objBlobStorageClient.createContainer("androidtest");
} catch (StorageException e) {
names = e.toString();
}
}
}Thanks in advance....................
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
Hi, I'm having the same exact problem. Has anyone come up with a resolution? Is an update/fix coming soon?
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
FYI, this is the response I get back:
<?xml version="1.0" encoding="utf-8"?><Error>
<Code>AuthenticationFailed</Code>
<Message>
Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:*****
Time:2010-12-15T21:53:22.8082296Z
</Message>
<AuthenticationErrorDetail>The Date header in the request is incorrect.</AuthenticationErrorDetail>
</Error>