用Java写的WCF webservice,在android怎么调用呢?附代码如下
@WebService(endpointInte易做图ce="org.kxw.cxf.ws.HelloWorld",serviceName="HelloWorldWs")
public class HelloWorldWs implements HelloWorld {
@Override
public String sayHi(String name) {
return "你好!"+name+" "+"现在的时间是"+new Date();
}
}
public class ServiceMain {
public static void main(String[] args ){
HelloWorld hw=new HelloWorldWs();
//发布Web Service_____本地IP地址
//Endpoint.publish("http://localhost/HelloWorld", hw);
Endpoint.publish("http://localhost:9999/cat", hw);
System.out.println("Web Service 暴露成功!");
}
查了很多资料,好像要命名空间之类的,针对我现在的代码,该怎么用Android调用。求代码,关键是
private static final String NameSpace = "";
private static final String URL = "";
private static final String SOAP_ACTION = "";
private static final String MethodName = ""; webservice Java WCF Android
补充:移动开发 , Android