axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Programmatically changing the Axis2 http port
Date Mon, 03 Jun 2013 04:11:41 GMT
Hi Shameera:

So I checked again, and what my code does is as follows (written in Java here for ease of

AxisServer server = new AxisServer();

// some server.deployService(…) calls


Then, when I do 


it returns 


But when I do 

curl http://localhost:7171/axis2/services/Weather?wsdl

I get 

curl: (7) couldn't connect to host

If I do 

curl http://localhost:6060/axis2/services/Weather?wsdl

instead, I get the wsdl's XML.

So, somehow, the change of the port parameter doesn't "stick". Any suggestions?


On Jun 2, 2013, at 11:56 AM, Ingolf Krueger <> wrote:

> Hi Shameera:
> Thanks for your kind response.
> I believe I did it exactly like you showed in your code. I took the configuration context
from the newly instantiated Axis server and manipulated it the way you showed. Then, I added
the services (implicitly starting the server).
> When I then connected the client, I always got connection refused, even if I used the
above approach to set it to the default port of 6060...
> I'll show you the code when I am back at my machine.
> Thanks,
> Ingolf
> On Jun 2, 2013, at 11:17 AM, Shameera Rathnayaka <> wrote:
>> Hi Ingolf,
>> Transport listeners are initiated inside the org.apache.axis2.engine.ListenerManager#init
method. you can change transport parameters by using below line of code here.
>> configctx.getAxisConfiguration().getTransportsIn().get("http").getParameter("port").setValue(8090);
 // here i have set http listener port to 8090
>> You can access Axis Configuration from configuration context, Then you can retrieve
all transportIn and transportOut configurations and manipulate them according to your need.
>> Cheers,
>> Shameera.
>> On Sun, Jun 2, 2013 at 7:37 AM, Ingolf Krueger <> wrote:
>> Hi there --
>> I am trying to use Axis2 in embedded mode from within Clojure, and want to programmatically
change the http port at which my services are presented so as to be able to run multiple independent
Axis2 servers on the same box.  I understand that this could be accomplished using axis2.xml,
but I'd prefer to accomplish it via code.
>> I have searched the archives and documents, but was unable to locate a suitable example/tutorial
to study.
>> Any suggestions on where I could look would be highly appreciated!
>> Thanks, and best regards,
>> Ingolf
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
>> -- 
>> Best Regards,
>> Shameera Rathnayaka.
>> email: shameera AT , shameerainfo AT
>> Blog :

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message