[jboss-user] [JBossWS] - @Xmljavatypeadapter used on class failed

zwbrush do-not-reply at jboss.com
Mon Feb 4 04:08:39 EST 2008


I used @Xmljavatypeadapter on my class like below

@XmlJavaTypeAdapter(XMLStringAdapter.class)
public class XMLCollection  {
	public Integer content ;
	
	public XMLCollection() {
		super();
		
	} 

public class XMLStringAdapter extends XmlAdapter<String, XMLCollection> {

	@Override
	public String marshal(XMLCollection arg0) throws Exception {
		return "8888";
	}

	@Override
	public XMLCollection unmarshal(String arg0) throws Exception {
		return new XMLCollection();
	}

I found it not take effect.  but when I put @XmlJavaTypeAdapter on class  field it work, Annotation on class has not been implement?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126045#4126045

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126045



More information about the jboss-user mailing list