【发布时间】:2016-12-19 16:47:12
【问题描述】:
我有一个使用 spring-WS 实现 WSDL 的微服务(spring-boot)。 计划是使用 Zuul 通过网关服务器访问 WSDL。
从网关访问:http://192.168.1.5:8080/integration/ws/test.wsdl
Zuul路由配置在Gateway:
integration:
sensitive-headers:
path: /integration/**
url: http://localhost:9090
返回的 WSDL 带有正确的端口号 (8080) 但不正确的主机名。也不返回前缀“/integration”。
<wsdl:service name="TestPortService">
<wsdl:port binding="tns:TestPortSoap11" name="TestPortSoap11">
<soap:address location="http://localhost:8080/ws"/>
</wsdl:port>
</wsdl:service>
即使我手动设置 X-Forwarded-For 标头,主机名似乎也不会改变。 [这个我在没有 Zuul 的情况下测试]。为了让 Spring-WS 在代理后面工作,我缺少什么?我在 Spring Boot 的应用程序属性中设置了 remote_ip_header 和 protocol_header。
【问题讨论】:
标签: spring-boot spring-ws netflix-zuul