开发者

How have to be a Webservice for use it with Android?? (limitations, paramters, return... etc)

i have a android APP that needs a remote Database, to do INSERT's and SELECT's.

I will use a webservice to comunicate with the remote database, the webservice will be installed in the server side, with the remote database, and webservice will do the SELECTS and the INSERTS and will return me XML data. But i dont know anything about webservices, then a friend will do it.

But my friend need's to known if there is any limitations making webservices for Android. I search on google for days but all i am finding is very complex and i can't find the answer to these three questions:

  1. Webservice needs to be created with a special way?

  2. Webservice remote functions can have parameters? (i need t开发者_开发技巧o give to the webservice parameters to do the select's or the inserts of data)

  3. Webservice can return results in XML normally or needs a special way to do it?

Also, if i have to know something more, please tell me

thanks


Regarding HTTP networking Android can basically do what plain Java can do. There are a few limitations:

  1. XML parsing/generating is pain. AFAIK, there is no automatic XML-object mapping library (JAXB) for Android. For this reason it's best to go with REST/JSON. Jackson does ok on Android.

  2. Yes they can.

  3. Any XML is ok, but look at 1.

My suggestion: go with Restlet - they have clients for all Java platforms (servlet, android, gwt, j2se).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜