2012-11-29 51 views
0

我是使用其餘框架的Android新手,並且正在連接到GAE服務器。使用datastore將數據從android存儲到GAE objectify 任何人都可以幫我解決這個錯誤嗎?將Android安裝到gae數據存儲對象化

11-29 14:23:13.421: I/ApplicationPackageManager(13615): cscCountry is not German : XTC 
11-29 14:23:23.609: I/ApplicationPackageManager(13615): cscCountry is not German : XTC 
11-29 14:23:27.273: D/dalvikvm(13615): GC_CONCURRENT freed 220K, 48% free 2987K/5639K, external 508K/517K, paused 4ms+4ms 
11-29 14:23:38.609: D/dalvikvm(13615): GC_CONCURRENT freed 316K, 47% free 3176K/5895K, external 508K/517K, paused 3ms+5ms 
11-29 14:23:38.773: D/dalvikvm(13615): GC_CONCURRENT freed 227K, 45% free 3408K/6087K, external 508K/517K, paused 3ms+3ms 
11-29 14:23:38.968: D/dalvikvm(13615): GC_CONCURRENT freed 261K, 42% free 3698K/6343K, external 508K/517K, paused 3ms+8ms 
11-29 14:23:39.187: D/dalvikvm(13615): GC_CONCURRENT freed 265K, 41% free 3950K/6599K, external 508K/517K, paused 4ms+5ms 
11-29 14:23:39.203: I/org.restlet(13615): Starting the default HTTP client 
11-29 14:23:50.695: I/global(13615): Loaded time zone names for en_US in 628ms. 
11-29 14:23:50.703: I/PortalUserController(13615): Creation failed ! 
11-29 14:23:50.703: I/(13615): Method Not Allowed 
11-29 14:23:50.703: I/System.out(13615): Method Not Allowed 

//這裏是全班

公共類PortalUserController {

public final ClientResource cr = new ClientResource(
     ServerConfiguration.gae_path + "/rest/user"); 

     public PortalUserController() { 
      ServerConfiguration.getInstance(); 
     } 

     public void create(PortalUser user) throws Exception { 
     final PortalUserControllerInterface uci = cr.wrap(PortalUserControllerInterface.class); 

     try { 
     uci.create(user); 

     Log.i("PoralUserController", "Creation success !"); 
     } catch (Exception e) { 
     Log.i("PortalUserController", "Creation failed !"); 
     Log.i("", e.getMessage()); 
     System.out.println(e.getMessage()); 
     throw e; 
     } 
     } 

     public List<PortalUser>getAllUsers() { 
     final PortalUserControllerInterface uci = cr 
     .wrap(PortalUserControllerInterface.class); 
     DataContainer content = uci.getAllUsers(); 
     return content.getUser_list(); 
     } 

}

感謝adavance。

回答

0
"Method Not Allowed" 

您使用的方法錯誤,即:您可能正在發送GET,其中服務器只在給定的URL上接受POST;