2

I want to create a web service (SOAP) under Apache Tomcat with Axis2, and I must respect the three-tiered architecture:

DAO -> Business Logic Layer -> Presentation Layer

I'm new to web services. Is there a step-by-step tutorial for this?

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
wael
  • 159
  • 1
  • 2
  • 9

2 Answers2

1

There isn't really a presentation layer in a web service, unless you consider the service itself to be the presentation layer.

http://www.roseindia.net/webservices/axis2/

There is tons of DAO information on the web, and there's nothing special about a DAO layer for a service versus any other application. A lot of this will depend upon how you want to build your DAO layer. I like using Spring JDBC.

squawknull
  • 5,131
  • 2
  • 17
  • 27
0

Three tiered architecture means different things to different people.

One common interpretation is (with tiers from the user starting with #1):

  1. Presentation layer running in the browser. I.e. Javascript (possibly from some framework such as jQuery, GWT, etc).
  2. Business Logic layer running on the server. I.e. A dynamic web server (Tomcat in this case)
  3. Database such as MySQL, SqlServer, Oracle, PostgreSql, etc.

It's also possible to have a layer #2.5 doing the DAO work for you (or a custom DAO) such as Hibernate.

Another interpretation is that #1 is actually the web server, and #2 is a separate business logic server, where #1 and #2 live in separate server instances (likely on separate machines or VMs) for security, isolation, and the ability to scale and release separately (and many other motivations).

In any case, you should read up on typical Java serving architectures and possibly describe your goals better. I.e. you use "Presentation Layer" which in some definitions doesn't make sense for a non-UI based web service. Of course, Axis2 could be your "presentation layer" for a web service as well :)

Noah
  • 376
  • 2
  • 3