/*
 * XmlResponseAction.java
 *
 * Created on 2007/11/15, 9:29
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package test.org.itscool.weber.action;

import org.itscool.commons.document.BeanToXmlDocument;
import org.itscool.weber.action.Action;
import org.itscool.weber.action.ActionBucket;
import org.itscool.weber.controller.Globals;

/**
 *
 * @author ios
 */
public class XmlResponseAction extends Action {
    public String doExecute(ActionBucket bucket) throws Exception{
        XmlBody body = new XmlBody();
        body.setId(1);
        BeanToXmlDocument beanToXml = new BeanToXmlDocument("result");
        beanToXml.addElement(body, "bean");
        bucket.printXml(beanToXml);
        
        
        return Globals.RET_NOFORWARD;
    }
    
}
