JBoss Application Server安装部署

来源:互联网 发布:centos shell 编辑文件 编辑:程序博客网 时间:2024/06/11 17:10

JBoss AS的安装非常简单,只要下载后解压即可。但是要远程访问和使用WebService则需要额外的配置:

1.地址绑定

  如果不做这个设置,只能用localhost或127.0.0.1访问。也可以在启动参数里设置 -b 0.0.0.0
  在JBOSS目录下找到WEB 服务器配置XML即JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml

原内容:
<Connector port="8080" address="${jboss.bind.address}"
         maxThreads="250" maxHttpHeaderSize="8192"
         emptySessionPath="true" protocol="HTTP/1.1"
         enableLookups="false" redirectPort="8443" acceptCount="100"
         connectionTimeout="20000" disableUploadTimeout="true" />
->
改后内容:
 <Connector port="8088" address="0.0.0.0"
         maxThreads="250" maxHttpHeaderSize="8192"
         emptySessionPath="true" protocol="HTTP/1.1"
         enableLookups="false" redirectPort="8443" acceptCount="100"
         connectionTimeout="20000" disableUploadTimeout="true" />

2.地址重写
   允许远程调用wsdl,不做这个设置,远程service上的地址仍然为127.0.0.1,访问会有问题
/home/hls/jboss-5.1.0.GA/server/default/deployers/jbossws.deployer/META-INF/jboss-beans.xml

jbossws.undefined.host value has to be specified for the webServiceHost attribute.

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

3. No content-type in the header问题
javax.xml.ws.WebServiceException: No Content-type in the header!
解决方法:
把JBOSS_HOME/common/lib目录下的以下文件移动到endorsed目录 (JBOSS_HOME/lib/endorsed).

jbossws-native-jaxrpc.jar
jbossws-native-jaxws.jar
jbossws-native-jaxws-ext.jar
jbossws-native-saaj.jar

原创粉丝点击