我需要使用带有spring-ws的eclipse moxy来编组一个对象。我正在用spring-ws运行一个spring-boot项目。我在所有模型目录中都包含了moxy jar和所有jaxb.properties文件。
如何让Spring-WS使用jaxb的moxy实现?
订单配置
git show
订购客户
function clean($string) {
return preg_replace('/[^\p{L}0-9\-]/u', ' ', $string);// Removes special chars.
}
这是我想要使用jaxb的Moxy实现的地方。
的pom.xml
@Configuration
public class OrderConfiguration {
@Bean
public Jaxb2Marshaller marshaller() throws Exception {
Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
marshaller.setLazyInit(true);
marshaller.setContextPaths("OMITTED.xcbl.ordermanagement");
return marshaller;
}
@Bean
public OrderClient orderClient(Jaxb2Marshaller marshaller) throws Exception {
OrderClient client = new OrderClient();
client.setMarshaller(marshaller);
client.setUnmarshaller(marshaller);
return client;
}
@Bean
public ChangeOrderClient changeOrderClient(Jaxb2Marshaller marshaller) throws Exception {
ChangeOrderClient client = new ChangeOrderClient();
client.setMarshaller(marshaller);
client.setUnmarshaller(marshaller);
return client;
}
}