Android上的Sync Framework会引发SocketTimeoutException

时间:2013-03-16 00:08:21

标签: android microsoft-sync-framework

我即将创建一个Android测试客户端,尝试与运行MS Sync Framework的服务器同步 我配置了数据库并创建了必要的WCF文件,在浏览器中,我的服务似乎没问题。当我运行它的诊断方法时,它看起来没问题。

诊断测试结果评论
Sync Framework运行时:已通过无 连接到SQL Server_ PASSED无
数据库供应_通过无

批处理文件夹存在?:N / A未启用批处理。
对批处理文件夹的写访问N / A:未启用批处理。
ClientAccessPolicy.xml / CrossDomain.xml文件:FAILED无法找到clientaccesspolicy.xml或crossdomain.xml文件。从其他域调用服务的Silverlight客户端将无法成功发出请求。

服务配置设置配置值
 范围名称:wcfscope
 默认冲突解决方案:ClientWins
 默认序列化格式:ODataJson
 详细错误响应:真实  批处理目录:BATCHING_NOT_ENABLED
 下载批量大小BATCHING_NOT_ENABLED

我下载了唯一可用的Android示例:http://selvinlistsyncsample.codeplex.com/documentation
并据此修改。经过几个小时的痛苦,我的Android项目编译。 当我运行应用程序时,我得到以下异常。 呼唤是这样的:
 Uri uri = MyProviderClass.getSyncUri(“WCFScopeSyncService”,           “WCFScope”);
      ContentResolver res = context.getContentResolver();
      int result = res.update(uri,null,null,null);
在服务器端,日志中没有错误。我该怎么检查?

03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302): IOException<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302): java.net.SocketTimeoutException<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at java.net.PlainSocketImpl.read(PlainSocketImpl.java:491)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:191)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:82)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:174)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:180)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:235)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:259)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:279)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:428)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at pl.selvin.android.syncframework.content.BaseContentProvider.Sync(BaseContentProvider.java:726)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at pl.selvin.android.syncframework.content.BaseContentProvider.update(BaseContentProvider.java:517)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at android.content.ContentProvider$Transport.update(ContentProvider.java:235)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at android.content.ContentResolver.update(ContentResolver.java:990)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at com.example.testandroid.AsyncSync.doInBackground(AsyncSync.java:25)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at android.os.AsyncTask$2.call(AsyncTask.java:287)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at java.util.concurrent.FutureTask.run(FutureTask.java:137)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)<br>
03-15 23:47:19.600: E/pl.selvin.android.syncframework.content.BaseContentProvider(30302):   at java.lang.Thread.run(Thread.java:856)<br>

0 个答案:

没有答案