Я пытаюсь реализовать веб-сервис для приложения Android (с помощью Phonegap)
У меня есть интерфейс:
Код: Выделить всё
package webservice;
import javax.jws.WebMethod;
import javax.jws.WebService;
@WebService
public interface HelloService {
@WebMethod(operationName = "hello")
public String hello(String name);
Код: Выделить всё
package webservice;
import javax.jws.*;
import android.webkit.WebView;
import com.phonegap.DroidGap;
@WebService
public class HelloServiceImpl implements HelloService {
//Constructor for a invocation with javascript
public LottozahlenServiceImpl(DroidGap gap, WebView view){
}
public String hello(String name) {
System.out.println("Hello "+name);
return "Hello "+name +" Welcome to Web Services!";
}
The problem is, all imports and the annotation "cannot be resolved as a type". I downloaded ksoap2-android and added the JAR to the build path. I also restarted Eclipse, cleaned the project, reloaded the target. I cant solve this. Please help.
Источник: https://stackoverflow.com/questions/798 ... -as-a-type