Hi all, I'm having problems to marshal objects of xjc generated java classes to xml output. In detail I am facing problems to use a list of sources (List) that's been generated. The schema I am using is: =========================================== ... ... =========================================== By using xjc the java classes are generated without problems. The expectedContentTypes="text/xml" results the generation of a List parameter for the class. =========================================== ...public class TTestAttachment { @XmlMimeType("text/xml") protected List textXML; ... =========================================== Now I want to test the generated classes and marshal an object I created by the following code =========================================== ... StreamSource ssrc = new StreamSource("file:D:/temp/test.xml"); attachment.getTextXML().add(ssrc); attachment.getTextXML().add(ssrc); ObjectFactory objFactory = new ObjectFactory(); JAXBContext jc = JAXBContext.newInstance(TTestAttachment.class); Marshaller marshaller = jc.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,Boolean.TRUE); JAXBElement jaxbelem = objFactory.createTestAttachment(attachment); marshaller.marshal(jaxbelem, new PrintWriter(System.out)); ... =========================================== But as return I just receive an error message, that StreamSource is not known to the context: =========================================== javax.xml.bind.MarshalException - with linked exception: [javax.xml.bind.JAXBException: class javax.xml.transform.stream.StreamSource nor any of its super class is known to this context.]... =========================================== So now I made it known to the JAXBContext by adding it as parameter: =========================================== JAXBContext jc = JAXBContext.newInstance(TTestAttachment.class); =========================================== With the result, that I get an output but not as expected with content of the source inline but with the link to it. =========================================== <!--?xml version="1.0" encoding="UTF-8" standalone="yes"?--> file:D:/temp/test.xml file:D:/temp/test.xml =========================================== A second idea was to leave the JAXBContext as is and add the annotation @XmlList to the attribute of the generated java class. But that also does not lead to the expected result. It included the content of the source now but whitespace seperated and not as single objects. The expected result should look some like this: =========================================== <!--?xml version="1.0" encoding="UTF-8" standalone="yes"?--> PD94...sbzwvbWVzc2FnZT4= PD94...sbzwvbWVzc2FnZT4= =========================================== Any suggestions on how to marshal the objects correctly? - Thanks in advance