Menu

#14 Nested arrays

open
nobody
ksoap (16)
5
2005-05-03
2005-05-03
Anonymous
No

I try to connect with WS which returns nested array of
String's. This is the test method:

public String[][] getString() {
String[][] resp = new String[][] {
{"1", "test1"},
{"2", "test2"}
};
return resp;
}

I'm using Apache Axis on server side (everything seems
fine), and kSOAP 2.0.1 on client.

Invoking rpc.call(null, envelope) I catch following
exception:

[j2mepolish] Generic/midp2:
java.lang.NumberFormatException: ][2
[j2mepolish] Generic/midp2: at
java.lang.Integer.parseInt(+174)
[j2mepolish] Generic/midp2: at
java.lang.Integer.parseInt(+6)
[j2mepolish] Generic/midp2: at
org.ksoap2.serialization.SoapSerializationEnvelope.getIndex(+36)

I encounter with this problem only when my WS returns
nested array. If in other test WS returns simple array
of String's, kSOAP works correctly.

Discussion

  • Marcin Zduniak

    Marcin Zduniak - 2005-05-03

    Logged In: YES
    user_id=1091461

    Ups. Of course I'm accessible for further questions:

    Marcin Zduniak
    e-mail: mzduniak@j2me.pl

    Regards

     
  • James Seigel

    James Seigel - 2006-02-22

    Logged In: YES
    user_id=1282699

    Hello,

    It doesn't look like the code can handle two dimensional arrays at this time. I
    will add this to the documentation I am developing for the project.

    Please head over to http://ksoap2.sourceforge.net/ for more information and to
    stay in touch.

    Cheers
    James

     

Log in to post a comment.