Web service Design approaches

Design approaches in Web service

There are 2 approaches to implement a web service

1. Top down approach

2. Bottom Up approach

Top down approach

TopDown Approach

This approach is also called as contract first approach

In this approach, we first define the service contract which is WSDL so it’s called as Contract first approach.

As the WSDL contains all the information about the service like service definition,message format,transport protocol,security details,using this WSDL
service code is generated which we call as skeleton,Then service code is filled up as per the need.

So in simple words, we could say that Top down approach is WSDL first, service later.

Bottom Up approach

BottomUp Approach

This approach is exactly reverse of the Top down approach.

In this approach WSDL is generated at last ,So this bottom up approach is also called as contract last approach.

First, service code is written,then using the service code,WSDL is generated.

Many tools are available to generate the WSDL file automatically based on the service code.

So in simple words, we could say that Bottom Up approach is WSDL last, service first.

Hints to remember which one is Top down and Bottom up without confusion

Always concentrate on when WSDL is developed.

If WSDL is developed first then it means WSDL is on top, so it is Top down approach

If WSDL is developed last, it means WSDL appears to be in the bottom, so it is called Bottom up approach.

About the Author

Founder of javainsimpleway.com
I love Java and open source technologies and very much passionate about software development.
I like to share my knowledge with others especially on technology 🙂
I have given all the examples as simple as possible to understand for the beginners.
All the code posted on my blog is developed,compiled and tested in my development environment.
If you find any mistakes or bugs, Please drop an email to kb.knowledge.sharing@gmail.com

Connect with me on Facebook for more updates

Share this article on