How to consume a webservice returning dataset (dot net) in android?

How to consume a webservice returning dataset (dot net) in android?

I don't know the scope of this forums!!!
But, can we put the questions regarding the developement?
If yes, I have one question here:

We can consume a webservice returning a scalar value,But
how we can consume a webservice returning a dataset (created in vb.net) from an android activity?

any kind of help is most appreciated.

14 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Which data format have your webservice?If you able to control both sides(vb.net and Android) I would suggest using JSON, because it's supported by the official API:http://developer.android.com/reference/org/json/JSONObject.htmlAlex

Thanks a lot for the reply,webservice is returning a dataset with multiple data tables having multiple rows and columns in each table.so it is difficult to fit in name value pairs.

JSON is not only a key:value store. You can put in hierarchical
datain like:

{ "table1"  :
     {
         "row1": 
          { "col1": "a string", "col_number": 25}, 
         "row2": 
          { "col1": "another string", "col_number": 55} 
     }
"table2"  :
     {
         "row1": 
          { "col_different_from_table1": "a string"}, 
         "row2": 
          { "col_different_from_table1": "another string"} 
     }
}

Many webservices like from Twitter and Facebook are using JSON.
Alex

vsichko tova e mnogo interesno i si zaslujava da se pomisli nad nego :)

[url=http://xn--80afdd9c.com]Gerda[/url]

Hi friend,I didn't catch you, which is this language?

Hi Alex, Thanks a lot again for the response.But I am new to use android and JSON. I have done only a couple of applications in android and never used json before. All i have worked before is in VB.Net and Sql Server.I will be very thank full to you if you can share a step by step walk through or a part of code thatis declaring and using the webservice (from dot net ) returning dataset in android.Thanks a lot in advance.

Hi,I never wrote code in VB.net so I could not give you a full example. But this post on Stackoverflow sounds very reasonable for me. All you have to do additionally in VB.net is to return the JsonString on a Web request.On the Android side there is a good example how to do connect to a web service and convert the JSON on this page:http://www.vogella.de/articles/AndroidJSON/article.htmlHope this helps a bit more.Alex

Hi, This will be fine while returning a single value from dotnet webservice, more over you can return an array too. But our main issue is how to deal with the dataset returned from the dotnet webservice.Is there any code sample for the consuming dotnet webservices returning dataset?if you have any code sample , please share with us, that can definitely help many of us.

you can see the following exampleCreate CXF Client

The system repair function will windows 7 keys remove any updates you have previously installed that are not included on the CD. Any windows Drivers will also be reverted to their original XP versions, as well as some settings (network & performance settings may sometimes be reset to their defaults). It may be necessary to reactivate your Windows XP as well. When finished, you will microsoft office 2007 keys have to download all of the updates from Microsoft Windows Update, because they are all replaced during repair.

www.keyyeah.com

The system repair function will windows 7 keys remove any updates you have previously installed that are not included on the CD. Any windows Drivers will also be reverted to their original XP versions, as well as some settings (network & performance settings may sometimes be reset to their defaults). It may be necessary to reactivate your Windows XP as well. When finished, you will microsoft office 2007 keys have to download all of the updates from Microsoft Windows Update, because they are all replaced during repair.

www.keyyeah.com

Login to leave a comment.