Marshalling XML with large base64 content



i have a XML-Schema which contains base64 binary data. The problem is, if the binary is big enough I unsurprisingly get an OutOfMemoryError. I managed to generate the affected java class to use the DataHanlder instead of a byte[] but still JAXb seams to do the marshaling in RAM. The used schema cannot be changed and is very complex so building the XML by handy is not a solution. The only idea i have on this is adding a placeholder instead of the big binary and replacing it afterwards. But I believe there is a better solution!?


Thanks for your hints


No comments:

Post a Comment