2013-01-17 2 views
1
package com.wa.test.client; 

import com.google.gwt.core.client.EntryPoint; 
import com.nubotech.gwt.oss.client.OnlineStorageService; 
import com.nubotech.gwt.oss.client.OnlineStorageServiceFactory; 
import com.nubotech.gwt.oss.client.auth.Credential; 

public class TestAmazon implements EntryPoint { 

    public void onModuleLoad() { 
    Credential credential = new Credential("[email protected]", "QFTG8an1yTB"); 
    OnlineStorageService storageService = OnlineStorageServiceFactory.getService(credential); 
    storageService.createBucket("myFirstBucket"); 

    } 
} 


<?xml version="1.0" encoding="UTF-8"?> 
<module rename-to='testamazon'> 
<!-- Inherit the core Web Toolkit stuff.      --> 
<inherits name='com.google.gwt.user.User'/> 
<inherits name='com.nubotech.gwt.oss.Oss'/> 

<!-- Inherit the default GWT style sheet. You can change  --> 
<!-- the theme of your GWT application by uncommenting   --> 
<!-- any one of the following lines.       --> 
<inherits name='com.google.gwt.user.theme.clean.Clean'/> 
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> --> 
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> --> 
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>  --> 

<!-- Other module inherits          --> 

<!-- Specify the app entry point class.       --> 
<entry-point class='com.wa.test.client.TestAmazon'/> 

<!-- Specify the paths for translatable code     --> 
<source path='client'/> 
<source path='shared'/> 

![enter image description here][1]</module> 

이것은 내 코드이며 jar 파일 gwt-s3-api-0.9.3도 포함됩니다. 그것은 다음과 같은 오류를 제공합니다 : 당신은 항아리의 일치하지 않는 버전을 사용하는Gwt 및 Amazon S3 통합 오류 발생

12:40:38.347 [ERROR] [testamazon] Errors in 'jar:file:/D:/Technologies/Java/Amazon/jar/ 
gwt-s3-api-0.9.3.jar!/com/nubotech/gwt/oss/client/s3/MockS3OnlineStorageService.java' 

[ERROR] [testamazon] - Line 28: The import com.google.gwt.user.client.HTTPRequest 
cannot be resolved 

답변

0

. com.google.gwt.user.client.HTTPRequest는 이전 버전의 GWT gwt-servlet.jar 및 gwt-user.jar에서 사용할 수있었습니다. GWT 1.5에서는 사용되지 않으며 최신 GWT에서는 제거됩니다. GWT RequestBuilder를 사용해야합니다.

<inherits name='com.google.gwt.http.HTTP'/> 

Java 코드.

import com.google.gwt.http.client.RequestBuilder 

참조 - http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/client/HTTPRequest.html

사용하고있는 타사 항아리가 아주 오래된하지 삼년 업데이트입니다. 귀하의 케이스 GWT-S3-API-0.9.3.jar 내부 MockS3OnlineStorageService.java에서

더 이상 내가 이미이 일을했던 GWT 2.4

+0

에서 지원의 HTTPRequest 클래스를 사용하고 있습니다. 하지만 여전히 위와 같은 문제가 있습니다. –

+0

어떤 버전의 GWT를 사용하고 있습니까? – SSR

+0

GWT 2.4.0을 사용했습니다. –