You are on page 1of 9

WEB SERVICE APPLICATION

ON CAR LOAN CALCULATOR

Rahmad Kurniawan

Rasyiqah Rusdi

Siti Narimah Jamali

Yudha Putra

Universitas Islam Negeri Sultan


Syarif Kasim Riau, Indonesia;
Fakulti Teknologi & Sains
Maklumat,
Universiti Kebangsaan Malaysia,
43600 Bangi, Selangor, Malaysia;

Fakulti Teknologi
& Sains Maklumat,
Universiti
Kebangsaan
Malaysia,
43600 Bangi,
Selangor, Malaysia;

Fakulti Teknologi &


Sains Maklumat,
Universiti Kebangsaan
Malaysia,
43600 Bangi, Selangor,
Malaysia;

Fakulti Teknologi
& Sains
Maklumat,
Universiti
Kebangsaan
Malaysia,
43600 Bangi,
Selangor,
Malaysia;

A. Introduction of Web Service Application


Name:
Web Service Application On Car Loan Calculator.
Purpose
Nowadays, people are racing to achieve a comfortable standard of living. They work
hard to support their families and also to the satisfaction of his own life. It is not
surprising if we see many who can afford to buy houses and cars with full payment for
the common interest.
However not all are able to do so, those who have large families are more likely
to pay in monthly installments. For example for car loan payment. Therefore our group
has developed an application that will facilitate their affairs that cannot afford for the
full installment for the car itself. We developed an application called Car Loan
Calculator to reduce their problem.
The purpose of this application is to help people who want to purchase a car by
using monthly installments. With this application also, people will find out if they can
afford their dream car using this user friendly car loan calculator. by using this car loan
calculator, user just need to insert total amount of car, downpayment, interest rate and
loan period then the application will calculate to the user how much user need to pay
monthly within a certain period of time.

Potential User
User that use this application can be from all range of people that have interest to buy
a car. Below are some of potential users that might use this application;
-

Home User

Small Office/Home Office User

Mobile User

Businesses

Student

Lecturer

Government Agencies

Internet users

B. Client/ Server Architecture Design


Client/server architecture is a network architecture in which each computer or process
on the network is either a client or a server. Servers are powerful computers or
processes dedicated to managing disk drives (file servers), printers (print servers), or
network traffic (network servers). Clients are PCs or workstations on which users run
applications. Clients rely on servers for resources, such as files, devices, and even
processing power.
Another type of network architecture is know as a peer-to-peer architecture
because each node has equivalent responsibilities. Both client/server and peer-to-peer
architectures are widely used and each has unique advantages and disadvantages.
Client/server architectures are sometimes called two-tier architectures.
This

application

is

implements

the

three-tier

architecture.

Three-tier

architecture application responsibilities are divided into three logical categories or types
of main services that is presentation or user services, application services or business
rules and database services or data server.

Figure 1. Client Server Architecture Design of Import Car Loan Calculator Application
Followings are description of how this application work. Briefly, on client
usually prefer to the web browser. Its processes and displays HTML resources, issues
HTTP requests for resources, and processes HTTP responses.
Presentation layer is the topmost level of the application. On the presentation
layer are provides restful API for all resources/services including accessing and
modifying objects, logging into an account, anything else the API needs to "do" and so
on. It is also provides the component and runtime infrastructure that needed to
communicate the browser over the intranet as the request and the response occur. The
communication performs using a HTTP protocol and the response generally includes a
HTML document that is sent back to the browser.
On application tier (business logic, logic tier, data access tier, or middle tier) or
business rule are provides the implementation of business rules and data validation,
business logic, enforces permissions, and so on. Whereas Google App Engine (GAE) use
for build web applications using standard Java technologies and run them on Google's
scalable infrastructure. The Java environment provides a Java Servlets interface and
support for standard interfaces to the App Engine scalable datastore and services.
Standards support makes developing import car loan calculator application easy and
familiar, and also makes porting import car loan calculator application to and from our
servlet environment easy.
For the last is data server. Data server tier consists of database servers. Here
information is stored and retrieved. This tier keeps data neutral and independent from
application servers or business logic. Giving data its own tier also improves scalability
and performance. Data server provides and manages the underlying databases and
3

server logics such as Data access Data management Data security SQL parsing and so
on.

C. SOAP Web Service Functions


Web services are middleware that provide access to networked resources on the
Internet with the support of network mechanism and protocols like as HTTP and TCP.
Broadly, Web servers provide dynamically scalable services (responses) that are
available on request in the Internet. SOAP (Simple Object Access Protocol) is the
basic communication protocol of the majority Web services.

Figure 1. Web services of Stock Quote Application Scenario [1].


There are mainly two approaches for building and implementing Web services;
SOAP-based and RESTful Web services. Both approaches have their distinct
advantages and disadvantages to interfacing to Web services, but it is always up to the
developer to decide on which approach could be best depending on each particular
implementation scenario. SOAP is based on XML (eXtensible Markup Language) that
encodes the contents of sent/received Web messages over the Internet [1].
Simple Object Access Protocol (SOAP) can develop the foundation layer of Web
services protocol stack so providing a technique to communicate between applications
running on different operating systems with different technologies and programming
languages. This XML-based protocol consists of three parts: an envelope, which define
what to be included in the message and how this massage should be processed, a set of
encoding rules for expressing instances of application defined data types, and a
convention for representing procedure calls and responses [6]. Furthermore, SOAP has
4

three major characteristics: Extensibility (security and WS-routing are among the
extensions under development), Neutrality (SOAP can be used over any transport
protocol such as HTTP, SMTP or even TCP), and Independence (SOAP allows for any
programming model).

Figure 2. High-Level Diagram of SOAP In A Distributed System [2].

The following are a description of the figure above:


1. Station 1 executes a command which creates an action on the associated
application server.
2. This command generates a process within the application and the result arrives
in the application interface.
3. The message is translated into XML format by the implementation and is then
sent to the Web server.
4. The XML parser checks the coherence of the XML document and sends the
SOAP message via HTTP.
5. The XML parser checks the validity of the message using the HTTP and XML
headers, and accepts or rejects it.
6. The message is then routed to the relevant application server and translated by
the implementation so that the task is meaningful for the application. The
SOAP application which receives the SOAP message must proceed as follows to
translate the message:
a. Identify the parts of the SOAP message which correspond to the
application

b. Check that all the mandatory parts of are supported by the application
or discard the message
c. Remove all the parts before transferring he message if the application is
not the endpoint
7. The application then executes the task. A result is produced.
8. The return is done in the same way: implementation and then sending by
HTTP.
9. The result of the action may be different: display in a browser, actions, access to
a database, and so on.

Advantages of SOAP
The following are advantages of SOAP:
1. Portability: SOAP is a platform-independent and thus portable.
2. Firewall-friendliness: SOAP is capable of getting past firewalls which are totally
blocking for other protocols. This is possible due to using the HTTP protocol
[3].
3. Use of open standard: SOAP is based on the open Standard XML to format
data. As a consequence, SOAP becomes easily extendable and well supported.
4. Interoperability: SOAP relies on open instead of vendor-specific technologies and
thus enables distributed interoperability and loosely coupled applications [4].
5. Resilience to changes: It is unlikely that future modifications of SOAP
infrastructure will have any impact on applications using the method, as long as
no significant serialization changes are made to SOAP specification.

Disadvantages of SOAP
The following are disadvantages of SOAP:
1. Operation interface: Useful information such as operation details and data are
encapsulated within the services, just exposing only one endpoint of API and all
operations use the POST method.
2. Complexity: It is time-consuming to serialize and deserialize native languages
into SOAP messages. Furthermore, the WS-* protocol stack is also complex so
that only programmers can understand how to deploy a service.
6

3. Interoperability: Since a specific service interface is defined for each service, a


client must be bound to a specific WSDL. Once the WSDL has changed, the
client has to follow these changes.
4. Performance: Much information in the SOAP and WSDL is redundant and
meaningless. It increases the network communication volume and server-side
payload and it is difficult to support the proxy and cache servers because clients
cannot identify the useful information straightforwardly from the URI and
HTTP.[3]

Example of Function Call in Java


Function call in Java is the equivalent of a function in languages like C which helps in
code reusing. A set of statements make a method, and this method can be invoked
through other statement. When invoked (called) , all the statements that are a part of
the method would be executed. For instance, look at this method: "public static void
methodExample() {}". It currently has no code in it, but there are three keywords
before the method name. There is public, static, and void.
The word public before the method name means that the method itself can be
called from anywhere which includes other classes, even from different packages (files)
as long as import the class. There are three other words that can replace public. They
are protected and private. If a method is protected, then only this class and subclasses
(classes that use this as a basis to build off of) can call the method. If a method is
private, then the method can only be called inside the class. Only the classes in the

same package can call the method.


The second keyword, static means that the method belongs to the class and not
any instance of the class (object). Static methods must be called using the class name:
"ExampleClass.method Example()". However, if the keyword static was not there, then the
method can be invoked only through an object. For instance, if the class was called
ExampleObject and it had a constructor (for making objects), then we could make a

new object by typing Example Object obj = new Example Object();, and call the method
with "obj.methodExample();"
The last word before the method name is void. The word void means that when
the method doesn't return anything. If not want a method to return something, then
7

simply replace the word void with a data type (primitive or reference type) of the
object ( or primitive type) that wish to return. Then just add return plus an object of
that type somewhere toward the end of the method's code.

D. Implementation
- server side
- client side
- screen shot of application simulation

E. Summary
As a conclusion, the main function of Web Service Application on Car Loan Calculator
project is to do a calculation that mainly focuses on the monthly payment for the car
loan itself. The calculation covers the function of currency converter from US Dollar to
Ringgit Malaysia, and the monthly payments that can be generate from it. For this
application development, the communication tools selected is Simple Object Access
Protocol (SOAP) with Google Application Engine (GAE) as the server and the
application for development purposes is using Eclipse Juno 4.2.0. On the server side, it
will perform the sum calculation of two values input by users and the other function is
to perform the square root of the sum result which will then send the result to the
client side. On the client side it will send request and return the result to the end user.
This Car Loan Application can be used by many potential end users such as home
user, small office/home office user, mobile user, businesses, student, lecturer,
government agencies and also internet users. This web service application served the
purpose of providing the end users the exact calculation for the most affordable
monthly payment based on the cars total amount, the down payment, interest rate
and the loan period (in years) selected.

f. References
[1] Al-Shammary, Dhiah. (2012). Redundancy-aware SOAP messages compression
and aggregation for enhanced performance. Journal of Network and Computer
Applications.
[2] Nandrajog, Inder (2011).

Simplified Object Access Protocol.

CIS 679

Management of IS
[3] Albreshne, A., Fuhrer and Pasquier, J. (2009) Web Services Technologies: State
of the Art.
[4] SOAP, accessed June 2013 from http://en.wikipedia.org/wiki/SOAP.
http://www.wikihow.com/, accessed June 2013.

You might also like