When working with SOAP, the first decision is whether you will use a SOAP library or roll up your sleeves and write your own SOAP handling. SOAP is a lightweight protocol, so it's relatively easy to write a SOAP node with JSP and servlets, or even with CGI, PHP, ASP, and other server-side scripting languages.
Although you are more likely to use SOAP libraries, it's interesting to review how to write a SOAP node in JSP. Listing 8.1 implements one of the easiest services: It accepts calls of the form String reverse(String st). It simply reverses the string given as the parameter, so Java becomes avaJ.
Listing 8.1 needs the org.apache.xpath package to use Xalan 2.0's proprietary XPath API. You have to install ...