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: kasun...@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

Reply via email to