@Override protected Jaxb2Marshaller createMarshaller() throws Exception { Jaxb2Marshaller marshaller = new Jaxb2Marshaller(); marshaller.setContextPath(CONTEXT_PATH); marshaller.afterPropertiesSet(); return marshaller; }
@Override protected Jaxb2Marshaller createUnmarshaller() throws Exception { Jaxb2Marshaller unmarshaller = new Jaxb2Marshaller(); unmarshaller.setContextPath("org.springframework.oxm.jaxb.test"); unmarshaller.setSchema(new ClassPathResource("org/springframework/oxm/flight.xsd")); unmarshaller.afterPropertiesSet(); return unmarshaller; }
@Test public void properties() throws Exception { Jaxb2Marshaller marshaller = new Jaxb2Marshaller(); marshaller.setContextPath(CONTEXT_PATH); marshaller.setMarshallerProperties( Collections.<String, Object>singletonMap(javax.xml.bind.Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE)); marshaller.afterPropertiesSet(); }
@Test(expected = UncategorizedMappingException.class) public void testInvalidContextPath() throws Exception { Jaxb2Marshaller marshaller = new Jaxb2Marshaller(); marshaller.setContextPath("ab"); marshaller.afterPropertiesSet(); }
@Test public void lazyInit() throws Exception { marshaller = new Jaxb2Marshaller(); marshaller.setContextPath(CONTEXT_PATH); marshaller.setLazyInit(true); marshaller.afterPropertiesSet(); StringWriter writer = new StringWriter(); StreamResult result = new StreamResult(writer); marshaller.marshal(flights, result); DifferenceEvaluator ev = chain(Default, downgradeDifferencesToEqual(XML_STANDALONE)); assertThat("Marshaller writes invalid StreamResult", writer.toString(), isSimilarTo(EXPECTED_STRING).withDifferenceEvaluator(ev)); }
@Bean public Jaxb2Marshaller jaxb2MarshallerImage() { Jaxb2Marshaller bean = new Jaxb2Marshaller(); bean.setContextPath("ch.sahits.game.graphic.data.image"); return bean; } @Bean
@Bean public Jaxb2Marshaller jaxb2SoundMarshaller() { Jaxb2Marshaller bean = new Jaxb2Marshaller(); bean.setContextPath("ch.sahits.game.sound.data"); return bean; } @Bean
@Bean Jaxb2Marshaller jaxb2Marshaller() { Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller(); jaxb2Marshaller.setContextPath("com.codenotfound.types.order"); return jaxb2Marshaller; }
@Bean Jaxb2Marshaller jaxb2Marshaller() { Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller(); jaxb2Marshaller.setContextPath("com.codenotfound.types.orderhistory"); return jaxb2Marshaller; }
@Bean Jaxb2Marshaller jaxb2Marshaller() { Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller(); jaxb2Marshaller.setContextPath("org.example.ticketagent"); return jaxb2Marshaller; }
@Bean Jaxb2Marshaller jaxb2Marshaller() { Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller(); jaxb2Marshaller .setContextPath("com.codenotfound.types.helloworld"); return jaxb2Marshaller; }
@Bean Jaxb2Marshaller jaxb2Marshaller() { Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller(); jaxb2Marshaller.setContextPath("org.example.ticketagent"); return jaxb2Marshaller; }
@Bean Jaxb2Marshaller jaxb2Marshaller() { Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller(); jaxb2Marshaller.setContextPath("org.example.ticketagent"); return jaxb2Marshaller; }
@Bean Jaxb2Marshaller jaxb2Marshaller() { Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller(); jaxb2Marshaller.setContextPath("org.example.ticketagent"); return jaxb2Marshaller; }
@Bean Jaxb2Marshaller jaxb2Marshaller() { Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller(); jaxb2Marshaller.setContextPath("org.example.ticketagent"); return jaxb2Marshaller; }
@Bean Jaxb2Marshaller jaxb2Marshaller() { Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller(); jaxb2Marshaller.setContextPath("org.example.ticketagent"); return jaxb2Marshaller; }
@Bean Jaxb2Marshaller jaxb2Marshaller() { Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller(); jaxb2Marshaller.setContextPath("org.example.ticketagent"); return jaxb2Marshaller; }
@Bean public Jaxb2Marshaller jaxb2MarshallerPolygon() { Jaxb2Marshaller bean = new Jaxb2Marshaller(); bean.setContextPath("ch.sahits.game.graphic.data.polygon"); return bean; } @Bean
@Bean public Jaxb2Marshaller jaxb2Marshaller() { Jaxb2Marshaller marshaller = new Jaxb2Marshaller(); marshaller.setContextPath("xpadro.spring.integration.ws.types"); return marshaller; } }
@Bean public Jaxb2Marshaller marshaller() { Jaxb2Marshaller marshaller = new Jaxb2Marshaller(); marshaller.setContextPath("com.kennybastani.guides.customer_service"); return marshaller; }