I am trying to create a sample test application which converts an object to JaxbRepresentation. But when I try to run this, it gives me an error.
Main.java file
If you have an instantiation of your object factory like
private ObjectFactory of;
..then the safest, most reliable way to get a Context to Marshall with is:
JAXBElement gl = of.createGreetings( grList ); JAXBContext jc = JAXBContext.newInstance(of.getClass()); Marshaller m = jc.createMarshaller();