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.