Chapter 19. Using Struts with Web Services


IN THIS CHAPTER

  • Web Services Fit with Struts Model Components

  • A Quick Review of Web Service Technologies

  • A Struts/Web Service Sample Application

  • Conclusions

Web Services are more than just the latest cool technology on the block. They represent a real change. Web Services represent an opportunity to significantly reduce the effort required to get two systems to communicate.

Web Services accomplish this by encoding the data transferred in XML (extensible markup language). XML isn't dependent on any particular technology, so any programming language or platform can use it. This openness means that if a programming language can encode information and communicate using XML, it can participate in Web Services communications.

Although Web Services can be used for much more than just making two applications communicate, this is the most widely adopted Web Service application. In addition, it's the most likely application where Struts will be used with a Web Service.

Some material in this chapter is similar to the previous chapter on integrating EJBs with Struts. This is done deliberately, for two reasons:

  • Web Services are most likely to be used with Struts in a manner similar to the way EJBs are used with Struts. That is, the front end of the application is most likely built using Struts, whereas the Web Service is behind the scenes providing information and data for the Struts application to use.

  • This approach makes it easier to compare the differences between using EJBs with Struts and using Web Services with Struts. In turn , this makes it easier to see the strengths and weaknesses of each approach.

The chapter begins by discussing Web Services in general and then moves on to discuss the specifics of how Web Services can be used with Struts. Following that, a sample application is presented to illustrate the points made. We intend for the sample application to form the basis of an actual application that you could develop.

Note

All command files in this chapter are built and tested on Windows-based system. They can be easily adopted for Unix by converting them from Windows .cmd files into shell scripts written for the shell of your choice.

Struts (and Axis, and the other programs used in this chapter) should all work with little or no modification in a Unix environment.




Struts Kick Start
Struts Kick Start
ISBN: 0672324725
EAN: 2147483647
Year: 2002
Pages: 177

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net