Writing SOAP Nodes
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.
Do-It-Yourself
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.
Caution
Listing 8.1 needs the org.apache.xpath package to use Xalan 2.0's proprietary XPath API. You have to install ...
Get Java™ Web Services Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.