How does the JAXB framework realize access to private fields? I've tried the following example works just fine in both directions: marshaling and unmarshaling. ---TuBean.java im****t java.io.StringReader; im****t java.io.StringWriter; im****t javax.xml.bind.JAXBContext; im****t javax.xml.bind.Marshaller; im****t javax.xml.bind.Unmarshaller; im****t javax.xml.bind.annotation.XmlElement; im****t javax.xml.bind.annotation.XmlRootElement; @[EMAIL PROTECTED] (name="DOC") public class TuBean { @[EMAIL PROTECTED] (name="FOO") private String foo; @[EMAIL PROTECTED] (name="BAR") private String bar; @[EMAIL PROTECTED] (name="BAZ") private String baz; @[EMAIL PROTECTED] (name="TAZ") private String taz; public static void main(String[] args) throws Exception { TuBean data = new TuBean(); data.foo = "123"; data.bar = "xyz"; data.taz = "***"; JAXBContext bindContext = JAXBContext.newInstance(TuBean.class); Marshaller marshaller = bindContext.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); StringWriter buf = new StringWriter(); marshaller.marshal(data, buf); marshaller.marshal(data, System.out); System.out.println(); Unmarshaller unmarshaller = bindContext.createUnmarshaller(); data = (TuBean) unmarshaller .unmarshal(new StringReader(buf.toString())); System.out.println("foo=" + data.foo); System.out.println("bar=" + data.bar); System.out.println("baz=" + data.baz); System.out.println("taz=" + data.taz); } } ---TuBean.java-- -- Stanimir