You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Kasun Indrasiri <ka...@gmail.com> on 2010/04/24 08:51:51 UTC

Starting axis2server.sh in a different port

Hi,

Is there an option to start axis2server.sh in a different port than 8080.
The '-p<port>' (-p9090) option doesn't work with current axis2server.sh.
(As a workaround I manged to do it with editing axis2.xml)

regards,


Kasun.

Re: Starting axis2server.sh in a different port

Posted by Andreas Veithen <an...@gmail.com>.
On Sun, Apr 25, 2010 at 10:39, Afkham Azeez <af...@gmail.com> wrote:
> Anyway, what I think Kasun was referring to was a usability enhancement,
> which will enable you to start, say multiple Axis2 servers without having to
> make copies of the axis2.xml file & editing the ports.
> e.g. to start a cluster of Axis2 servers on the same machine you could do,
> /home/foo/axis2/axis2server.sh -httpPort 8080 -httpsPort 9443
> /home/foo/axis2/axis2server.sh -port 8081 -httpsPort 9444
> /home/foo/axis2/axis2server.sh -port 8082 -httpsPort 9445

SimpleHTTPServer doesn't support HTTPS.

> This will save a lot of developer time & will be a useful enhancement. Just
> because Tomcat has not provided certain things it does not mean we should
> not do it.
> Azeez
>
> On Sun, Apr 25, 2010 at 10:46 AM, Demetris <de...@ece.neu.edu> wrote:
>>
>> Exactly - ok thanks Amila - I am used to changing the services.xml file
>> with Tomcat ;)
>>
>> Amila Suriarachchi wrote:
>>>
>>>
>>> On Sat, Apr 24, 2010 at 11:54 PM, D G <demetris@ece.neu.edu
>>> <ma...@ece.neu.edu>> wrote:
>>>
>>>    So the only way is to modify the baseline? Then why not just fix
>>>    the configurable -p option?
>>>
>>>
>>> Even with tomcat you need to edit the services.xml file to change the
>>> default port. so changing the axis2.xml should be good enough.
>>>
>>> thanks,
>>> Amila.
>>>
>>>
>>>    Kasoun why is editing the axis2.XML a workaround? Isn't that a
>>>    good enough soln? Or you really prefer the -p option?
>>>    Can you share the changes to the axis2.XML?
>>>
>>>    On Apr 24, 2010, at 9:22 AM, Martin Gainty <mgainty@hotmail.com
>>>    <ma...@hotmail.com>> wrote:
>>>
>>>>    bash>export AXIS2_PORT=port
>>>>
>>>>    //modify  org.apache.axis2.transport.http.server.HttpFactory.java
>>>>    to accept port parameter from bash
>>>>        private int port;         public HttpFactory(ConfigurationContext
>>>> configurationContext)
>>>>    throws AxisFault {
>>>>            this.configurationContext = configurationContext;
>>>>            httpConfiguration =
>>>>
>>>>  configurationContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_HTTP);
>>>>            port = getIntParam(PARAMETER_PORT, 6060);
>>>>    ............
>>>>    }
>>>>        public HttpFactory(ConfigurationContext configurationContext,
>>>>    int port) throws AxisFault {
>>>>            this(configurationContext);
>>>>            this.port = port;
>>>>        }
>>>>
>>>>    //to org.apache.axis2.transport.http.server.HttpFactory.java
>>>>        private int port=0;  //initialise to 0
>>>>        public HttpFactory(ConfigurationContext configurationContext)
>>>>    throws AxisFault {
>>>>            this.configurationContext = configurationContext;
>>>>            httpConfiguration =
>>>>
>>>>  configurationContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_HTTP);
>>>>    //acquire the port from your environment
>>>>           try
>>>>           {
>>>>            this.port= new
>>>>    java.lang.Integer(java.lang.System.getenv("AXIS2_PORT")).intValue();
>>>>           }
>>>>           catch(java.lang.Exception excp)
>>>>           {
>>>>    //eat the exception..
>>>>           }
>>>>           if(this.port==0)
>>>>           {
>>>>            this.port = getIntParam(PARAMETER_PORT, 6060);
>>>>           }
>>>>    .................
>>>>    }
>>>>
>>>>    public HttpFactory(ConfigurationContext configurationContext, int
>>>>    port) throws AxisFault
>>>>    {
>>>>          this(configurationContext);
>>>>           if(port==0)
>>>>           {
>>>>    //acquire the port from your environment
>>>>           try
>>>>           {
>>>>            this.port= new
>>>>    java.lang.Integer(java.lang.System.getenv("AXIS2_PORT")).intValue();
>>>>           }
>>>>           catch(java.lang.Exception excp)
>>>>           {
>>>>    //eat the exception..
>>>>           }
>>>>            else
>>>>            {
>>>>            this.port = port;
>>>>            }
>>>>    }
>>>>
>>>>    Mit Fruendlichen Grueben
>>>>    Martin Gainty
>>>>    ______________________________________________
>>>>    Verzicht und Vertraulichkeitanmerkung
>>>>         Diese Nachricht ist vertraulich. Sollten Sie nicht der
>>>>    vorgesehene Empfaenger sein, so bitten wir hoeflich um eine
>>>>    Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer
>>>>    Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
>>>>    Austausch von Informationen und entfaltet keine rechtliche
>>>>    Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>>>>    E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>  ------------------------------------------------------------------------
>>>>    Date: Sat, 24 Apr 2010 12:21:51 +0530
>>>>    Subject: Starting axis2server.sh in a different port
>>>>    From: kasun147@gmail.com <ma...@gmail.com>
>>>>    To: java-user@axis.apache.org <ma...@axis.apache.org>
>>>>
>>>>
>>>>    Hi,
>>>>
>>>>    Is there an option to start axis2server.sh in a different port
>>>>    than 8080. The '-p<port>' (-p9090) option doesn't work with
>>>>    current axis2server.sh.     (As a workaround I manged to do it with
>>>> editing axis2.xml)
>>>>
>>>>    regards,
>>>>
>>>>
>>>>    Kasun.
>>>>
>>>>
>>>>  ------------------------------------------------------------------------
>>>>    The New Busy is not the too busy. Combine all your e-mail
>>>>    accounts with Hotmail. Get busy.
>>>>
>>>>  <http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4>
>>>>
>>>
>>>
>>>
>>>
>>> --
>>> Amila Suriarachchi
>>> WSO2 Inc.
>>> blog: http://amilachinthaka.blogspot.com/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-user-help@axis.apache.org
>>
>
>
>
> --
> Afkham Azeez
> Software Architect & Product Manager, WSO2 WSAS; WSO2, Inc.; http://wso2.com
> Member; Apache Software Foundation; http://www.apache.org/
> email: azeez@wso2.com cell: +94 77 3320919
> blog: http://blog.afkham.org
> twitter: http://twitter.com/afkham_azeez
> linked-in: http://lk.linkedin.com/in/afkhamazeez
>
> Lean . Enterprise . Middleware
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: Starting axis2server.sh in a different port

Posted by Afkham Azeez <af...@gmail.com>.
Anyway, what I think Kasun was referring to was a usability enhancement,
which will enable you to start, say multiple Axis2 servers without having to
make copies of the axis2.xml file & editing the ports.
e.g. to start a cluster of Axis2 servers on the same machine you could do,
/home/foo/axis2/axis2server.sh -httpPort 8080 -httpsPort 9443
/home/foo/axis2/axis2server.sh -port 8081 -httpsPort 9444
/home/foo/axis2/axis2server.sh -port 8082 -httpsPort 9445

This will save a lot of developer time & will be a useful enhancement. Just
because Tomcat has not provided certain things it does not mean we should
not do it.

Azeez

On Sun, Apr 25, 2010 at 10:46 AM, Demetris <de...@ece.neu.edu> wrote:

>
> Exactly - ok thanks Amila - I am used to changing the services.xml file
> with Tomcat ;)
>
> Amila Suriarachchi wrote:
>
>>
>>
>> On Sat, Apr 24, 2010 at 11:54 PM, D G <demetris@ece.neu.edu <mailto:
>> demetris@ece.neu.edu>> wrote:
>>
>>    So the only way is to modify the baseline? Then why not just fix
>>    the configurable -p option?
>>
>>
>> Even with tomcat you need to edit the services.xml file to change the
>> default port. so changing the axis2.xml should be good enough.
>>
>> thanks,
>> Amila.
>>
>>
>>    Kasoun why is editing the axis2.XML a workaround? Isn't that a
>>    good enough soln? Or you really prefer the -p option?
>>    Can you share the changes to the axis2.XML?
>>
>>    On Apr 24, 2010, at 9:22 AM, Martin Gainty <mgainty@hotmail.com
>>    <ma...@hotmail.com>> wrote:
>>
>>     bash>export AXIS2_PORT=port
>>>
>>>    //modify  org.apache.axis2.transport.http.server.HttpFactory.java
>>>    to accept port parameter from bash
>>>        private int port;         public HttpFactory(ConfigurationContext
>>> configurationContext)
>>>    throws AxisFault {
>>>            this.configurationContext = configurationContext;
>>>            httpConfiguration =
>>>
>>>  configurationContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_HTTP);
>>>            port = getIntParam(PARAMETER_PORT, 6060);
>>>    ............
>>>    }
>>>        public HttpFactory(ConfigurationContext configurationContext,
>>>    int port) throws AxisFault {
>>>            this(configurationContext);
>>>            this.port = port;
>>>        }
>>>
>>>    //to org.apache.axis2.transport.http.server.HttpFactory.java
>>>        private int port=0;  //initialise to 0
>>>        public HttpFactory(ConfigurationContext configurationContext)
>>>    throws AxisFault {
>>>            this.configurationContext = configurationContext;
>>>            httpConfiguration =
>>>
>>>  configurationContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_HTTP);
>>>    //acquire the port from your environment
>>>           try
>>>           {
>>>            this.port= new
>>>    java.lang.Integer(java.lang.System.getenv("AXIS2_PORT")).intValue();
>>>           }
>>>           catch(java.lang.Exception excp)
>>>           {
>>>    //eat the exception..
>>>           }
>>>           if(this.port==0)
>>>           {
>>>            this.port = getIntParam(PARAMETER_PORT, 6060);
>>>           }
>>>    .................
>>>    }
>>>
>>>    public HttpFactory(ConfigurationContext configurationContext, int
>>>    port) throws AxisFault
>>>    {
>>>          this(configurationContext);
>>>           if(port==0)
>>>           {
>>>    //acquire the port from your environment
>>>           try
>>>           {
>>>            this.port= new
>>>    java.lang.Integer(java.lang.System.getenv("AXIS2_PORT")).intValue();
>>>           }
>>>           catch(java.lang.Exception excp)
>>>           {
>>>    //eat the exception..
>>>           }
>>>            else
>>>            {
>>>            this.port = port;
>>>            }
>>>    }
>>>
>>>    Mit Fruendlichen Grueben
>>>    Martin Gainty
>>>    ______________________________________________
>>>    Verzicht und Vertraulichkeitanmerkung
>>>         Diese Nachricht ist vertraulich. Sollten Sie nicht der
>>>    vorgesehene Empfaenger sein, so bitten wir hoeflich um eine
>>>    Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer
>>>    Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
>>>    Austausch von Informationen und entfaltet keine rechtliche
>>>    Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>>>    E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>>>
>>>
>>>
>>>
>>>
>>>
>>>  ------------------------------------------------------------------------
>>>    Date: Sat, 24 Apr 2010 12:21:51 +0530
>>>    Subject: Starting axis2server.sh in a different port
>>>    From: kasun147@gmail.com <ma...@gmail.com>
>>>    To: java-user@axis.apache.org <ma...@axis.apache.org>
>>>
>>>
>>>
>>>    Hi,
>>>
>>>    Is there an option to start axis2server.sh in a different port
>>>    than 8080. The '-p<port>' (-p9090) option doesn't work with
>>>    current axis2server.sh.     (As a workaround I manged to do it with
>>> editing axis2.xml)
>>>
>>>    regards,
>>>
>>>
>>>    Kasun.
>>>
>>>
>>>  ------------------------------------------------------------------------
>>>    The New Busy is not the too busy. Combine all your e-mail
>>>    accounts with Hotmail. Get busy.
>>>    <
>>> http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4
>>> >
>>>
>>>
>>
>>
>>
>> --
>> Amila Suriarachchi
>> WSO2 Inc.
>> blog: http://amilachinthaka.blogspot.com/
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>


-- 
Afkham Azeez
Software Architect & Product Manager, WSO2 WSAS; WSO2, Inc.; http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
email: azeez@wso2.com cell: +94 77 3320919
blog: http://blog.afkham.org
twitter: http://twitter.com/afkham_azeez
linked-in: http://lk.linkedin.com/in/afkhamazeez

Lean . Enterprise . Middleware

Re: Starting axis2server.sh in a different port

Posted by Demetris <de...@ece.neu.edu>.
Exactly - ok thanks Amila - I am used to changing the services.xml file 
with Tomcat ;)

Amila Suriarachchi wrote:
>
>
> On Sat, Apr 24, 2010 at 11:54 PM, D G <demetris@ece.neu.edu 
> <ma...@ece.neu.edu>> wrote:
>
>     So the only way is to modify the baseline? Then why not just fix
>     the configurable -p option?
>
>
> Even with tomcat you need to edit the services.xml file to change the 
> default port. so changing the axis2.xml should be good enough.
>
> thanks,
> Amila.
>
>
>     Kasoun why is editing the axis2.XML a workaround? Isn't that a
>     good enough soln? Or you really prefer the -p option?
>     Can you share the changes to the axis2.XML?
>
>     On Apr 24, 2010, at 9:22 AM, Martin Gainty <mgainty@hotmail.com
>     <ma...@hotmail.com>> wrote:
>
>>     bash>export AXIS2_PORT=port
>>
>>     //modify  org.apache.axis2.transport.http.server.HttpFactory.java
>>     to accept port parameter from bash
>>         private int port; 
>>         public HttpFactory(ConfigurationContext configurationContext)
>>     throws AxisFault {
>>             this.configurationContext = configurationContext;
>>             httpConfiguration =
>>     configurationContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_HTTP);
>>             port = getIntParam(PARAMETER_PORT, 6060);
>>     ............
>>     }
>>         public HttpFactory(ConfigurationContext configurationContext,
>>     int port) throws AxisFault {
>>             this(configurationContext);
>>             this.port = port;
>>         }
>>
>>     //to org.apache.axis2.transport.http.server.HttpFactory.java
>>         private int port=0;  //initialise to 0
>>         public HttpFactory(ConfigurationContext configurationContext)
>>     throws AxisFault {
>>             this.configurationContext = configurationContext;
>>             httpConfiguration =
>>     configurationContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_HTTP);
>>     //acquire the port from your environment
>>            try
>>            {
>>             this.port= new
>>     java.lang.Integer(java.lang.System.getenv("AXIS2_PORT")).intValue();
>>            }
>>            catch(java.lang.Exception excp)
>>            {
>>     //eat the exception..
>>            }
>>            if(this.port==0)
>>            {
>>             this.port = getIntParam(PARAMETER_PORT, 6060);
>>            }
>>     .................
>>     }
>>
>>     public HttpFactory(ConfigurationContext configurationContext, int
>>     port) throws AxisFault
>>     {
>>           this(configurationContext);
>>            if(port==0)
>>            {
>>     //acquire the port from your environment
>>            try
>>            {
>>             this.port= new
>>     java.lang.Integer(java.lang.System.getenv("AXIS2_PORT")).intValue();
>>            }
>>            catch(java.lang.Exception excp)
>>            {
>>     //eat the exception..
>>            }
>>             else
>>             {
>>             this.port = port;
>>             }
>>     }
>>
>>     Mit Fruendlichen Grueben
>>     Martin Gainty
>>     ______________________________________________
>>     Verzicht und Vertraulichkeitanmerkung
>>      
>>     Diese Nachricht ist vertraulich. Sollten Sie nicht der
>>     vorgesehene Empfaenger sein, so bitten wir hoeflich um eine
>>     Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer
>>     Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
>>     Austausch von Informationen und entfaltet keine rechtliche
>>     Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
>>     E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>>           
>>
>>
>>
>>
>>
>>     ------------------------------------------------------------------------
>>     Date: Sat, 24 Apr 2010 12:21:51 +0530
>>     Subject: Starting axis2server.sh in a different port
>>     From: kasun147@gmail.com <ma...@gmail.com>
>>     To: java-user@axis.apache.org <ma...@axis.apache.org>
>>
>>
>>     Hi,
>>
>>     Is there an option to start axis2server.sh in a different port
>>     than 8080. The '-p<port>' (-p9090) option doesn't work with
>>     current axis2server.sh. 
>>     (As a workaround I manged to do it with editing axis2.xml)
>>
>>     regards,
>>
>>
>>     Kasun.
>>
>>     ------------------------------------------------------------------------
>>     The New Busy is not the too busy. Combine all your e-mail
>>     accounts with Hotmail. Get busy.
>>     <http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4>
>>
>
>
>
>
> -- 
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: Starting axis2server.sh in a different port

Posted by Amila Suriarachchi <am...@gmail.com>.
On Sat, Apr 24, 2010 at 11:54 PM, D G <de...@ece.neu.edu> wrote:

> So the only way is to modify the baseline? Then why not just fix the
> configurable -p option?
>

Even with tomcat you need to edit the services.xml file to change the
default port. so changing the axis2.xml should be good enough.

thanks,
Amila.

>
> Kasoun why is editing the axis2.XML a workaround? Isn't that a good enough
> soln? Or you really prefer the -p option?
> Can you share the changes to the axis2.XML?
>
> On Apr 24, 2010, at 9:22 AM, Martin Gainty <mg...@hotmail.com> wrote:
>
> bash>export AXIS2_PORT=port
>
> //modify  org.apache.axis2.transport.http.server.HttpFactory.java to accept
> port parameter from bash
>     private int port;
>     public HttpFactory(ConfigurationContext configurationContext) throws
> AxisFault {
>         this.configurationContext = configurationContext;
>         httpConfiguration =
> configurationContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_HTTP);
>         port = getIntParam(PARAMETER_PORT, 6060);
> ............
> }
>     public HttpFactory(ConfigurationContext configurationContext, int port)
> throws AxisFault {
>         this(configurationContext);
>         this.port = port;
>     }
>
> //to org.apache.axis2.transport.http.server.HttpFactory.java
>     private int port=0;  //initialise to 0
>     public HttpFactory(ConfigurationContext configurationContext) throws
> AxisFault {
>         this.configurationContext = configurationContext;
>         httpConfiguration =
> configurationContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_HTTP);
> //acquire the port from your environment
>        try
>        {
>         this.port= new
> java.lang.Integer(java.lang.System.getenv("AXIS2_PORT")).intValue();
>        }
>        catch(java.lang.Exception excp)
>        {
> //eat the exception..
>        }
>        if(this.port==0)
>        {
>         this.port = getIntParam(PARAMETER_PORT, 6060);
>        }
> .................
> }
>
> public HttpFactory(ConfigurationContext configurationContext, int port)
> throws AxisFault
> {
>       this(configurationContext);
>        if(port==0)
>        {
> //acquire the port from your environment
>        try
>        {
>         this.port= new
> java.lang.Integer(java.lang.System.getenv("AXIS2_PORT")).intValue();
>        }
>        catch(java.lang.Exception excp)
>        {
> //eat the exception..
>        }
>         else
>         {
>         this.port = port;
>         }
> }
>
> Mit Fruendlichen Grueben
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>
>
>
>
>
>
>
> ------------------------------
> Date: Sat, 24 Apr 2010 12:21:51 +0530
> Subject: Starting axis2server.sh in a different port
> From: <ka...@gmail.com>kasun147@gmail.com
> To: <ja...@axis.apache.org>java-user@axis.apache.org
>
>
> Hi,
>
> Is there an option to start axis2server.sh in a different port than 8080.
> The '-p<port>' (-p9090) option doesn't work with current axis2server.sh.
> (As a workaround I manged to do it with editing axis2.xml)
>
> regards,
>
>
> Kasun.
>
> ------------------------------
> The New Busy is not the too busy. Combine all your e-mail accounts with
> Hotmail. Get busy.<http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4>
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Re: Starting axis2server.sh in a different port

Posted by Kasun Indrasiri <ka...@gmail.com>.
You can change the parameter under '<transportReceiver> in axis2.xml.
To change  default port to 7070. ->

    <transportReceiver name="http"

class="org.apache.axis2.transport.http.SimpleHTTPServer">
        <parameter name="port">7070</parameter>

regards,
Kasun

On Sat, Apr 24, 2010 at 11:54 PM, D G <de...@ece.neu.edu> wrote:

> So the only way is to modify the baseline? Then why not just fix the
> configurable -p option?
>
> Kasoun why is editing the axis2.XML a workaround? Isn't that a good enough
> soln? Or you really prefer the -p option?
> Can you share the changes to the axis2.XML?
>
> On Apr 24, 2010, at 9:22 AM, Martin Gainty <mg...@hotmail.com> wrote:
>
> bash>export AXIS2_PORT=port
>
> //modify  org.apache.axis2.transport.http.server.HttpFactory.java to accept
> port parameter from bash
>     private int port;
>     public HttpFactory(ConfigurationContext configurationContext) throws
> AxisFault {
>         this.configurationContext = configurationContext;
>         httpConfiguration =
> configurationContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_HTTP);
>         port = getIntParam(PARAMETER_PORT, 6060);
> ............
> }
>     public HttpFactory(ConfigurationContext configurationContext, int port)
> throws AxisFault {
>         this(configurationContext);
>         this.port = port;
>     }
>
> //to org.apache.axis2.transport.http.server.HttpFactory.java
>     private int port=0;  //initialise to 0
>     public HttpFactory(ConfigurationContext configurationContext) throws
> AxisFault {
>         this.configurationContext = configurationContext;
>         httpConfiguration =
> configurationContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_HTTP);
> //acquire the port from your environment
>        try
>        {
>         this.port= new
> java.lang.Integer(java.lang.System.getenv("AXIS2_PORT")).intValue();
>        }
>        catch(java.lang.Exception excp)
>        {
> //eat the exception..
>        }
>        if(this.port==0)
>        {
>         this.port = getIntParam(PARAMETER_PORT, 6060);
>        }
> .................
> }
>
> public HttpFactory(ConfigurationContext configurationContext, int port)
> throws AxisFault
> {
>       this(configurationContext);
>        if(port==0)
>        {
> //acquire the port from your environment
>        try
>        {
>         this.port= new
> java.lang.Integer(java.lang.System.getenv("AXIS2_PORT")).intValue();
>        }
>        catch(java.lang.Exception excp)
>        {
> //eat the exception..
>        }
>         else
>         {
>         this.port = port;
>         }
> }
>
> Mit Fruendlichen Grueben
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
>
>
>
>
>
>
>
> ------------------------------
> Date: Sat, 24 Apr 2010 12:21:51 +0530
> Subject: Starting axis2server.sh in a different port
> From: <ka...@gmail.com>kasun147@gmail.com
> To: <ja...@axis.apache.org>java-user@axis.apache.org
>
>
> Hi,
>
> Is there an option to start axis2server.sh in a different port than 8080.
> The '-p<port>' (-p9090) option doesn't work with current axis2server.sh.
> (As a workaround I manged to do it with editing axis2.xml)
>
> regards,
>
>
> Kasun.
>
> ------------------------------
> The New Busy is not the too busy. Combine all your e-mail accounts with
> Hotmail. Get busy.<http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4>
>
>

Re: Starting axis2server.sh in a different port

Posted by D G <de...@ece.neu.edu>.
So the only way is to modify the baseline? Then why not just fix the  
configurable -p option?

Kasoun why is editing the axis2.XML a workaround? Isn't that a good  
enough soln? Or you really prefer the -p option?
Can you share the changes to the axis2.XML?

On Apr 24, 2010, at 9:22 AM, Martin Gainty <mg...@hotmail.com> wrote:

> bash>export AXIS2_PORT=port
>
> //modify  org.apache.axis2.transport.http.server.HttpFactory.java to  
> accept port parameter from bash
>     private int port;
>     public HttpFactory(ConfigurationContext configurationContext)  
> throws AxisFault {
>         this.configurationContext = configurationContext;
>         httpConfiguration = configurationContext.getAxisConfiguration 
> ().getTransportIn(Constants.TRANSPORT_HTTP);
>         port = getIntParam(PARAMETER_PORT, 6060);
> ............
> }
>     public HttpFactory(ConfigurationContext configurationContext,  
> int port) throws AxisFault {
>         this(configurationContext);
>         this.port = port;
>     }
>
> //to org.apache.axis2.transport.http.server.HttpFactory.java
>     private int port=0;  //initialise to 0
>     public HttpFactory(ConfigurationContext configurationContext)  
> throws AxisFault {
>         this.configurationContext = configurationContext;
>         httpConfiguration = configurationContext.getAxisConfiguration 
> ().getTransportIn(Constants.TRANSPORT_HTTP);
> //acquire the port from your environment
>        try
>        {
>         this.port= new java.lang.Integer(java.lang.System.getenv 
> ("AXIS2_PORT")).intValue();
>        }
>        catch(java.lang.Exception excp)
>        {
> //eat the exception..
>        }
>        if(this.port==0)
>        {
>         this.port = getIntParam(PARAMETER_PORT, 6060);
>        }
> .................
> }
>
> public HttpFactory(ConfigurationContext configurationContext, int  
> port) throws AxisFault
> {
>       this(configurationContext);
>        if(port==0)
>        {
> //acquire the port from your environment
>        try
>        {
>         this.port= new java.lang.Integer(java.lang.System.getenv 
> ("AXIS2_PORT")).intValue();
>        }
>        catch(java.lang.Exception excp)
>        {
> //eat the exception..
>        }
>         else
>         {
>         this.port = port;
>         }
> }
>
> Mit Fruendlichen Grueben
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene  
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede  
> unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig.  
> Diese Nachricht dient lediglich dem Austausch von Informationen und  
> entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten  
> Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den  
> Inhalt uebernehmen.
>
>
>
>
>
>
> Date: Sat, 24 Apr 2010 12:21:51 +0530
> Subject: Starting axis2server.sh in a different port
> From: kasun147@gmail.com
> To: java-user@axis.apache.org
>
>
> Hi,
>
> Is there an option to start axis2server.sh in a different port than  
> 8080. The '-p<port>' (-p9090) option doesn't work with current  
> axis2server.sh.
> (As a workaround I manged to do it with editing axis2.xml)
>
> regards,
>
>
> Kasun.
>
> The New Busy is not the too busy. Combine all your e-mail accounts  
> with Hotmail. Get busy.

RE: Starting axis2server.sh in a different port

Posted by Martin Gainty <mg...@hotmail.com>.
bash>export AXIS2_PORT=port

//modify  org.apache.axis2.transport.http.server.HttpFactory.java to accept port parameter from bash 
    private int port;  
    public HttpFactory(ConfigurationContext configurationContext) throws AxisFault {
        this.configurationContext = configurationContext;
        httpConfiguration = configurationContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_HTTP);
        port = getIntParam(PARAMETER_PORT, 6060);
............
}
    public HttpFactory(ConfigurationContext configurationContext, int port) throws AxisFault {
        this(configurationContext);
        this.port = port;
    }

//to org.apache.axis2.transport.http.server.HttpFactory.java
    private int port=0;  //initialise to 0
    public HttpFactory(ConfigurationContext configurationContext) throws AxisFault {
        this.configurationContext = configurationContext;
        httpConfiguration = configurationContext.getAxisConfiguration().getTransportIn(Constants.TRANSPORT_HTTP);
//acquire the port from your environment 
       try
       {
        this.port= new java.lang.Integer(java.lang.System.getenv("AXIS2_PORT")).intValue();
       }
       catch(java.lang.Exception excp)
       {
//eat the exception..
       }
       if(this.port==0) 
       {
        this.port = getIntParam(PARAMETER_PORT, 6060);
       }
.................
}

public HttpFactory(ConfigurationContext configurationContext, int port) throws AxisFault 
{
      this(configurationContext);
       if(port==0) 

       {

//acquire the port from your environment 


       try


       {


        this.port= new java.lang.Integer(java.lang.System.getenv("AXIS2_PORT")).intValue();


       }


       catch(java.lang.Exception excp)


       {


//eat the exception..


       }
        else
        {
        this.port = port;
        }
}

Mit Fruendlichen Grueben
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.






Date: Sat, 24 Apr 2010 12:21:51 +0530
Subject: Starting axis2server.sh in a different port
From: kasun147@gmail.com
To: java-user@axis.apache.org


Hi,
Is there an option to start axis2server.sh in a different port than 8080. The '-p<port>' (-p9090) option doesn't work with current axis2server.sh. (As a workaround I manged to do it with editing axis2.xml)

regards,

Kasun. 		 	   		  
_________________________________________________________________
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4