Hi Marc, you have to use a JAXB context and marshaller. As the classes do not contain a @XmlRoot annotation you will also have to wrap them in a JAXBElement. The following article may help. In your case you do not need the "if" as you know you will need the JAXBElement.
http://stackoverflow.com/questions/4146540/how-to-marshal-an-object-via-jaxb-without-any-information-about-it Christian -----Ursprüngliche Nachricht----- Von: Marc Dumontier [mailto:[email protected]] Gesendet: Freitag, 18. Februar 2011 07:08 An: [email protected] Betreff: How to manually serialize the objects generated from wsdl2java Hi I've got a WS client using cxf 2.1.3, which works fine. One of my requirements to to manually submit the XML(without the SOAP envelope) so I was wondering how I can serialize my object (class created by wsdl2java). Someone pointing me in the right direction would be great. here's a snippet from the class @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "transmissionHeader", "submissionContent" }) @XmlRootElement(name = "IARSubmission") public class IARSubmission { @XmlElement(name = "TransmissionHeader", namespace = " http://iar.on.ca/types", required = true) protected TransmissionHeaderType transmissionHeader; @XmlElement(name = "SubmissionContent", namespace = " http://iar.on.ca/types", required = true) protected SubmissionContent submissionContent; @XmlAttribute(name = "version", required = true) protected String version; -- Marc Dumontier
