Search code examples
javaweb-servicesjakarta-eeapache-axis

Axis2 Change the default service port


Is there any way to override the axis default port specified in axis2.xml through code?

I want to initialize it with a dynamic value, keeping all other settings intact.


Solution

  • I think you should use AxisServletListener#setPort(int)

    Read javadoc here:

    http://axis.apache.org/axis2/java/core/api/org/apache/axis2/transport/http/AxisServletListener.html#setPort(int)