我要把电视放进去 wsa:To
header,与扩展webservicegatewaysupport的客户端(端点的url)不同的值。
现在我这样使用服务:
public class HelloClient extends WebServiceGatewaySupport {
public GetHelloResponse getHello(GetHelloRequest request) throws URISyntaxException {
ActionCallback callback = new ActionCallback(
new URI("urn", "test:mdm:system:epage:b2b:logs:hello", null),
new Addressing10()
);
return (GetHelloResponse) getWebServiceTemplate()
.marshalSendAndReceive(request, callback);
}
}
在soap客户端配置类中:
@Bean
public HelloClient getHelloClient() throws Exception {
HelloClient helloClient = new HelloClient();
helloClient.setMarshaller(getMarshaller());
helloClient.setUnmarshaller(getMarshaller());
helloClient.setDefaultUri(env.getProperty("uri.gethelloclient"));
ClientInterceptor[] interceptors = new ClientInterceptor[] {
securityInterceptor()
};
helloClient.setInterceptors(interceptors);
return helloClient;
}
在soap头中,结果如下:
<SOAP-ENV:Header>
...
<wsa:To SOAP-ENV:mustUnderstand="1">http://localhost:8080/ws/hello</wsa:To>
<wsa:Action>urn:antel:mdm:system:epagos:b2b:comercio:hola</wsa:Action>
<wsa:MessageID>urn:uuid:27774d62-5867-47ec-b463-f50f702f4ae8</wsa:MessageID>
</SOAP-ENV:Header>
我阅读了官方文件中的参考资料,但没有提到这一点。
暂无答案!
目前还没有任何答案,快来回答吧!