O'Reilly logo

Java™ Web Services Unleashed by Mark Wutka, Joseph Weber, Arthur Ryman, K. Scott Morrison, Benoît Marchal, Matthias Kloppmann, Steven Haines, Darren Govoni, Francisco Curbera, Frank Cohen, Robert Brunner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required