我想运行一个现有的项目.但是当我导入ksoap2-
android-assembly-2.6.5-jar-with-dependencies.jar时,发生了错误.
import org.ksoap2.transport.AndroidHttpTransport;
我在包org.ksoap2.transport中找不到AndroidHttpTransport方法.
我怎么处理它?
最佳答案 你应该使用ksoap2 jar文件..
然后使用以下代码
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE httpTransport = new HttpTransportSE(SOAP_ADDRESS);
SoapObject response=null;
try
{
httpTransport.call(SOAP_ACTION, envelope);
response = (SoapObject) envelope.bodyIn;