Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
the usual extension for a file that contains an XML Schema definition; for instance, purchaseOrder.xsd. Java's SOAP API A major appeal of SOAP-based web services is that the SOAP usually remains hidden. Nonetheless, it may be useful to glance at Java's underlying support for generating and processing SOAP messages. Chapter 3, which introduces SOAP handlers, puts the SOAP API to practical use. This section provides a first look at the SOAP API through a simulation example. The application consists of one class, DemoSoap , but simulates sending a SOAP message as a request and receiving another as a response. Exam- ple 1-10 shows the full application. Example 1-10. A demonstration of Java's SOAP API package ch01.soap; import import import import import import import import import java.util.Date; java.util.Iterator; java.io.InputStream; java.io.ByteArrayOutputStream; java.io.ByteArrayInputStream; java.io.IOException; javax.xml.soap.MessageFactory; javax.xml.soap.SOAPMessage; javax.xml.soap.SOAPEnvelope;