Chapter 10. Working with remote services
This chapter covers
- Accessing and exposing RMI services
- Using Hessian and Burlap services
- Working with Spring’s HTTP invoker
- Using Spring with web services
Imagine for a moment that you’re stranded on a deserted island. This may sound like a dream come true. After all, who wouldn’t want to get some solitude on a beach, blissfully ignorant of the goings-on of the outside world?
But on a deserted island, it’s not pina coladas and sunbathing all the time. Even if you enjoy the peaceful seclusion, it won’t be long before you’ll get hungry, bored, and lonely. You can only live on coconuts and spear-caught fish for so long. You’ll eventually need food, fresh clothing, and other supplies. And if you don’t get in contact with another human soon, you may end up talking to a volleyball!
Many applications that you’ll develop are like island castaways. On the surface they might seem self-sufficient, but in reality, they probably collaborate with other systems, both within your organization and externally.
For example, consider a procurement system that needs to communicate with a vendor’s supply chain system. Maybe your company’s human resources system needs to integrate with the payroll system. Or the payroll system may need to communicate with an external system that prints and mails paychecks. No matter the circumstance, your application will need to communicate with other systems to access services remotely.