Host name issue while deploying WebService
rohit.macherla Jul 25, 2008 3:55 AMHi,
I have a WebService created as a .war file with the implementation class developed in Java and properly annotated. When I deploy the War file, i.e., when I put the WAR file in the /server/default/deploy folder, the WSDL is generated automatically and is in the location /data/wsdl/<app-name>.
But this WSDL has the SOAP:ADDRESS field as something like this :
http://STD42S15.tndsdc.bsnl.co.in:8080/CompositeWebServiceForServiceOrder/CompositeWebServiceForServiceOrderService
The problem is with the hostname. JBoss 4.2.2.GA is the version that I am using and it is installed on HP-UX platform. When I get the hostname of the server by typing the "hostname" in the Unix window, I get only :
STD42S15
According to our server admin, the fully qualified name "STD42S15.tndsdc.bsnl.co.in" is present only in the DNS names config.
I want my WebService to be generated with the SOAP:ADDRESS :
http://STD42S15:8080/CompositeWebServiceForServiceOrder/CompositeWebServiceForServiceOrderService
I mean without the .tndsdc.bsnl.co.in
When I change the jboss-service.xml entry of the following :
<mbean code="org.jboss.web.WebService"
name="jboss:service=WebService">
<!-- The Bind address and Port -->
<attribute name="BindAddress">${jboss.bind.address}</attribute>
<attribute name="Port">8083</attribute>
<!-- The address to use for the host portion of the RMI codebase URL -->
<attribute name="Host">${java.rmi.server.hostname}</attribute>
<!-- Should non-EJB .class files be downloadable -->
to
<mbean code="org.jboss.web.WebService"
name="jboss:service=WebService">
<!-- The Bind address and Port -->
<attribute name="BindAddress">${jboss.bind.address}</attribute>
<attribute name="Port">8083</attribute>
<!-- The address to use for the host portion of the RMI codebase URL -->
<attribute name="Host">STD42S15</attribute>
<!-- Should non-EJB .class files be downloadable -->
I thought the problem would be resolved, but it hasn't. Whenever I start the server, from the logs i can see that the bind.address is still "STD42S15.tndsdc.bsnl.co.in". I thought 0.0.0.0 would be the bind address as i start my server using the command
./run.sh -b 0.0.0.0
Any help on how to change the default host name would be appreciated.
Thanks.