LuisCastilloSalinas / ksoap2-android

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

Runtime exception when there is Vector inside a Vector #106

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Try to consume a webservice which has a Vector inside a Vector
2.The webservice fails to consume and throws a RunTime exception in the line as 
below stacktrace.
02-10 17:01:55.797: W/System.err(726): java.lang.RuntimeException: Unknown 
Property: EligibilityDetails
02-10 17:01:55.797: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.readSerializable(SoapSerializ
ationEnvelope.java:194)
02-10 17:01:55.797: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.readInstance(SoapSerializatio
nEnvelope.java:486)
02-10 17:01:56.368: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.read(SoapSerializationEnvelop
e.java:420)
02-10 17:01:56.368: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.readSerializable(SoapSerializ
ationEnvelope.java:208)
02-10 17:01:56.556: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.readInstance(SoapSerializatio
nEnvelope.java:486)
02-10 17:01:56.556: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.read(SoapSerializationEnvelop
e.java:420)
02-10 17:01:56.556: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.readSerializable(SoapSerializ
ationEnvelope.java:208)
02-10 17:01:56.556: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.readInstance(SoapSerializatio
nEnvelope.java:486)
02-10 17:01:56.556: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.read(SoapSerializationEnvelop
e.java:420)
02-10 17:01:56.556: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.readSerializable(SoapSerializ
ationEnvelope.java:208)
02-10 17:01:57.133: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.readInstance(SoapSerializatio
nEnvelope.java:486)
02-10 17:01:57.133: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.read(SoapSerializationEnvelop
e.java:420)
02-10 17:01:57.133: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.readSerializable(SoapSerializ
ationEnvelope.java:208)
02-10 17:01:57.516: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.readInstance(SoapSerializatio
nEnvelope.java:486)
02-10 17:01:57.703: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.read(SoapSerializationEnvelop
e.java:420)
02-10 17:01:57.703: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.readSerializable(SoapSerializ
ationEnvelope.java:208)
02-10 17:01:57.894: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.readInstance(SoapSerializatio
nEnvelope.java:486)
02-10 17:01:58.277: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.read(SoapSerializationEnvelop
e.java:420)
02-10 17:01:58.277: W/System.err(726):  at 
org.ksoap2.serialization.SoapSerializationEnvelope.parseBody(SoapSerializationEn
velope.java:149)
02-10 17:01:58.277: W/System.err(726):  at 
org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:137)
02-10 17:01:58.660: W/System.err(726):  at 
org.ksoap2.transport.Transport.parseResponse(Transport.java:100)
02-10 17:01:58.660: W/System.err(726):  at 
org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:195)
02-10 17:01:58.660: W/System.err(726):  at 
org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:95)

3.

What is the expected output? What do you see instead?
Should not throw a Runtime Exception

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

Original issue reported on code.google.com by gurudut...@gmail.com on 10 Feb 2012 at 11:59

GoogleCodeExporter commented 9 years ago
Could you provide a test case and a fix for the issue as a pull request? 

Original comment by mosa...@gmail.com on 14 Feb 2012 at 5:09

GoogleCodeExporter commented 9 years ago
Sorry this is not a bug,was a bug in my generated code.Apologies

Original comment by gurudut...@gmail.com on 27 Feb 2012 at 6:52

GoogleCodeExporter commented 9 years ago
Could you post what you had to fix here?

Original comment by mosa...@gmail.com on 27 Feb 2012 at 5:04

GoogleCodeExporter commented 9 years ago
I am using the http://code.google.com/p/wsdl2ksoap/ to generate the client code.
The LiteralArrayVector that gets generated adds the mapping like this
         envelope.addMapping(namespace, "", elementClass);
where as it should have been like this
        envelope.addMapping(namespace, getItemDescriptor(), elementClass);
where getItemDescriptor gives the node name.
Now this would work for responses which had a Vector,but when there are nested 
vectors are multiple vectors,it would fail

Original comment by gurudut...@gmail.com on 28 Feb 2012 at 3:38