FileDocCategorySizeDatePackage
MessageService.javaAPI DocApache Axis 1.41723Sat Apr 22 18:56:52 BST 2006samples.message

MessageService

public class MessageService extends Object
Simple message-style service sample.

Fields Summary
Constructors Summary
Methods Summary
public org.w3c.dom.Element[]echoElements(org.w3c.dom.Element[] elems)
Service method, which simply echoes back any XML it receives.

param
elems an array of DOM Elements, one for each SOAP body element
return
an array of DOM Elements to be sent in the response body

        return elems;
    
public voidprocess(javax.xml.soap.SOAPEnvelope req, javax.xml.soap.SOAPEnvelope resp)

    	SOAPBody body = resp.getBody();
    	Name ns0 =  resp.createName("TestNS0", "ns0", "http://example.com");
    	Name ns1 =  resp.createName("TestNS1", "ns1", "http://example.com");
    	SOAPElement bodyElmnt = body.addBodyElement(ns0);
    	SOAPElement el = bodyElmnt.addChildElement(ns1);
    	el.addTextNode("TEST RESPONSE");