WildFly 8.2.0, JBossWS using reverse proxy generates incorrect https soap:address

邮差的信 提交于 2021-02-07 07:58:26

问题


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>

The generated wsdl contains:

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

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

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.

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

Thanks for any pointers.


回答1:


Try to add

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

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

Valid values are http and https.

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

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

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



来源:https://stackoverflow.com/questions/30037205/wildfly-8-2-0-jbossws-using-reverse-proxy-generates-incorrect-https-soapaddres

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!