我们有一个动态的ws-service客户端,如下所示:
<si-ws:outbound-gateway id="wsOutboundGateway" uri="{uri}" reply-timeout="120000" fault-message-resolver="wsFaultMessageResolver">
<si-ws:uri-variable name="uri" expression="headers.URL"/>
<si-ws:request-handler-advice-chain>
<ref bean="wsRetryAdvice"/>
</si-ws:request-handler-advice-chain>
</si-ws:outbound-gateway>
是否可以动态处理mtom附件,而无需自定义编组? 或者例如它可以像这样,但如果答案有一个mtom,我们还有另一个处理案例?
private static class DefaultSourceExtractor extends TransformerObjectSupport implements SourceExtractor<DOMSource> {
@Override
public DOMSource extractData(Source source) throws IOException, TransformerException {
if (source instanceof DOMSource) {
return (DOMSource)source;
}
DOMResult result = new DOMResult();
this.transform(source, result);
return new DOMSource(result.getNode());
}