java.lang.NoClassDefFoundError的:javax.microedition.io.Connector [英] java.lang.NoClassDefFoundError: javax.microedition.io.Connector
问题描述
我试图消耗.NET Web服务,而当我从我的手机运行(调试)收到以下错误
I am trying to consume a .net web service, and get the following error when I run it(debug) from my phone
java.lang.NoClassDefFoundError的:javax.microedition.io.Connector
java.lang.NoClassDefFoundError: javax.microedition.io.Connector
我得到的错误,当我拨打电话的传输对象
I get the error when I make the call to the transport object
ht.call(SOAP_ACTION, soapEnvelope);
而在Eclipse IDE中,(上下文敏感的模型)并不在对象模型中显示这个当我尝试添加我只看到javax.microedition.khronos。*,没有javax.microedition.io,这混淆了我更多。
while in the eclipse ide, the (context sensitive model) does not show this in the object model when i try to add it i only see javax.microedition.khronos.* , no javax.microedition.io, which confuses me more.
当我尝试在模拟器调试此,我只得到的VerifyError
When I try to debug this in the emulator, I only get a VerifyError
private static final String SOAP_ACTION = "http://ikonicsoft.com/CheckTrial";
private static final String METHOD_NAME = "CheckTrial";
private static final String NAMESPACE = "http://ikonicsoft.com";
private static final String URL = "http://ikonicsoft.com/WebService.asmx";
SoapObject request = new SoapObject(NAMESPACE,METHOD_NAME);
request.addProperty("deviceid", deviceid);
SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelope.dotNet = true;
soapEnvelope.setOutputSoapObject(request);
HttpTransport ht = new HttpTransport(URL);
Boolean bValid = false;
try{
ht.call(SOAP_ACTION, soapEnvelope);
Boolean result = (Boolean) soapEnvelope.getResponse();
if((Boolean)result){
bValid = true;
}else{
bValid = false;
}
}catch(Exception e){
e.printStackTrace();
bValid = false;
}
让我知道如果你需要更多的信息。
let me know if you need more info
在此先感谢
帕特里克
推荐答案
好吧,这有助于下载并安装正确ksoap2包。我找到了正确的包android开发的:
Ok, it helps to download and install the correct ksoap2 package. I found the correct package for android development at:
<一个href=\"http://$c$c.google.com/p/ksoap2-android/downloads/detail?name=ksoap2-android-assembly-2.4-jar-with-dependencies.jar\"相对=nofollow> ksoap2-机器人组装-2.4-JAR-与-dependencies.jar
这篇关于java.lang.NoClassDefFoundError的:javax.microedition.io.Connector的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!