Download Cheap N Fast Web Service

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Architectural theory wikipedia , lookup

Transcript
Cheap N Fast
Web Service
Sandeep Anantharaman
Mahim Lakhani
Introduction






Sending home a gift for Christmas?
Sending your resume to an employer?
You should be really tired of looking up various websites
to find the cheapest option.
That is why we have come up with this web service
called Cheap N Fast.
You can check the prices of services offered by all the
companies on a single website.
Sounds Exciting!! Lets explore it further…
A Deeper Look..





UPS, DHL and USPS
Instead of checking each website, compare all the prices
on a single website.
Get the best deal by choosing the fastest and cheapest
option to send your package.
Very advantageous to the people who use the internet to
check the prices of package delivery services and
request for a pick online.
First website to offer such a service.
Objectives






Provide data entry facility for inputs to the system.
Fetch the data based on weight and dimensions of the
package.
Allow the user to enter the source and destination of the
package.
Display the prices of services offered by the three
companies on the same page for the given source and
destination.
Provide a link to access the selected service directly
from the results page.
Display the contents of the webpage in a printable format
if required by the user.
Design Features



Process Enabled SOA has light weight frontends, which
generally should be the case while developing web applications.
A simple front end ensures that complexity at front end is
minimum, which should be the case for application specific
services.
A Process Enabled SOA hides business complexities, which is
going to be the case with the project since the business
complexities are present inside server and handled by the client
only by web services. Hence abstraction and encapsulation are
also supported to a large extent.
Lastly, since the project uses web services from different
organizations, using a Process Enabled SOA would ease out the
difficulties that might arise due to the integration of independent
services on one platform.
Architecture Diagram
Architecture Diagram

The various services provided by the application can be
shown in this way. Every process in a layer refers to
services in its immediate lower layer, hence doing proper
justice with the Process Enabled SOA.
Architectural Model
Architectural Model


The Architectural model shows the highest level view of
the flow of data.
It also shows the interaction with the databases.
SOA Architecture
SOA Architecture

Figure
shows
the
SOA
PackageDeliveryService

The service runs inside the Java EE 5 container as shown
in the above diagram. It serves two clients, the web
browser and WSDL/SOAP based consumer
The WSDL/SOAP based consumer is some application
that interprets the WSDL and communicates using SOAP
The PackageDelivery provides SOAP and WSDL web
services to handle these consumers and at the same time
the PackageDelivery also consumes the web services


architecture
of
the
Technology Used





The entire application is developed using Web Services.
The programming language used is JAVA.
The J2EE Application Server 9 has been used.
The IDE used for the development of the application is
NetBeans.
WSDLs have been taken from an online resource.
Why this Technology?



Java was chosen as the language to develop the
application because of its effective class features which
makes the implementation effective.
Another prime reason for choosing Java is that both the
developers are very familiar to this language compared
to the other languages.
NetBeans was the IDE used to implement the code
because of its effective integration of the build tools
required and the easy availability of resources to get
familiar with the environment.
Implementation Details



The project is going to one client known as the project
client which would have the implementation of all the
web services calls.
The client contains the WSDL of all the services in
different packages.
After all the service WSDLs are added the client is
going to compile and generate the class files in the
directory build/WEB-INF/classes/ (package structure).
Details Contd…



The services are tested individually for each of the
companies. As in DHL, UPS and USPS are tested
individually.
A JSP for each service is used to test the functionality
and working of the service.
The front end of the application is a java servlet known
as ProjectServlet.java. This java servlet would call all the
methods that are needed to be called thru the web
service in the client application.
Error Handling


Error code obtained from the web service shown in case
of invalid data.
Separate errors shown for all the three web services.
Integration
DHL
Web
Service
Project Servlet
FedEx
Web
Service
DHL
Web
Service
UPS
Web
Service
Result JSP
Integration Details




A few web pages are designed to serve as the front
end of the application.
The first page contains the input fields with which the
user would like to query the service for desired results.
The fields will be the source, destination and weight of
the package that the user would like to send.
Another JSP page will be used to display the results of
the query. This will enable the user to compare the
prices offered by various services for providing the
same service.
Details Contd…


The client calls the methods for UPS, USPS and DHL
for comparing the prices of shipment based on size,
weight, source and destination addresses.
The client would then give the comparison of all the
prices to the user. This comparison would be shown on
the results JSP page.
Problems Encountered



javax.xml.ws.soap.SOAPFaultException: BEA-382505:
ALSB Validate action failed validation.
java.lang.reflect.InvocationTargetException
Invalid SSL Handshake Error.
Project Demo

Let us watch the project demo now.
References







www.fedex.com
www.ups.com
www.usps.com
www.dhl.com
SOA using JAVA Web Services by Mark D. Hansen
Enterprise SOA : Service Oriented Architecture Best
Practices by Krafzig, Banke and Slama.
http://www.ecocoma.com/shipping_webservice.aspx
References

Special thanks to Dr. Bina Ramamurthy for
her guidance during the entire course of the
project.