WildFly 8.2.0,使用反向代理的 JBossWS 生成错误的 https soap:address [英] WildFly 8.2.0, JBossWS using reverse proxy generates incorrect https soap:address

查看:75
本文介绍了WildFly 8.2.0,使用反向代理的 JBossWS 生成错误的 https soap:address的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的设置是 https 上的 apache 服务器,充当 WildFly 8.2.0 在端口 8080 上响应的反向代理.Web 服务是通过注释使用自下而上的方法创建的.生成的soap:address 没有正确的协议或端口.我修改了 standalone.xml 以指定 wsdl-host 并允许修改 WSDL URL.webservices子系统如下:

My setup is a apache server on https acting as a reverse proxy to WildFly 8.2.0 responding on port 8080. The web service is created using the bottom up approach via annotations. The soap:address that is generated does not have the correct protocol or port. I have modified the standalone.xml to specify the wsdl-host and allow modification of the WSDL URL. The webservices subsystem are as follows:

<subsystem xmlns="urn:jboss:domain:webservices:1.2">
    <wsdl-host>myhost.com</wsdl-host>
    <modify-wsdl-address>true</modify-wsdl-address>
    <wsdl-secure-port>443</wsdl-secure-port>
    <endpoint-config name="Standard-Endpoint-Config"/>
    <endpoint-config name="Recording-Endpoint-Config">
        <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
            <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
        </pre-handler-chain>
    </endpoint-config>
    <client-config name="Standard-Client-Config"/>
</subsystem>

生成的 wsdl 包含:

The generated wsdl contains:

<wsdl:port binding="tns:HelloServiceSoapBinding" name="HelloServicePort">
    <soap:address location="http://myhost.com:8080/pfdemo/HelloService"/>
</wsdl:port>

我期待 location="https://myhost.com/pfdemo/HelloService"/>

I was expecting location="https://myhost.com/pfdemo/HelloService"/>

我认为指定 wsdl-secure-port 并允许 modify-wsdl-address 会处理协议和端口,但似乎并非如此.

I thought specifying the wsdl-secure-port and allowing the modify-wsdl-address would take care of the protocol and port, but that doesn't seem to be the case.

如何更正生成的 wsdl 的soap:address 中的协议和端口?

How can I correct the protocol and port in the soap:address for the generated wsdl?

感谢您的指点.

推荐答案

尝试添加

<wsdl-uri-scheme>https</wsdl-uri-scheme>

此属性显式设置用于重写的 URI 方案.

This property explicitly sets the URI scheme to use for rewriting .

有效值为 http 和 https.

Valid values are http and https.

此配置覆盖通过处理端点计算的方案(即使传输保证指定).

This configuration overrides scheme computed by processing the endpoint (even if a transport guarantee is specified).

wsdl-port 和 wsdl-secure-port 的提供值(或它们的默认值)根据指定的方案使用.

The provided values for wsdl-port and wsdl-secure-port (or their default values) are used depending on specified scheme.

来源:https://docs.jboss.org/author/display/JBWS/Published+WSDL+customization

这篇关于WildFly 8.2.0,使用反向代理的 JBossWS 生成错误的 https soap:address的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆