Re: [Axis2] Setting hostname in axis2.xml ????
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. Thanks On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula 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/
RE: [Axis2] Setting hostname in axis2.xml ????
Hi Sagara, I have a skeleton class generated from WSDL2Java. I've changed that skeleton class to implement the ServiceLifeCycle interface & implemented the startup method. Looks like that startup method is never called, because after that change also I'm getting a private IP address in the soap:address location in WSDL. I've put a debug point in the startup method & the control never stopped at the debug point. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Tuesday, April 07, 2009 2:36 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml 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. Thanks On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula 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/
RE: [Axis2] Setting hostname in axis2.xml ???? - NOT WORKING
Hi Sagara, I have a skeleton class generated from WSDL2Java. I've changed that skeleton class to implement the ServiceLifeCycle interface & implemented the startup method. Looks like that startup method is never called, because after that change also I'm getting a private IP address in the soap:address location in WSDL. I've put a debug point in the startup method & the control never stopped at the debug point. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Tuesday, April 07, 2009 2:36 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml 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. Thanks On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula 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/
Re: [Axis2] Setting hostname in axis2.xml ???? - NOT WORKING
Hi Raghu, Can you post your skeleton class along with service.xml file? Thanks, On Thu, Apr 9, 2009 at 11:59 PM, Raghu Upadhyayula wrote: > Hi Sagara, > > I have a skeleton class generated from WSDL2Java. I've changed that > skeleton class to implement the ServiceLifeCycle interface & implemented the > startup method. > > Looks like that startup method is never called, because after that > change also I'm getting a private IP address in the soap:address location in > WSDL. I've put a debug point in the startup method & the control never > stopped at the debug point. > > Thanks > Raghu > > -Original Message- > From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] > Sent: Tuesday, April 07, 2009 2:36 PM > To: axis-user@ws.apache.org > Subject: Re: [Axis2] Setting hostname in axis2.xml > > 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. > > > > > Thanks > > > On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula > 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/ > -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/
RE: [Axis2] Setting hostname in axis2.xml ???? - NOT WORKING
Hi Sagara, Attached is my skeleton class & service.xml files. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Thursday, April 09, 2009 1:37 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml - NOT WORKING Hi Raghu, Can you post your skeleton class along with service.xml file? Thanks, On Thu, Apr 9, 2009 at 11:59 PM, Raghu Upadhyayula wrote: > Hi Sagara, > > I have a skeleton class generated from WSDL2Java. I've changed that > skeleton class to implement the ServiceLifeCycle interface & implemented the > startup method. > > Looks like that startup method is never called, because after that > change also I'm getting a private IP address in the soap:address location in > WSDL. I've put a debug point in the startup method & the control never > stopped at the debug point. > > Thanks > Raghu > > -Original Message- > From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] > Sent: Tuesday, April 07, 2009 2:36 PM > To: axis-user@ws.apache.org > Subject: Re: [Axis2] Setting hostname in axis2.xml > > 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. > > > > > Thanks > > > On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula > 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/ > -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/ http://www.w3.org/ns/wsdl/in-out"; class="com.rsys.ws.ResponsysWSServiceMessageReceiverInOut"/> com.rsys.ws.ResponsysWSServiceSkeleton true true http://www.w3.org/ns/wsdl/in-out"; namespace="urn:ws.rsys.com"> \"\" urn:ws.rsys.com:ResponsysWS:loginResponse urn:ws.rsys.com:ResponsysWS:login:Fault:AccountFault urn:ws.rsys.com:ResponsysWS:login:Fault:UnexpectedErrorFault http://www.w3.org/ns/wsdl/in-out"; namespace="urn:ws.rsys.com"> \"\" urn:ws.rsys.com:ResponsysWS:logoutResponse urn:ws.rsys.com:ResponsysWS:logout:Fault:UnexpectedErrorFault http://www.w3.org/ns/wsdl/in-out"; namespace="urn:ws.rsys.com"> \"\" urn:ws.rsys.com:ResponsysWS:createFolderResponse urn:ws.rsys.com:ResponsysWS:createFolder:Fault:UnexpectedErrorFault urn:ws.rsys.com:ResponsysWS:createFolder:Fault:FolderFault http://www.w3.org/ns/wsdl/in-out"; namespace="urn:ws.rsys.com"> \"\" urn:ws.rsys.com:ResponsysWS:listFoldersResponse urn:ws.rsys.com:ResponsysWS:listFolders:Fault:UnexpectedErrorFault http://www.w3.org/ns/wsdl/in-out"; namespace="urn:ws.rsys.com"> \"\" urn:ws.rsys.com:ResponsysWS:deleteFolderResponse urn:ws.rsys.com:ResponsysWS:deleteFolder:Fault:UnexpectedErrorFault urn:ws.rsys.com:ResponsysWS:deleteFolder:Fault:FolderFault ResponsysWSServiceSkeleton.java Description: ResponsysWSServiceSkeleton.java
Re: [Axis2] Setting hostname in axis2.xml ???? - NOT WORKING
Hi Raghu, You have missed 3rd step that i mentioned, you should add "class" parameter to your service.xml file as follows. Hope this will resolve your problem. Thanks , On Fri, Apr 10, 2009 at 1:56 AM, Raghu Upadhyayula wrote: > Hi Sagara, > > Attached is my skeleton class & service.xml files. > > Thanks > Raghu > > -Original Message- > From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] > Sent: Thursday, April 09, 2009 1:37 PM > To: axis-user@ws.apache.org > Subject: Re: [Axis2] Setting hostname in axis2.xml - NOT WORKING > > Hi Raghu, > Can you post your skeleton class along with service.xml file? > > Thanks, > > On Thu, Apr 9, 2009 at 11:59 PM, Raghu Upadhyayula > wrote: >> Hi Sagara, >> >> I have a skeleton class generated from WSDL2Java. I've changed that >> skeleton class to implement the ServiceLifeCycle interface & implemented the >> startup method. >> >> Looks like that startup method is never called, because after that >> change also I'm getting a private IP address in the soap:address location in >> WSDL. I've put a debug point in the startup method & the control never >> stopped at the debug point. >> >> Thanks >> Raghu >> >> -Original Message- >> From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] >> Sent: Tuesday, April 07, 2009 2:36 PM >> To: axis-user@ws.apache.org >> Subject: Re: [Axis2] Setting hostname in axis2.xml >> >> 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. >> >> >> >> >> Thanks >> >> >> On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula >> 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/ >> > > > > -- > Sagara Gunathunga > > Blog - http://ssagara.blogspot.com > Web - http://sagaras.awardspace.com/ > -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/
RE: [Axis2] Setting hostname in axis2.xml ???? - NOT WORKING
But if you see the services.xml it already has the class parameter defined as a parameter name "ServiceClass" (see below), instead of as an attribute in the tag. Isn't that sufficient. http://www.w3.org/ns/wsdl/in-out"; class="com.rsys.ws.ResponsysWSServiceMessageReceiverInOut"/> com.rsys.ws.ResponsysWSServiceSkeleton true true Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Thursday, April 09, 2009 11:56 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml - NOT WORKING Hi Raghu, You have missed 3rd step that i mentioned, you should add "class" parameter to your service.xml file as follows. Hope this will resolve your problem. Thanks , On Fri, Apr 10, 2009 at 1:56 AM, Raghu Upadhyayula wrote: > Hi Sagara, > > Attached is my skeleton class & service.xml files. > > Thanks > Raghu > > -Original Message- > From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] > Sent: Thursday, April 09, 2009 1:37 PM > To: axis-user@ws.apache.org > Subject: Re: [Axis2] Setting hostname in axis2.xml - NOT WORKING > > Hi Raghu, > Can you post your skeleton class along with service.xml file? > > Thanks, > > On Thu, Apr 9, 2009 at 11:59 PM, Raghu Upadhyayula > wrote: >> Hi Sagara, >> >> I have a skeleton class generated from WSDL2Java. I've changed that >> skeleton class to implement the ServiceLifeCycle interface & implemented the >> startup method. >> >> Looks like that startup method is never called, because after that >> change also I'm getting a private IP address in the soap:address location in >> WSDL. I've put a debug point in the startup method & the control never >> stopped at the debug point. >> >> Thanks >> Raghu >> >> -Original Message- >> From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] >> Sent: Tuesday, April 07, 2009 2:36 PM >> To: axis-user@ws.apache.org >> Subject: Re: [Axis2] Setting hostname in axis2.xml >> >> 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. >> >> >> >> >> Thanks >> >> >> On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula >> 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/ >> > > > > -- > Sagara Gunathunga > > Blog - http://ssagara.blogspot.com > Web - http://sagaras.awardspace.com/ > -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/
RE: [Axis2] Setting hostname in axis2.xml ????` - WORKS NOW --- THANKS
Thanks Sagara, After adding the class parameter to the service tag, it is working. Thanks Raghu -Original Message- From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] Sent: Thursday, April 09, 2009 11:56 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Setting hostname in axis2.xml - NOT WORKING Hi Raghu, You have missed 3rd step that i mentioned, you should add "class" parameter to your service.xml file as follows. Hope this will resolve your problem. Thanks , On Fri, Apr 10, 2009 at 1:56 AM, Raghu Upadhyayula wrote: > Hi Sagara, > > Attached is my skeleton class & service.xml files. > > Thanks > Raghu > > -Original Message- > From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] > Sent: Thursday, April 09, 2009 1:37 PM > To: axis-user@ws.apache.org > Subject: Re: [Axis2] Setting hostname in axis2.xml - NOT WORKING > > Hi Raghu, > Can you post your skeleton class along with service.xml file? > > Thanks, > > On Thu, Apr 9, 2009 at 11:59 PM, Raghu Upadhyayula > wrote: >> Hi Sagara, >> >> I have a skeleton class generated from WSDL2Java. I've changed that >> skeleton class to implement the ServiceLifeCycle interface & implemented the >> startup method. >> >> Looks like that startup method is never called, because after that >> change also I'm getting a private IP address in the soap:address location in >> WSDL. I've put a debug point in the startup method & the control never >> stopped at the debug point. >> >> Thanks >> Raghu >> >> -Original Message- >> From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] >> Sent: Tuesday, April 07, 2009 2:36 PM >> To: axis-user@ws.apache.org >> Subject: Re: [Axis2] Setting hostname in axis2.xml >> >> 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. >> >> >> >> >> Thanks >> >> >> On Tue, Apr 7, 2009 at 9:39 PM, Raghu Upadhyayula >> 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/ >> > > > > -- > Sagara Gunathunga > > Blog - http://ssagara.blogspot.com > Web - http://sagaras.awardspace.com/ > -- Sagara Gunathunga Blog - http://ssagara.blogspot.com Web - http://sagaras.awardspace.com/