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

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

Bild des Benutzers Navnath Lanke

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 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Bild des Benutzers Alexander Weggerle (Intel)

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.html Alex

Bild des Benutzers Navnath Lanke

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.

Bild des Benutzers Alexander Weggerle (Intel)

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
Bild des Benutzers key_key

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

[url=http://xn--80afdd9c.com]Gerda[/url]
Bild des Benutzers Navnath Lanke

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

Bild des Benutzers Admin

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 that is declaring and using the webservice (from dot net ) returning dataset in android. Thanks a lot in advance.

test signature support on forums
Bild des Benutzers Alexander Weggerle (Intel)

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.html Hope this helps a bit more. Alex

Bild des Benutzers Navnath Lanke

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.

Bild des Benutzers imby
you can see the following example

Create CXF Client

Bild des Benutzers tomorrowwillbefine

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

Bild des Benutzers tomorrowwillbefine

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

Bild des Benutzers Mohamed helmi b.
Bild des Benutzers Ahmed Kchaou

Melden Sie sich an, um einen Kommentar zu hinterlassen.