我的设置是 https 上的 apache 服务器,作为 WildFly 8.2.0 的反向代理,在端口 8080 上响应。Web 服务是通过注释使用自下而上的方法创建的。生成的soap:address 没有正确的协议或端口。我修改了standalone.xml 以指定wsdl-host 并允许修改WSDL URL。webservices子系统如下:
<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 包含:
<wsdl:port binding="tns:HelloServiceSoapBinding" name="HelloServicePort">
<soap:address location="http://myhost.com:8080/pfdemo/HelloService"/>
</wsdl:port>
我期待 location="https://myhost.com/pfdemo/HelloService"/>
我认为指定 wsdl-secure-port 并允许 modify-wsdl-address 会处理协议和端口,但似乎并非如此。
如何更正soap中的协议和端口:生成的wsdl的地址?
感谢您的任何指示。