org.springframework.oxm.castor.CastorMarshaller Java Examples

The following examples show how to use org.springframework.oxm.castor.CastorMarshaller. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AmazonProductService.java    From website with GNU Affero General Public License v3.0 5 votes vote down vote up
private Unmarshaller createUnmarshaller() throws Exception {
   	CastorMarshaller unmarshaller = new CastorMarshaller();
   	unmarshaller.setMappingLocations(new Resource[] {new ClassPathResource("/castor/amazonProductSearchResponse.xml"), new ClassPathResource("/castor/amazonProduct.xml")});
   	unmarshaller.setIgnoreExtraElements(true);
   	unmarshaller.afterPropertiesSet();
	return unmarshaller;
}
 
Example #2
Source File: OxmNamespaceHandlerTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void castorEncodingMarshaller() throws Exception {
	CastorMarshaller castorMarshaller = applicationContext.getBean("castorEncodingMarshaller", CastorMarshaller.class);
	assertNotNull(castorMarshaller);
}
 
Example #3
Source File: OxmNamespaceHandlerTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void castorTargetClassMarshaller() throws Exception {
	CastorMarshaller castorMarshaller = applicationContext.getBean("castorTargetClassMarshaller", CastorMarshaller.class);
	assertNotNull(castorMarshaller);
}
 
Example #4
Source File: OxmNamespaceHandlerTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void castorTargetPackageMarshaller() throws Exception {
	CastorMarshaller castorMarshaller = applicationContext.getBean("castorTargetPackageMarshaller", CastorMarshaller.class);
	assertNotNull(castorMarshaller);
}
 
Example #5
Source File: OxmNamespaceHandlerTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void castorMappingLocationMarshaller() throws Exception {
	CastorMarshaller castorMarshaller = applicationContext.getBean("castorMappingLocationMarshaller", CastorMarshaller.class);
	assertNotNull(castorMarshaller);
}
 
Example #6
Source File: TodoXmlConversionTest.java    From SpringIn28Minutes with MIT License 4 votes vote down vote up
@Bean
public Marshaller marshaller() {
	return new CastorMarshaller();
}
 
Example #7
Source File: TodoXmlConversionTest.java    From SpringIn28Minutes with MIT License 4 votes vote down vote up
@Bean
public Marshaller unmarshaller() {
	CastorMarshaller castorMarshaller = new CastorMarshaller();
	castorMarshaller.setTargetClass(Todo.class);
	return castorMarshaller;
}