问题 JBoss无法使用Vagrant / VirtualBox将其http传输移植到Web服务端点。
背景
我们正在使用Vagrant来托管带有WSO2 ESB,JBoss EAP和Oracle XE的centOS框。我在Vagrantfile中设置了端口转发:
Vagrantfile
config.vm.network :forwarded_port, guest: 9994, host: 9994 # JBOSS Admin Console
config.vm.network :forwarded_port, guest: 8084, host: 8084 # JBOSS Endpoints
config.vm.network :forwarded_port, guest: 10003, host: 10003 # JBOSS Maven Deploy
config.vm.network :forwarded_port, guest: 9443, host: 9443 # WSO2 Console admin/admin
config.vm.network :forwarded_port, guest: 8243, host: 8243 # WSO2 Endpoints
config.vm.network :forwarded_port, guest: 8280, host: 8280 # WSO2 Endpoints
config.vm.network :forwarded_port, guest: 1521, host: 1521 # Oracle XE
JBoss standalone.xml
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
<interface name="unsecure">
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
</interface>
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:4}">
<socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
<socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
<socket-binding name="ajp" port="8009"/>
<socket-binding name="http" port="8080"/>
<socket-binding name="https" port="8443"/>
<socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
<socket-binding name="jgroups-tcp" port="7600"/>
<socket-binding name="jgroups-tcp-fd" port="57600"/>
<socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
<socket-binding name="jgroups-udp-fd" port="54200"/>
<socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
<socket-binding name="remoting" port="4447"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
除了端口8084之外,我可以从主机系统中完美地击中所有内容。我可以在vm中卷曲端点,并且在guest虚拟机中正确托管WSDL。
我尝试过的事情
由于我上面的测试,我觉得我已经排除了Vagrant / Virtual Box这个问题。我认为这与JBoss中有关http传输的配置有关。
有什么想法吗?
答案 0 :(得分:2)
经过大量研究后我找到了解决方案。这是原始的Web服务子系统:
<subsystem xmlns="urn:jboss:domain:webservices:1.1">
<modify-wsdl-address>true</modify-wsdl-address>
<wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
<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>
</subsystem>
我在这里找到了一篇文章https://docs.jboss.org/author/display/JBWS/Advanced+User+Guide?_sscc=t,其中描述了服务器配置选项。通过进行以下更改,我解决了我的问题:
<subsystem xmlns="urn:jboss:domain:webservices:1.1">
<modify-wsdl-address>true</modify-wsdl-address>
<wsdl-host>localhost</wsdl-host>
<wsdl-port>8084</wsdl-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>
</subsystem>
我基本上只是将wsdl-host更改为 localhost ,并添加了 8084 的wsdl-port。我希望这可以帮助其他人!