Closed GoogleCodeExporter closed 9 years ago
Seems like you found an issue indirectly. I will push a fix and the test case
for you soon.
Original comment by mosa...@gmail.com
on 21 Mar 2012 at 12:01
The commit
https://github.com/mosabua/ksoap2-android/commit/f0e23aed58d2b8d0aabc4ae2436a2dc
8c4e036bc
has a unit test that produces the output as well as the fix needed for it to
work. PropertyInfo is not intended to be used like you are trying to do here as
far as I can tell..
Please verify and let me know of any problems. I can cut a new release whenever
needed.
Original comment by mosa...@gmail.com
on 21 Mar 2012 at 4:10
Also i came across a new thing still related to this.
it is happening when ksoap is trying to parse the response when it is like this:
<Document Description="None">Some random text here</Document>
it fails inside soapSerializationEnvelope throwing a runtime exception: Mixed
content:
in this method specifically:
protected Object readUnknown(XmlPullParser parser, String typeNamespace, String typeName) throws IOException,
XmlPullParserException;
on row 75:
if (text != null && text.trim().length() != 0) {
Logger.d("tag", text);
// throw new RuntimeException("Malformed input: Mixed content");
}
now i know the text that needs to be extracted here is present and the
resulting object should be again a soapPrimitive instead of a soap object.
Original comment by darkogro...@gmail.com
on 21 Mar 2012 at 7:54
Hm.. I am parsing lots of stuff like that and it does not happen for me. Can
you create a unit test that shows the behaviour?
Original comment by mosa...@gmail.com
on 21 Mar 2012 at 4:25
I am sorry i didn't properly post the response form, the one above is a regular
property parse right :)
Here is the correct form i am receiving:
<Document CreationDate="2012-03-22">
http://www.somepage.com/document.pdf
<RegionLimitation>false</RegionLimitation>
</Document>
This feels kinda like an inproper response for me but its how it is received,
but i am working on an already built service that has a web app, desktop app on
top of it and now an iphone and android one which use this and everyone except
android can parse this without any issues whatsoever. so i am guessing it is
supposed to be possible.
Original comment by darkogro...@gmail.com
on 22 Mar 2012 at 8:17
This is totally invalid as far as I understand. I am not sure what the impact
would be to support that sort of weird response. Arguably it should be fixed
but since you dont have that option you will have to look how ksoap parses this
response and come up with a fix. I would suggest to write a unit test in e.g.
SoapSerializationEnvelopeTest and then try to fix it to parse.. however I
believe this should be a separate issue. Please create that and post the
necessary documentation there. I will close this issue with the next release
since the original problem is fixed.
Original comment by mosa...@gmail.com
on 22 Mar 2012 at 5:08
Original comment by mosa...@gmail.com
on 10 Apr 2012 at 5:24
Hi,
I also have a related issue as the original poster the difference is that I
also need to include namespace.
I believe the suggested solution is to use SoapPrimitive as in unit test.
What I want to acheive is to add namespace e.g:
<n0:Power Unit="kw">1500</Power>
The testIssue112() function specified the namespace in the SoapPrimitive object
but that is not reflected in the output.
Plese confirm if this is bug or there is any other way around it.
Original comment by shirazni...@gmail.com
on 3 Apr 2013 at 11:21
how is this fixed?
if i set propertyinfo name to "" it will create <Element><>Value</></Element>
Original comment by mazm...@gmail.com
on 10 Oct 2014 at 3:10
Original issue reported on code.google.com by
darkogro...@gmail.com
on 19 Mar 2012 at 8:15