FileDocCategorySizeDatePackage
EchoHandler.javaAPI DocApache Axis 1.47221Sat Apr 22 18:57:28 BST 2006org.apache.axis.handlers

EchoHandler

public class EchoHandler extends BasicHandler
author
Doug Davis (dug@us.ibm.com)

Fields Summary
protected static Log
log
public String
wsdlStart1
public String
wsdlStart
String
wsdlEnd
Constructors Summary
Methods Summary
public voidgenerateWSDL(org.apache.axis.MessageContext msgContext)



          
        try {
            String url = msgContext.getStrProp(MessageContext.TRANS_URL);
            String wsdlString = wsdlStart + url + wsdlEnd;
            Document doc = XMLUtils.newDocument(new ByteArrayInputStream(wsdlString.getBytes("UTF-8")));
            msgContext.setProperty("WSDL", doc);
        } catch (Exception e) {
            throw AxisFault.makeFault(e);
        }
    
public voidinvoke(org.apache.axis.MessageContext msgContext)


          
        log.debug("Enter: EchoHandler::invoke");
        try {
            Message  msg = msgContext.getRequestMessage();
            SOAPEnvelope env = (SOAPEnvelope) msg.getSOAPEnvelope();
            msgContext.setResponseMessage( new Message( env ) );
        }
        catch( Exception e ) {
            log.error( Messages.getMessage("exception00"), e );
            throw AxisFault.makeFault(e);
        }
        log.debug("Exit: EchoHandler::invoke");