将Web服务器与数据库和J2ME连接 [英] Connect web server with database and J2ME

查看:113
本文介绍了将Web服务器与数据库和J2ME连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个移动应用程序,用户可以使用该应用程序获取所需的地方号码.用户必须选择适当的城市和类别才能获取该地点的信息.所有信息都存储在数据库中.

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.

我想知道的..

1)Web服务有什么好处?

1) What is the benefit from the web service?

2)如何连接Web服务和MySQl数据库?

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

3)如何连接Web服务和移动应用程序以从数据库中获取信息?

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

推荐答案

1)好处.您没有提到其他选项,但是如果您在谈论一些自定义服务器端实现,则好处很多:

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

  1. 从J2ME连接到Web服务很容易.
  2. 一次连接多个会话.
  3. 您可以使用来自不同应用程序和不同技术的Web服务.
  4. 身份验证和授权没有问题.
  5. 您只需从ws调用方法,作为响应,您将获得易于解析的XML.


2)Web服务-MySQL:


2) Web service - MySQL:

  1. 您必须创建Tomcat或IIS Web服务.
  2. 通过Web服务代码连接到MySQL,调用查询并返回结果.

对于Tomcat和Java Web服务:

For Tomcat and Java web service:

使用Apache Axis开始使用Web服务 在Apache Tomcat和Windows上的Axis上使用MySQL开发和部署Java Web Services 用于MySQL的JDBC

对于IIS和C#/.NET Web服务: CodeProject:Chris Maunder的第一个C#Web服务 如何连接到MySQL 5.0.通过C#.NET和MySQL Connector/Net

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服务(带有JAX-RPC) 1.使用J2ME Wireless Toolkit从Web服务WDDL生成存根 2.将存根添加到项目中,导入存根名称空间,设置连接属性并调用存根方法 如何构建和运行J2ME Web服务申请吗? 用于J2ME的Web服务API,第1部分:远程服务调用API

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

这篇关于将Web服务器与数据库和J2ME连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆