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

EchoServiceServerHandler

public class EchoServiceServerHandler extends Object implements Handler

Fields Summary
Constructors Summary
Methods Summary
public voiddestroy()

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

	return null;
    
public booleanhandleFault(MessageContext messageContext)

	return true;
    
public booleanhandleRequest(MessageContext messageContext)


	try {
	    SOAPMessageContext soapMsgCtx = (SOAPMessageContext) messageContext;
	    
	    SOAPMessage soapMsg = soapMsgCtx.getMessage();
	    SOAPPart soapPart = soapMsg.getSOAPPart();
	    SOAPEnvelope soapEnvelope = soapPart.getEnvelope();
	    soapEnvelope.getBody().detachNode();
	    SOAPBody soapBody = soapEnvelope.addBody();
	    SOAPBodyElement echoElement = soapBody.addBodyElement(soapEnvelope.createName("echo", "ns1", "http://soapinterop.org/"));
	    SOAPElement argElement = echoElement.addChildElement("arg0");
	    argElement = argElement.addAttribute(soapEnvelope.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance"), "xsd:string");
	    argElement.addTextNode("my echo string");
	    
	} catch (Exception e) {
	    e.printStackTrace();
	}
	
	return true;
    
public booleanhandleResponse(MessageContext messageContext)

	return true;
    
public voidinit(HandlerInfo arg0)