Hi,% username%.
Perhaps all this will be very trivial, but the problem has cost me quite a long time studying the documentation, stackoverflow, the call stack, and the ksoap2 source code. Perhaps this will save someone an extra couple of hours.
A little seo: ksoap2 send array ArrayOfInt java.lang.StackOverflowError wsdl2ksoap download free torrent
')
Initial conditions: .NET WCF service and the task to write an application for Android, with this service working.
Problem: wsdl2ksoap perfectly (as far as possible) generated all the necessary classes from the WSDL description of the SOAP service, and while it was a simple interaction like “sent a dial, got some kind of structure,” everything went great. Of course, I had to tweak some things with my hands, and IntelliJ IDEA helped a lot with this, but these are trifles.
The problem appeared when it was necessary to send arrays of numbers, strings and enums to the server. It seems that ksoap2 simply does not know how to serialize objects normally inherited from the generated wsdl2ksoap LiteralArrayVector, which, in turn, is only a Vector that implements the KvmSerializable interface. When attempting to serialize a query, everything collapsed with java.lang.StackOverflowError, even on a simple ArrayOfInt (extends LiteralArrayVector).
In the end, the solution is just a custom marshalling. Of course, it's a bit stressful to write a marshall for each type of ArrayOf <some_basic_type_or_enum>, but it seems to be a necessary evil. Marshall, of course, need to register in the generated class corresponding to the service.
Here is an example:
pastebin.com/3P6s0P7J
soapUI will give you a good idea of how a SOAP request that a server is expecting should look like and, accordingly, will help you to replace int with the desired type, be it a string, SOME_ENUM or something else.
Along the way, I would like to give advice to novice developers for Android: throw Eclipse and go to IntelliJ IDEA, in which the boys calmly write classes, get angry at the excellent fast UI and usability. Only IDEA, only hardcore! :)