MavyaSoni / ksoap2-android

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

safeGetProperty returns "anyType{}" #39

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Make sure a tag of type <ns2:Code/> is included in the SoapObject response.
2. Parse the SoapObject with 
String code = soapObject.safeGetProperty("Code", "").toString();

What is the expected output? What do you see instead?
Expected output is "". The real output is "anyType{}"

What version of the product are you using? On what operating system?
Version 2.5.2. Ubuntu operating system.

Please provide any additional information below.

Original issue reported on code.google.com by henrik.l...@gmail.com on 30 Nov 2010 at 5:34

GoogleCodeExporter commented 8 years ago

Original comment by mosa...@gmail.com on 30 Nov 2010 at 10:58

GoogleCodeExporter commented 8 years ago
can you try if this problem occurs if you set envelope.implicitTypes= false ? 
From what I understand now it might not happen then.. 

Original comment by mosa...@gmail.com on 3 Dec 2010 at 9:17

GoogleCodeExporter commented 8 years ago

Original comment by mosa...@gmail.com on 15 Feb 2011 at 6:39

GoogleCodeExporter commented 8 years ago
I am having the same problem. For any primitive type returning as empty i get 
anyType{} response. The only workaround i have found is to compare each 
returned value with ANYTYPE{} uppercased and then assign response acordingly.

Original comment by santiban...@gmail.com on 1 Sep 2011 at 7:35

GoogleCodeExporter commented 8 years ago
Would it be worth it to add e.g. a setting like translateAnyType which will 
cause them all to be translated to "" ? 

Original comment by mosa...@gmail.com on 2 Sep 2011 at 5:01

GoogleCodeExporter commented 8 years ago
Couldn't this be regarded as fixed?
As this doesn't happen when .getPrimitivePropertySafely() (coming with next 
release) is used?

Original comment by Konrad.B...@gmail.com on 18 Jan 2012 at 2:33

GoogleCodeExporter commented 8 years ago
I would say yes... 

Original comment by mosa...@gmail.com on 18 Jan 2012 at 5:00

GoogleCodeExporter commented 8 years ago
i am also with this error!!!!
please help me too..

Original comment by uneeshkr...@gmail.com on 1 Feb 2012 at 6:13

GoogleCodeExporter commented 8 years ago
use one of the getsafely methods.

Original comment by mosa...@gmail.com on 1 Feb 2012 at 6:58

GoogleCodeExporter commented 8 years ago
Why is this issue marked as 'fixed'?
Even with ksoap2-3.0.0-RC.2 I still have the same issue, and same way!
When WS doesn't return anything it's ok. But others return " <opt/> " as blank 
String and ksoap read just like this " opt=anyType{}; " (you can print 
envelope.bodyOut).
It is a biig problem.

Any admin, deployer etc to correct ksoap project?

Original comment by h1bert...@gmail.com on 23 Oct 2012 at 7:11

GoogleCodeExporter commented 8 years ago
Like I said in the comment above .. just use the write methods to parse you 
output and it will work fine. Also if you think it should be changed or fixed 
feel free to to so and send a pull request with your enhancement. At this stage 
I consider this not a bug in ksoap but in the way you are using it.. 

Original comment by mosa...@gmail.com on 23 Oct 2012 at 8:11

GoogleCodeExporter commented 8 years ago
Thank you mosa., you helped me.
I just can't understand/agree the reason thats not a bug.
And the real difference between getPrimitivePropertySafelyAsString and 
getPropertySafelyAsString.
I'd be glad if i can help with a pull request.(but i need to undestand better)
Thanks again..

Original comment by h1bert...@gmail.com on 24 Oct 2012 at 11:45