Topic:   How to call server host name ie -localhost- while writing wm code
Jul 22, 2014 15:28 8 Replies 1068 Views skentilt
Prev Next
Topic Replies (8)
  1. 1
    idnkx user

    skentilt

    How to call server host name ie "localhost" while writing wm code logic in developer? Note my restriction I can't enable wmroot package as well as can't add entry in extend setting in server IS page Is there any other way or logic to get server host name in code.. Thanks

    1
    idnkx user

    Ansari

    So you want to write a code that will give you the IS host name as a result ?

    1
    idnkx user

    Ansari

    If that is the case ...assuming that you are running 8.x + environment , you can use the service pub.utils:getServerProperty and provide java.rmi.server.hostname as input , it should return the hostname of the server on which you're running the service ..

    1
    idnkx user

    Srinik

    If WmRoot is disabled then it will cause lot of problems, your integration server will not start successfully, because no listener ports will be available,except diagnostic port. Anyway, as per your requirement, if you want to use host name in your code then, there are so many ways to get it ..one is when you have TN installed then in that case use wm.tn.ping service to get the server name or you can use the service which Dhrubhojyoti mentioned above . My suggestion is to never disable or delete the WmRoot package.

    1
    idnkx user

    Asadul

    WMROOT and WMART both packages are necessary for webmethods .........

    1
    idnkx user

    veena

    I guess you are looking some alternative to use from Developer when WmRoot is not enabled for Developer ACL. You can use getServerProperty service from WmPublic package which will give you the extended setting values as output. In this case, you need to use watt.net.localhost as input. This property must be explicitly defined by IS administrator before you can use else it will be display null value....hope it answered your question..

    1
    idnkx user

    skentilt

    sorry for delay I am using 7x what if I am using wm.server.admin:getServerHost in flow step will there be any issue when I move code to higher regions .. note wMroot package is hidden and can't update extend setting wch will impact other projects as they may be using same property .. I m suprise I didn't see any entry in extend setting as well any where in IS admin ..any idea where it will be located ?

    1
    idnkx user

    skentilt

    Is there any way to change server host name while RUNTIME this value is getting populated from internal IS server in 7x not seeing any entry in extend setting nor any where in IS admin page but still I am able to see even not able to capture or debug ths fields while runing in developer session.

Leave a Reply
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect