FileDocCategorySizeDatePackage
EchoServlet.javaAPI DocExample1015Thu Jul 18 10:28:20 BST 2002ora.jwsnut.chapter3.echoservice

EchoServlet

public class EchoServlet extends ora.jwsnut.saaj.SAAJServlet
A servlet that recieves a SOAP messages and returns it to its sender.

Fields Summary
private ByteArrayOutputStream
os
Output stream used to save a SOAP message for logging.
Constructors Summary
Methods Summary
public javax.xml.soap.SOAPMessageonMessage(javax.xml.soap.SOAPMessage message)
Handles a received SOAP message by simply returning it.

    
                  
        
        
        // Convert the message to string representation
        // and log it.
        try {
            message.writeTo(os);
            log("Received SOAP message:\n" + os.toString());
            os.reset();
        } catch (Exception ex) {
            log("Exception", ex);
        }
        
        // Return the received message to the caller.
        return message;