Warning: ignoring the InnerClasses attribute for an anonymous inner class (org.ksoap2.transport.KeepAliveHttpsTransportSE $ 1)

When compiling an Android project with ksoap2-android-assembly-2.5.8-jar-with-dependencies.jar as a reference library (external jar), I get this warning:

 [2012-03-20 11:50:50 - AddressBook] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class (org.ksoap2.transport.KeepAliveHttpsTransportSE$1) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is *not* an inner class. 

I am trying to access SOAP SOAP services from an android client, and my code is:

 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(); } 

And the error:

 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@4801ce80 03-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$2.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) 
+4
source share
1 answer

I know this is an old question, but in case someone stumbles here like me, the warning you mentioned is caused by an anonymous inner class and the fact that ksoap2 is compiled with compatibility with java 1.3 (for compatibility with J2ME I think). This warning can be safely ignored if you are not doing any reflexive work on these classes (and even then: only if you check the fact that the class is an inner class).

The better this warning has been fixed with the release of 2.6.4 ksoap2-android (see this request on github ).

Your error is completely unrelated and most likely caused by the misuse of the web service you are trying to call.

+1
source

Source: https://habr.com/ru/post/1402374/


All Articles