XML mapping with @XmlAnyElement
===

I would like to achieve something like [this](http://jaxb.java.net/guide/Mapping_interfaces.html).

    <zoo>
        <lion> ... </lion>
        <dog> ... </dog>
    </zoo> 

I have this class here.

    public class MainGroup {
    	private List<Widget> widgets;
    	    	
    	@XmlAnyElement
    	public List<Widget> getWidgets() {
    		return widgets;
    	}
    	public void setWidgets(List<Widget> widgets) {
    		this.widgets = widgets;
    	}
    }

And this Widget superclass has got subclasses such as Button, Combobox...
I would like to achieve something like this.

    <MainGroup>
        <Button>...</Button>
        <Combo>...</Combo>
    </MainGroup>

I am having this exception 

    [com.sun.istack.internal.SAXException2: class com.test.Button nor any of its super class is known to this context.

I tried adding @XmlElementRef but it is still not working. 
	

    @XmlElementRefs({
    	 @XmlElementRef(name="Button", type=Button.class),
    	 @XmlElementRef(name="Combo", type=Combo.class)
    })