Hi Raghu ,
You can use same "hostname" parameter programatically either in
service level or module level . one possible approach is given below .
1. Implement the "ServiceLifeCycle" interface within your service
class or as a separate class .
2. set the value to "hostname" parameter within the startUp ( ...) method.
axisService.getAxisConfiguration().addParameter("hostname",
"myhost.com");
3. add your LifeCycle class to service.xml file.
<service name="SimpleService" class="LifeCycleClassName">
Thanks
On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula
<[email protected]> wrote:
> Hi,
>
>
>
> I’m using Axis2 1.4 version. I have to set the hostname in axis2.xml so
> that the soap:address location in the WSDL (when user types ?wsdl) uses that
> hostname instead of showing a IP address.
>
>
>
> The problem I have is that my webservices war file is deployed on multiple
> servers and I can’t manually edit each axis2.xml file for each server.
>
>
>
> Is there any option to read the server name from some properties file & set
> it to the hostname in axis2.xml programmatically?
>
>
>
> Thanks
>
> Raghu
--
Sagara Gunathunga
Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/