views:

1413

answers:

1

I do a mobile application which the user can use it get the required place’s number. The user must select the appropriate city and category to get the place’s information. All the information stored in the database.

What I want to know that ..

1) What is the benefit from the web service?

2) How to connect the web service and MySQl database?

3) How to connect the web service and mobile application to get the information from the database?

+2  A: 

1) Benefits. You didn't mentioned other options, but if you are talking about some custom server-side implementation, the benefits are numerous:

  1. It's easy to connect to web service from J2ME.
  2. Multiple connection sessions at one time.
  3. You can use web service from different applications and different technologies.
  4. No issues with authentication and authorization.
  5. You just call method from ws and in response you get easy-to-parse XML.

2) Web service - MySQL:

  1. You have to create a Tomcat or IIS web service.
  2. From web service code connect to MySQL, call a query and return the result.

For Tomcat and Java web service:

Getting started with Web Services Using Apache Axis Developing and Deploying Java Web Services with MySQL on Apache Tomcat and Axis on Windows JDBC for MySQL

For IIS and C#/.NET web service: CodeProject:Your first C# Web Service by Chris Maunder How to connect to MySQL 5.0. via C# .NET and the MySQL Connector/Net


3) J2ME - web service (with JAX-RPC) 1. generate stub from web service WDDL using J2ME Wireless Toolkit 2. add stub to your project, import stub namespace, set connection properties and call stub methods How to build and run a J2ME Web service application? Web Services APIs for J2ME, Part 1: Remote service invocation API

Max Gontar
Thanks for help ..your answer is very useful ...
3yoon af
Your'e welcome!
Max Gontar