我正在尝试从我的Android应用程序调用Login服务。 Web服务是在asmx中创建的(它是一个简单的Web服务,它导入了一些oracle库并连接了oracle数据库)。当我通过网络提供值来测试asmx服务作为独立服务时它工作正常。但是,当我尝试连接并从我的Android应用程序调用登录服务时,它失败并出现以下错误
SoapFault - faultcode:' soap:Server' faultstring:' System.Web.Services.Protocols.SoapException:服务器无法处理请求。 ---> System.IO.FileNotFoundException:无法加载文件或程序集' OracleDbLib2010,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null'或其中一个依赖项。该系统找不到指定的文件。 调用此服务的相关代码如下
public final String SOAP_ACTION = "http://test.app.org/";;
public final String OPERATION_NAME = "Login";
public final String WSDL_TARGET_NAMESPACE = "http://test.app.org/";
public final String SOAP_ADDRESS = "https://abc.test.com/ws/webservice/Service1.asmx";
SoapObject request = new SoapObject(WSDL_TARGET_NAMESPACE,OPERATION_NAME);
PropertyInfo pi=new PropertyInfo();
pi.setName("name");
pi.setValue(name);
pi.setType(String.class);
request.addProperty(pi);
pi=new PropertyInfo();
pi.setName("password");
pi.setValue(password);
pi.setType(String.class);
request.addProperty(pi);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
SoapEnvelope.VER11);
envelope.dotNet = true;
envelope.setOutputSoapObject(request);
HttpTransportSE httpTransport = new HttpTransportSE(SOAP_ADDRESS);
Object response=null;
try
{
httpTransport.call(SOAP_ACTION+OPERATION_NAME, envelope);
response = envelope.getResponse();
}