MavyaSoni / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

a inner class can not instantiated #156

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.create ksoap based classes that compatible with the Android platform by 
wsdl2ksoap.
2.define a inner class named 'XXXResponse', inside of XXXSoap class.
3.add a object-xml mapping like this: [envelope.addMapping(namespace, name, 
XXXResponse.class)]
4.invoke the method httpTransport.call(soapAction, envelope),then bellow error 
was raised:
but remove the inner class from XXXSoap class instead of a single class, then 
it is ok.
why ?

03-14 08:24:39.225: D/dalvikvm(1280): newInstance failed: no <init>()
03-14 08:24:39.236: W/System.err(1280): java.lang.RuntimeException: 
java.lang.InstantiationException: 
cn.cq.besttone.app.interpersonal.ws.TmqSoap$GetCurrentTimeResponse2
03-14 08:24:39.236: W/System.err(1280):     at 
org.ksoap2.serialization.SoapSerializationEnvelope.readInstance(SoapSerializatio
nEnvelope.java:437)
03-14 08:24:39.236: W/System.err(1280):     at 
org.ksoap2.serialization.SoapSerializationEnvelope.read(SoapSerializationEnvelop
e.java:387)
03-14 08:24:39.236: W/System.err(1280):     at 
org.ksoap2.serialization.SoapSerializationEnvelope.parseBody(SoapSerializationEn
velope.java:151)
03-14 08:24:39.236: W/System.err(1280):     at 
org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:140)
03-14 08:24:39.236: W/System.err(1280):     at 
org.ksoap2.transport.Transport.parseResponse(Transport.java:118)
03-14 08:24:39.245: W/System.err(1280):     at 
org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:253)
03-14 08:24:39.245: W/System.err(1280):     at 
org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:116)
03-14 08:24:39.245: W/System.err(1280):     at 
org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:111)
03-14 08:24:39.245: W/System.err(1280):     at 
cn.cq.besttone.app.interpersonal.ws.TmqSoap.getCurrentTime(TmqSoap.java:143)
03-14 08:24:39.245: W/System.err(1280):     at 
cn.cq.besttone.app.interpersonal.test.SoapTest.testGetCurrentTime(SoapTest.java:
26)
03-14 08:24:39.245: W/System.err(1280):     at 
java.lang.reflect.Method.invokeNative(Native Method)
03-14 08:24:39.245: W/System.err(1280):     at 
java.lang.reflect.Method.invoke(Method.java:521)
03-14 08:24:39.245: W/System.err(1280):     at 
junit.framework.TestCase.runTest(TestCase.java:154)
03-14 08:24:39.245: W/System.err(1280):     at 
junit.framework.TestCase.runBare(TestCase.java:127)
03-14 08:24:39.245: W/System.err(1280):     at 
junit.framework.TestResult$1.protect(TestResult.java:106)
03-14 08:24:39.245: W/System.err(1280):     at 
junit.framework.TestResult.runProtected(TestResult.java:124)
03-14 08:24:39.245: W/System.err(1280):     at 
junit.framework.TestResult.run(TestResult.java:109)
03-14 08:24:39.245: W/System.err(1280):     at 
junit.framework.TestCase.run(TestCase.java:118)
03-14 08:24:39.255: W/System.err(1280):     at 
android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
03-14 08:24:39.255: W/System.err(1280):     at 
android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
03-14 08:24:39.255: W/System.err(1280):     at 
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:52
0)
03-14 08:24:39.255: W/System.err(1280):     at 
android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by nciae...@gmail.com on 14 Mar 2013 at 8:35

Attachments:

GoogleCodeExporter commented 8 years ago
The project is migrating to github. If you believe this issue is still valid 
and should be tracked please file a new issue at 
https://github.com/simpligility/ksoap2-android/issues

Original comment by mosa...@gmail.com on 7 Aug 2015 at 5:35