Java/Tomcat 中的 SSL 配置就是这样,我配置了一个 tomcat6 实例以从处理 SSL 的 nginx 反向代理获取请求,代理到 localhost:8080 的连接。添加诸如 X-Forwarded-For
之类的 header 可确保端点显示正确的地址,但不会显示正确的协议(protocol)。客户端(在我的例子中是 python-suds)很好地检索了 WSDL,但找到了 SOAP 端口的以下位置:
<wsdl:service name="WebService">
<wsdl:port name="WebServiceHttpSoap11Endpoint" binding="ns:WebServiceSoap11Binding">
<soap:address location="http://10.10.3.96/axis2/services/WebService.WebServiceHttpSoap11Endpoint/"/>
</wsdl:port>
<wsdl:port name="WebServiceHttpSoap12Endpoint" binding="ns:WebServiceSoap12Binding">
<soap12:address location="http://10.10.3.96/axis2/services/WebService.WebServiceHttpSoap12Endpoint/"/>
</wsdl:port>
<wsdl:port name="WebServiceHttpEndpoint" binding="ns:WebServiceHttpBinding">
<http:address location="http://10.10.3.96/axis2/services/WebService.WebServiceHttpEndpoint/"/>
</wsdl:port>
</wsdl:service>
我怀疑是 http://
将其关闭,因为尝试使用它会导致错误并在 tomcat 的日志中显示以下消息:
org.apache.axis2.AxisFault:未找到操作的端点引用 (EPR) 是/axis2/services/WebService.WebServiceHttpSoap11Endpoint/并且 WSA Action = null。如果此 EPR 以前可以访问,请联系服务器管理员。
有没有办法(在 axis2 或 nginx 中)配置它以使其工作?我似乎无法找到一种方法来说服 axis2 生成其端点的位置以包含 https://
。
最佳答案
好吧,长时间的谷歌搜索终于得出了一个结果:添加一个(据我所知)未记录的配置参数到全局 axis2.xml
配置文件生成正确的工作端点 url:
<parameter name="httpFrontendHostUrl">https://10.10.3.96/axis2/</parameter>
关于java - axis2 webapp 背后的反向代理产生了错误的位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9941311/