Its not clear what you mean by "WebSphere Admin Server Port number." Do you mean the admin console HTTP transport port, the
SOAP connector, etc? You also don't say whether you are using WAS ND or base, so I assume you are using base. With base, each application server has an admin console application. With ND, there is only one admin console in the DM server (dmgr).
All server endpoint addresses are stored in $WAS_HOME/config/cells/<your cell>/nodes/<node name>/serverindex.xml.
HTTP transport ports can be found in $WAS_HOME/config/cells/<your cell>/nodes/<node name>/servers/<server name>/server.xml. The HTTP HTTPTransport entry will have attribute sslEnabled="false", while the HTTPS HTTPTransport entry will have attribute sslEnabled="true".
There is no direct API to get a port, but you could use the WebSphere management classes to do so (the same classes the admin console and wsadmin program use). WebSphere javadoc can be browsed at
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/javadoc/ae/index.html. You might also try searching developerworks
http://www7b.software.ibm.com/wsdd/ for help.
Bill Lasley
Versant Corp.
http://www.versant.com