提取完整的包膜XML我有一個這樣的攔截器:從MessageContext的
public class WebServiceInterceptor extends EndpointInterceptorAdapter {
@Inject
private Jaxb2Marshaller myJaxb2Marshaller;
@Inject
private WebServiceHistoryDao webServiceHistoryDao;
@Override
public boolean handleRequest(MessageContext messageContext, Object endpoint)
throws Exception {
Source payloadSource = messageContext.getRequest().getPayloadSource();
Object unmarshaled = myJaxb2Marshaller.unmarshal(payloadSource);
//EXTRACT XML HERE
//is there a better way than this:
String extractedXml = myJaxb2Marshaller.marshal(unmarshaled);
return true;
}
}
我如何可以提取信封的整個XML(用於記錄的目的 - 把它寫入DB)
我找到了一個解決方案,並將其粘貼在原始帖子中(編組人員的解決方案)。有沒有更好的方法來做到這一點? – Benchik