Guying I'm trying to customize the JAXB Marshaller having mtom enable true.
below is jAXB Marshaller Bean
@Bean
public Jaxb2Marshaller getLGMarshaller() {
Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
marshaller.setMtomEnabled(true);
marshaller.setContextPath("pk.herman.wsdl");
return marshaller;
}
Current output of above marsheller is
<ns2:Attachment>
<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:1b295245-200b-4306-a245-5d3248c3b7c0%40herman.pk"/>
Expected output is
<ns2:Attachment>cid:1b295245-200b-4306-a245-5d3248c3b7c0%40herman.pk</ns2:Attachment>
</ns2:Attachment>
This is how im attaching the mtom using javax.activation.DataHandler
new DataHandler(re.getLaglFileContent().getBytes(), MediaType.APPLICATION_OCTET_STREAM_VALUE));
question from:
https://stackoverflow.com/questions/65871043/how-to-customzie-jaxb-mtom-marshaller 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…