FileDocCategorySizeDatePackage
EchoServiceServerHandler3.javaAPI DocApache Axis 1.41373Sat Apr 22 18:57:28 BST 2006test.wsdl.jaxrpchandler2

EchoServiceServerHandler3

public class EchoServiceServerHandler3 extends Object implements javax.xml.rpc.handler.Handler

Fields Summary
private javax.xml.rpc.handler.HandlerInfo
info
Constructors Summary
Methods Summary
public voiddestroy()

    
public javax.xml.namespace.QName[]getHeaders()

        return info.getHeaders();
    
public booleanhandleFault(javax.xml.rpc.handler.MessageContext mc)

        return true;
    
public booleanhandleRequest(javax.xml.rpc.handler.MessageContext mc)

        try {
            SOAPMessage msg = ((SOAPMessageContext) mc).getMessage();
            Node child = msg.getSOAPPart().getEnvelope().getBody()
                    .getFirstChild()
                    .getFirstChild()
                    .getFirstChild();
            String name = child.getNodeValue();
            if (name != null && name.equals("Joe")) {
                child.setNodeValue("Sam");
            }
            return true;
        } catch (Exception ex) {
            ex.printStackTrace();
            return false;
        }
    
public booleanhandleResponse(javax.xml.rpc.handler.MessageContext mc)

        return true;
    
public voidinit(javax.xml.rpc.handler.HandlerInfo handlerInfo)

        info = handlerInfo;