Package org.springframework.oxm

Examples of org.springframework.oxm.Unmarshaller


        //No importer or upgrader found, fail
        throw new IllegalArgumentException("Provided data " + portalDataKey + " has no registered importer or upgrader support: " + systemId);
    }

    protected Object unmarshallData(final XMLEventReader bufferedXmlEventReader, final IDataImporter<Object> dataImporterExporter) {
        final Unmarshaller unmarshaller = dataImporterExporter.getUnmarshaller();
       
        try {
            final StAXSource source = new StAXSource(bufferedXmlEventReader);
            return unmarshaller.unmarshal(source);
        }
        catch (XmlMappingException e) {
            throw new RuntimeException("Failed to map provided XML to portal data", e);
        }
        catch (IOException e) {
View Full Code Here


    @Override
  protected ItemReader<Foo> getItemReader() throws Exception {
    StaxEventItemReader<Foo> reader = new StaxEventItemReader<Foo>();
    reader.setResource(new ByteArrayResource(FOOS.getBytes()));
    reader.setFragmentRootElementName("foo");
    reader.setUnmarshaller(new Unmarshaller() {
            @Override
      public Object unmarshal(Source source) throws XmlMappingException, IOException {
        Attribute attr = null ;
        try {
          XMLEventReader eventReader = StaxUtils.getXmlEventReader( source);
View Full Code Here

    MultiResourceItemReader<Foo> multiReader = new MultiResourceItemReader<Foo>();

    StaxEventItemReader<Foo> reader = new StaxEventItemReader<Foo>();

    reader.setFragmentRootElementName("foo");
    reader.setUnmarshaller(new Unmarshaller() {
            @Override
      public Object unmarshal(Source source) throws XmlMappingException, IOException {


        Attribute attr;
View Full Code Here

TOP

Related Classes of org.springframework.oxm.Unmarshaller

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.