android – 警告:忽略匿名内部类的InnerClasses属性(org.ksoap2.transport.KeepAliveHttpsTransportSE $1)

android – 警告:忽略匿名内部类的InnerClasses属性(org.ksoap2.transport.KeepAliveHttpsTransportSE ),第1张

概述当使用kso​​ap2- android-assembly-2.5.8-jar-with-dependencies.jar作为引用库(外部jar)编译 Android项目时,我收到此警告: [2012-03-20 11:50:50 - AddressBook] Dx warning: Ignoring InnerClasses attribute for an anonymous inner cl 当使用kso​​ap2- android-assembly-2.5.8-jar-with-dependencIEs.jar作为引用库(外部jar)编译 Android项目时,我收到此警告:

[2012-03-20 11:50:50 - AddressBook] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class(org.ksoap2.transport.KeepAlivehttpsTransportSE) that doesn't come with anassociated EnclosingMethod attribute. This class was probably produced by acompiler that dID not target the modern .class file format. The recommendedsolution is to recompile the class from source,using an up-to-date compilerand without specifying any "-target" type options. The consequence of ignoringthis warning is that reflective operations on this class will incorrectlyindicate that it is *not* an inner class.

我正在尝试从AndroID客户端访问EWS SOAP服务,我的代码是:

String nameSPACE = "http://schemas.microsoft.com/exchange/services/2006/messages";String SOAP_ACTION = "http://schemas.microsoft.com/exchange/services/2006/messages";String METHOD_name = "GetUserAvailability";String URL = "https://vpnqrd0302.outlook.com/EWS/Exchange.asmx";        String result = null;        Object resultRequestSOAP = null;        SoapObject request = new SoapObject(nameSPACE,METHOD_name);        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(                SoapEnvelope.VER11);        envelope.dotNet = true;        envelope.setoutputSoapObject(request);        httpTransportSE androIDhttpTransport = new httpTransportSE(URL);        androIDhttpTransport.deBUG = true;        List<headerProperty> headerList = new ArrayList<headerProperty>();        headerList.add(new headerProperty("Authorization","Basic "                + org.kobjects.base64.Base64                .encode("temp@tempsuer.onmicrosoft.com:Password1"                                .getBytes())));        try {            androIDhttpTransport.call(SOAP_ACTION,envelope,headerList);            String requestDumpString = androIDhttpTransport.requestDump;            System.out.println("requestDump : " + requestDumpString);            resultRequestSOAP = envelope.getResponse(); // Output received            System.out.println("resultRequestSOAP : " + resultRequestSOAP);            result = resultRequestSOAP.toString(); // Result string            System.out.println("OUTPUT : " + result);        } catch (Exception e) {            e.printstacktrace();        }

错误是:

03-20 12:21:16.488: W/System.err(7919): SoapFault - faultcode: 'a:ErrorSchemaValIDation' faultstring: 'The request Failed schema valIDation: Could not find schema information for the element 'http://schemas.microsoft.com/exchange/services/2006/messages:GetUserAvailability'.' faultactor: 'null' detail: org.kxml2.kdom.Node@4801ce8003-20 12:21:16.491: W/System.err(7919):     at org.ksoap2.serialization.soapSerializationEnvelope.parseBody(SoapSerializationEnvelope.java:136)03-20 12:21:16.491: W/System.err(7919):     at org.ksoap2.soapEnvelope.parse(SoapEnvelope.java:137)03-20 12:21:16.495: W/System.err(7919):     at org.ksoap2.transport.Transport.parseResponse(Transport.java:96)03-20 12:21:16.495: W/System.err(7919):     at org.ksoap2.transport.httpTransportSE.call(httpTransportSE.java:189)03-20 12:21:16.499: W/System.err(7919):     at net.vivekiyer.gal.ActiveSyncManager.getUserAvailabilityRequest(ActiveSyncManager.java:978)03-20 12:21:16.499: W/System.err(7919):     at net.vivekiyer.gal.CorporateAddressBook$galSearch.doInBackground(CorporateAddressBook.java:510)03-20 12:21:16.507: W/System.err(7919):     at net.vivekiyer.gal.CorporateAddressBook$galSearch.doInBackground(CorporateAddressBook.java:1)03-20 12:21:16.507: W/System.err(7919):     at androID.os.AsyncTask.call(AsyncTask.java:185)03-20 12:21:16.507: W/System.err(7919):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)03-20 12:21:16.511: W/System.err(7919):     at java.util.concurrent.FutureTask.run(FutureTask.java:137)03-20 12:21:16.511: W/System.err(7919):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)03-20 12:21:16.511: W/System.err(7919):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)03-20 12:21:16.515: W/System.err(7919):     at java.lang.Thread.run(Thread.java:1096)
解决方法 我知道这是一个老问题,但万一有人像我一样偶然发现:你提到的警告是由一个匿名的内部类引起的,而且ksoap2是用java 1.3兼容性编译的(为了兼容我认为的J2ME).除非您对这些类进行一些反思性工作(甚至在这种情况下:只有在检查类是内部类的事实时)才能安全地忽略此警告.

更好的是,这个特殊警告已经修复了ksoap2-androID的2.6.4版本(见this pull request on github).

您的错误完全不相关,更可能是由于您尝试调用的Web服务使用不当造成的.

总结

以上是内存溢出为你收集整理的android – 警告:忽略匿名内部类的InnerClasses属性(org.ksoap2.transport.KeepAliveHttpsTransportSE $1)全部内容,希望文章能够帮你解决android – 警告:忽略匿名内部类的InnerClasses属性(org.ksoap2.transport.KeepAliveHttpsTransportSE $1)所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1124473.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存