Question

i am using ksoap2 for my application in android. i am sending complex types, but i have a question: right now i am doing :


UriList urlL = new UriList();
urlL.uriList= "#literal";

PropertyInfo pi = new PropertyInfo();
pi.setName("documents");
pi.setValue(urlL);
pi.setType(UriList.class);
sobj.addProperty(pi);

this gives me a soap request that will look like:

< documents>
< uriList>#literal< /uriList>
< /documents>

what if i want to have several repetition of < uriList> ? ie:
< documents>
< uriList>#literal< /uriList>
< uriList>#literal2< /uriList>
< uriList>#literal3< /uriList>
< /documents>

how can i do that in ksoap2?

thanks for the help :)

Was it helpful?

Solution 2

i fixed this by doing the paramter urlist -in the class that implements kvmserializable- as a list and it worked

OTHER TIPS

I used the envelope.addMapping() function when I had to do the same thing. Pretty much you create an object that implements KvmSerializable and holds all the data you want in the Parameter. It will take care of adding the items for you.

You can find more info about it on the following site: http://seesharpgears.blogspot.com/2010/10/ksoap-android-web-service-tutorial-with.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top