I use Java 6, JaxB 2, and SpringSource Tool Suite (same as Eclipse). I had several Java classes that I wrote, of which I used JaxB to create the XML schema. However, I notice that to use the JaxB feature to create an XML document from Java objects, I need an ObjectFactory.
final Marshaller marshaller = jaxbContext.createMarshaller();
final JAXBElement<WebLeads> webLeadsElement
= (new ObjectFactory()).createWebLeads(webLeadsJavaObj);
How can I generate an ObjectFactory without dropping the classes that I already have?
Thanks - Dave
source
share