分享
 
 
 

Study on Applying Web Services in Mobile E-business

王朝java/jsp·作者佚名  2006-01-31
窄屏简体版  字體: |||超大  

1. Introduction

In today's e-business world, the use of mobile technologies is steadily on the increase. The next generation e-business will be mobile e-business.

Meanwhile, the current trend in the application space is moving away from tightly coupled monolithic systems and towards systems which are loosely coupled, dynamically bound components. Web service is the next stage of the evolution for e-business. The web service architecture provides several benefits such as promoting interoperability, enabling just-in-time integration, reducing complexity by encapsulation and enabling interoperability of legal applications.

Web service has evolved to its maturity period. With the potential market in mobile e-business growing rapidly, the demand for access to digital information using web services from mobile devices emerges.

J2ME is targeted to devices with limited horsepower and is supported by 90% of new

devices released to the market. J2ME has a runtime environment that provides a secure, portable platform and a very large developer community. Soft companies have done much to provide J2ME devices the ability of accessing web services and several products had been published (such as kSOAP).

However, these developers’ packs are not standard APIs on J2ME. Developers who want to use web services on J2ME platform have to embed these packs in each application an especially expensive proposition in resource-constrained devices like mobile telephones and personal digital assistants.

Fortunately, JCP(Java Community Process) has released WSA1.0(JSR172) just recently. The goal of WSA is to integrate fundamental support for web services invocation and XML parsing into the device's runtime environment, so developers don't have to embed such functionality in each application.

The “Bid-joy” mobile auction system, a typical case of mobile e-business, is built with web services in a standard way. It applies the newly released WSA1.0 API to achieve accessing web services on mobile devices. It’s ready to be put to market and just waiting for devices that support the WSA API.

2. Requirements Analysis and Summary Design of ‘Bid-joy’ System

2.1 Technology Scheme

This system is developed by using Java language, so the operating system which runs on different servers and clients is not restricted. For example, the database server and the application server can run on Linux or Windows operating system.

This system adopts IBM Universal Database as the database server and WebSphere Application Server as the application server. The mobile client is developed by using J2ME technology and the administrator manages the system through the browser.

2.2 The Structure of ‘Bid-joy’ System

(1) Register and mange the user: allow the new user to register and update some parts of the user’s information.

(2) Manage and book the goods: import goods records into the database and specify how to bid.

(3) The biding module: manage the goods according to the established biding strategy.

(4) Report the biding event: deal with the query submitted by the client and remind the client about the biding activity automatically.

2.3 Function Design

The functions in the client include:

(1)

Browse the goods by classification

(2) Search the goods

(3) Bid for the goods

(4) Sell the goods

(5) Register

2.4 Database Design

This system contains four tables:

(1) User table: record the user’s information

(2) Article table: record the detail information of the goods

(3) Classtree table: classify the goods and store the goods by tree

(4) Bid table: record the price that has been paid by the bider

3. The Design and Implement of ‘Bid-joy’ System

3.1 Accessing Database

This system uses JDBC 3.0 to access DB2 database. First you have to deploy the JDBC data source. Second you have to acquire the object of database, the code is described as follows:

javax.naming.Context ctx = new javax.naming.InitialContext();

javax.sql.DataSource ds =(javax.sql.DataSource)ctx.lookup(

“java:comp/env/jdbc/m-auction”);

And you can use the sentence ‘java.sql.Connection con = ds.getConnection();’ to get the connective object. After that, you can submit the SQL query. Finally you have to call the ‘con.close()’ method to close the connection.

This system uses DAO(Data Access Object) mode to access the database, every DAO class is in the package called ‘cn.edu.scu.mauction.dao’.

3.2 Developing and Publishing Web Services

This system adapts WAS to publish web services and I develop the classes which provide web services and then use WAS to publish web services.

The classes implementing web services are encapsulated in the package called ‘cn.edu.scu.mauction.ws’ and every class provides a ‘public’ method. These classes include ‘User’, ‘Article’, ‘ClassTree’, ‘Bid’ and ‘MyX’ that provide different access entries.

3.3 Calling Web Services by J2ME client

I choose ‘JSR 172’ standard to connect to the server to access web services. WTK2.1 gives better support to JSR 172 and the ‘stub generator’ in it can generate a proxy class accessing the web service basing on a WSDL file. When the proxy class has been generated, you can use it to access the web service. For example, if you want to create a proxy object according to ‘User’ web service that has been published, you can use the following sentence:

User_PortType user = new User_PortType_Stub();

3.4 Development of the J2ME Client

The whole client is a MIDlet suit and the related class is put into the ‘cn.edu.scucdut.mauction.j2meclient’ package. MainMIDlet is the MIDlet class in the suit and MainForm is the main interface.

When programming the client, I meet many difficulties, for example, ‘back the interface ’, ‘deal with the pause when one thread has been terminated’, ‘define the message code’. Besides these, I have to consider some special instances. I have to reduce the delay of the network because the client is embed in the mobile telephone and the band of the network is limited. Because there are many clients connecting to my system at the same time and I have to check the database and update the records, if I find the good which is overtime and has not been sold out, I have to deal with it. In order to solve this problem, I design a thread for every task and these tasks can work at the same time without conflicting with each other.

3.5 Implement of Administering Functions

I develop JSP page for the administer to administer the system. Considering about the security problems, I have written an article about this system and it has been published in the corn magazine of China

. In this paper I investigate the structure and the speciality of the SOAP message. Based on the implements of the secure ‘Bid-joy’ system, I analyses the security requirements of this system, introduces the special encryption and sign techniques in this system, these techniques contain the encryption, decryption and the self-sign certificate model of SOAP message in server, the making of secret key and the implement of the encryption engine and the sign engine in client.

4. Conclusion

This system has been successfully transplanted to mobile telephone which supports WSA, but it needs more improvements. You can consider implementing more complex bid logic and make it more individuation.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有