ccot
ccot

Reputation: 1873

ksoap2 property info that has multiple parameter values?

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 :)

Upvotes: 0

Views: 4095

Answers (2)

ccot
ccot

Reputation: 1873

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

Upvotes: 1

John Neville
John Neville

Reputation: 424

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

Upvotes: 0

Related Questions