天天看點

Jboss 6 setup , Web server bind address

在jboss 下部署 webservice 相當簡單, 但是預設的部署會有一個問題, 部署後的WSDL位址為

<wsdl:service name="SystemMonitorBeanService">

<wsdl:port binding="tns:SystemMonitorBeanServiceSoapBinding" name="SystemMonitorBeanPort">

  <soap:address location= "http://localhost:8080/TS-008_NDE_Data_Archive_Server/SystemMonitorBean"/></wsdl:port>

</wsdl:service>

注意通路位址

 when start jboss on all address (with -b 0.0.0.0) the generated address is like,

<wsdl:port binding="tns:SystemMonitorBeanServiceSoapBinding" name="SystemMonitorBeanPort">

  <soap:address location= "http://dev1.xz662:8080/TS-008_NDE_Data_Archive_Server/SystemMonitorBean"/></wsdl:port>

</wsdl:service>

但是這個位址不能在外面被通路, 是以需要做的是

jboss allow to Dynamic rewrite the address on all address.

1. open file

jboss-6.0.0.Final/server/default/deployers/jbossws.deployer/META-INF/stack-agnostic-jboss-beans.xml

2. find

    <property name="webServiceHost">${jboss.bind.address}</property>

change to

    <property name="webServiceHost">jbossws.undefined.host</property>

3. restart the jboss , the new address will be

<soap:address location= "http://192.168.150.89:8080/TS-008_NDE_Data_Archive_Server/SystemMonitorBean"/>

參考

https://community.jboss.org/wiki/JBossWS-UserGuide