users@jaxb.java.net

new bee jaxb

From: fachhoch <fachhoch_at_gmail.com>
Date: Fri, 5 Mar 2010 19:09:34 -0800 (PST)

I am trying to run this simple class to marshall

here is the code


public class WSClient {
        
        public static void main(String[] args) throws Exception {
                        
                JAXBContext jaxbContext=JAXBContext.newInstance(GrantsDTO.class);
                Marshaller marshaller= jaxbContext.createMarshaller();
                GrantsDTO grantsDTO= new GrantsDTO();
                grantsDTO.setGranteeName("grantee_name");
                grantsDTO.setGrantNumber("grantNumber");
                marshaller.marshal(grantsDTO, new File("c:\\test.xml"));
                
        }

        
        
}

here my grantsDTO

package gov.hhs.acf.util.ws.grants.model;

import javax.xml.bind.annotation.XmlRootElement;


@XmlRootElement
public class GrantsDTO {
        
        private String grantNumber;
        
        private String granteeName;
        
        public String getGrantNumber() {
                return grantNumber;
        }

        public void setGrantNumber(String grantNumber) {
                this.grantNumber = grantNumber;
        }

        public String getGranteeName() {
                return granteeName;
        }

        public void setGranteeName(String granteeName) {
                this.granteeName = granteeName;
        }
        
        
        
}
I end up with this exception please tell what is this error and how to
resolve this ?


-- 
View this message in context: http://old.nabble.com/new-bee-jaxb-tp27801706p27801706.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.