[Servingxml-help] Reading Java property file as a record
Brought to you by:
danielaparker
From: Peter K. <pet...@bl...> - 2008-04-04 09:18:05
|
Hi, I'm trying to read a Java-like property file as one record, where each property becomes a field (in contrast to the examples in ServingXml that treat each property as a separate record. I did not find any way to do this out-of-the-box, so I've written a PropertyReader, PropertyReaderFactory and PropertyReaderFactoryAssembler to do right this. This works fine when I include these new components into the servicemix source distribution as I did, but using it externally I couldn't get this to run, but that's another topic. The problem seems to be that the records do not have a fixed type associated and thus a field element mapping does not find the fields obviously. The file produced is this: --- <?xml version="1.0" encoding="UTF-8"?> <header xmlns="http://openview.hp.com/xmlns/conf/2003/04"> <policy> <ids> <container_id/> <version_id/> </ids> <name/> <version/> <description/> <files> <data> <encoding>text/plain</encoding> <checksum/> <file_name>data</file_name> </data> </files> </policy> <policytype> <container_id/> <version/> </policytype> </header> --- as one can see all tags are empty, the value from the record is missing. I tried already in PropertyReader to create a record type on the fly by just putting all property names into a record type and using this but without success. I'm lost, what am I doing wrong here? Thanks, Peter |