Retriving server IP and port from webservice context

Hello
In a JSP page its possible to do this:
request.getServerName()
request.getServerPort()
In order to retrieve the server IP and port.
How is this done in a webservice context?
Oliver Billing
DIF

No. The way to get that information is to go to the database administrator and ask.

Similar Messages

  • How to get server hostname and port from web form

    Hi All,
    I need to find out server hostname and port number
    from 9i form.
    That is if the form was called via:
    http://myserver.com:1234/f90servlet?form=test,
    i would like to call some
    GET_XXX_PROPERTY(SERVER_HOSTNAME) that would return
    myserver.com
    and
    GET_XXX_PROPERTY(SERVER_PORT) that would return
    1234
    or alternatively
    GET_XXX_PROPERTY(SERVER_URL) that would return
    complete URL, so that i can parse it myself.
    Does anything like this exist? If not,would be
    possible to get that information from any Java
    function via java importer?
    BR,
    Robert
    BR,
    Robert

    Robert,
    I'd add the code as a Java Bean in Forms and get this information from the Forms request URL.
    Add the following bean to a Canvas and make it a size of 1x1 pixel so taht it appears hidden
    import java.applet.Applet;
    import java.net.URL;
    import oracle.forms.handler.IHandler;
    import oracle.forms.properties.ID;
    import oracle.forms.ui.VBean;
    public class FrmRequestInfo extends VBean
    public static final ID pGetPort = ID.registerProperty("GET_PORT");
    public static final ID pGetHost = ID.registerProperty("GET_HOST");
    public static final ID pGetProtocol = ID.registerProperty("GET_PROTOCOL");
    private String _host;
    private String _port;
    private String _protocol;
    private URL FormsURL;
    Applet m_applet;
    /*Forms settings*/
    IHandler m_handler;
    public FrmRequestInfo()
    public final void init (IHandler handler)
    super.init(handler);
    m_handler = handler;
    // get the forms applet handler
    m_applet = m_handler.getApplet();
    // initialize cookie domain to the same domain that runs Forms
    // Services
    FormsURL = m_applet.getDocumentBase();
    _host = FormsURL.getHost();
    _port = new Integer(FormsURL.getPort()).toString();
    _protocol = FormsURL.getProtocol();
    public Object getProperty(ID p0)
    if (p0 == pGetHost)
    return _host;
    else if (p0 == pGetPort)
    return _port;
    else if (p0 == pGetProtocol)
    return _protocol;
    else
    return super.getProperty(p0);
    To get the port number you call
    VarcharVariable_Port := get_custom_property('beanblock.beanname',1,'GET_PORT');
    for the hostname
    VarcharVariable_Host:= get_custom_property('beanblock.beanname',1,'GET_HOST');
    Frank
    Ps.: just wrote the bean on the fly, without testing - but I am positive that it works as similar functionality works for me in other beans.

  • How to read the J2EE server hostname and port programmatically

    Is there any API to read the J2EE server host and port programmatically? I am looking for the hostname where the components are deployed so that I can append the wsdl path to the server and create an URL.

    Hi Larry,
    there is a standard J2EE Servlet API  for your case.
    In a servlet or jsp file you can get the host and prot from the request object.
    For example in a JSP file :
    request.getScheme();
      request.getServerName()
        request.getServerPort()
    You can check the whole API here :
    http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletRequest.html#getServerName()
    Bets Regards
    Bojidar

  • How to Know Oracle server id and port

    Dear all
    I try to run oracle report in jdeveloper
    i make the java files that calling the report as from i found in the internet as follow
    OracleReportBean reportBean =
    new OracleReportBean(server id, port, null);
    reportBean.setReportServerParam(OracleReportBean.RS_PARAM_DESTYPE,"cashe");// which will be one of the [cashe - file - mail - printer]
    reportBean.setReportServerParam(OracleReportBean.RS_PARAM_DESFORMAT,"PDF"); // Which will be onr of the [HTML - HTML CSS - PDF - SPREADSHEET- RTF].
    reportBean.setReportParameter("xxx", "ssss");
    reportBean.setReportParameter("kkkk", "uu");
    String url = reportBean.getReportServerURL();
    reportBean.openUrlInNewWindow(url);
    But i do not know what is the server id and port
    and how to specify the report name in the code.
    Please help me in this issue.
    Best Regards;

    I think that the serverid and the port is the ip of your report server and the port. (default 7779)
    see this post http://sameh-nassar.blogspot.com/2010/07/call-oracle-reports-from-your-adf.html
    so I can see, the name of the report is indicated via parameter
            //launch report
            testBean.setReportServerParam(OracleReportBean.RS_PARAM_REPORT, "name_report.rdf");
            testBean.setReportServerParam(OracleReportBean.RS_PARAM_ORIENTATION, OracleReportBean.ORIENTATION_PORTRAIT);
            testBean.setReportServerParam(OracleReportBean.RS_PARAM_DESFORMAT, OracleReportBean.DESFORMAT_PDF);

  • HT201320 Once I have downloaded email on my iPad the same is not downloaded on my laptop. Have tried all settings including choosing the setting DELETE FROM SERVER:NEVER and REMOVE FROM SERVER:NEVER

    Once I have downloaded email on my iPad the same is not downloaded on my laptop. Have tried all settings including choosing the setting DELETE FROM SERVER:NEVER and REMOVE FROM SERVER:NEVER

    Hey rbrylawski, just wanted to let you know that my ipad email problems have been solved. Called Apple Sup in OZ, I'm in NZ. Daniel Barber was the support tech from heaven!! I was about to return the ipad but solving this issue reset my faith in phone support.....perhaps until I call a differnet companys phone support eh? Anyhow, for reference the fix is below.  My accounts are all POP not IMAP, and the primary smtp server setting had defaulted to have SSL switched on and the port was set to 5XX (something, cant remember). Anyhow, SSL was switched off and the port was swithced to 25. VOILÀ!!  Settings/Mail, contacts, calendars/My POP mail account/smtp/primary server/ >>> server on, no username and password,  use SSL off,  no authentication,  Server Port 25  Thanks for having a crack at it. This might help when assisting another user. Cheers Tonino

  • How to get server name and port of OSB server in a proxy service ?

    I need to get the server name and port of the OSB server inside a proxy service. How can I get this?

    You may use java callout for this purpose -
    How to get ServerName and ApplicationName in OSB (ALSB) ?
    Regards,
    Anuj

  • Application server name and port number

    Hi
    Is it possible to get the application server name(ip) and port number at runtime. Becuase i want to open an html file which is in the application server, when a button is pressed by using web.show_document ();
    Can anyone guide me please.
    Thanks in advance
    geethu

    application server name and port number

  • SDK : how to get the server adress and port ?

    Almost everything is in the title, I'm look for code to get the server URL and port where the ME is running ;o)
    There should be some standard API I guess.
    Thanks
    Regards

    Hi,
    In the code that I write I usually have access to the HTTP Request Object.
    String serverName = request.getServerName();
    String serverPort = request.getServerPort();
    Then I just do a compare on the returned value to see if I am on our Test or Production server.
    if(request.getServerName().indexOf("prodservername") >= 0)
      // PRODUCTION CODE HERE
    else
      // TEST CODE HERE
    Hope this helps,
    Mike

  • Determining Message Server Host and Port information

    Hi,
    I am working on the NWDS creating a Java WD application and I was told which Netweaver system I should work on but I was not told the Message Server Host  information neither the Port information. I ran transaction SM51 (right click->details)in the Netweaver system but the information it is not working. Even though I can telnet this server port if I go to the J2EE Engine window within the NWDS I do not see the green light. I just see "N/A". I also tried to deploy my application but I keep getting this message: "Cannot determine sdm host (is empty). Please configure your engine/sdm correctly".
    Please advice,
    Diego.

    Hi Diego,
    in order to see Message Server Host information and Port information go to SAP J2EE Engine start page: e.g. http://system-name:57100/index.html (use administrator pws).
    Then click on System Information, here on the top you can read the Message Server Host and Port.
    Hope this help you.
    Bye,
    Vito

  • How to get Server Name and port. Urgent.....

    Hi,
    Please let me know how can i get the server name and port without using request object.
    I am getting it :- request.getServerName();
    But, pl. let me know how can I get it without using this request object.
    Waiting for reply..

    I don't know of any way to trivially access that, but why do you need to do this? If you need access to that information in a method that can't see your HttpServletRequest, then perhaps your architecture has a flaw, and you'll be better off in the long run restructuring it.

  • Get report server name and port name

    J want to know if it is possibile to obtain from a form the name of the report server and the port on work.
    Infact if i use two different application server the nae of the report server change and in the script that call the report server is necesseraly using the name of the report server.
    Thank's

    if your cases are that the dev, test, production servers have different servers and databases, then you may create a table e.g., report_server_profiles(serv_name varchar2(100),ports number), it contains one record ONLY in each server's database, then in your form code only have same code that works for three of them.
    If you have two report servers, but have one database, then you may add a flag column in above table and depends on users group to set that report flag.

  • Will giving up bundling and minification in lieu of serving js and css from Azure blob be beneficial?

    Hi,
    We have an MVC web site deployed as a service on Microsoft Azure. For boosting performance some of my colleagues suggested that we scrap the bundling and minification and instead serve .js and .css files from an Azure blob instead. Please note that the solution
    does not use a CDN, merely serving the files from a blob instead of using the bundling and minification feature. 
    My take on this is that just serving the files this way will not cause any major performance benefits. Since we are not using  CDN, the files will get served from the region in which our storage is deployed all the time. Also, since they are not bundled
    and kept as individual files, the server requests will not reduce. So we are forfeiting the benefits of bundling and minification. The only benefit I see to this approach is that we can do changes to the js and css files and upload them without a need to re-deploy.
    Can anyone please tell me which of the two options is preferable in terms of performance?

    Hi Nikhil,
     Thanks for posting.
     I agree with you on this one, but again it depends on the scale of your website and the number of requests that you expect. If your page requests are low then you might as well store all the static content on the blob storage, the blob storage is very
    scalable and it will be good enough in most cases. bear in mind that each time a page request that includes a link to the storage, it counts as a storage transaction. currently, they are priced at $0.005 per 100,000 transactions, so it would be a while to
    be costly. Next step would be to expose the container over CDN to get the distributed edge caching.
      All in all there are performance benefits in using either one, just depends on careful considerations based on the expected traffic and location of your customers and users.
    you can refer to the following threads, let us know if you have any questions
    http://social.technet.microsoft.com/Forums/azure/en-US/5fc30aae-8f72-42b5-9202-3778c28033dc/best-performance-for-storing-static-files-images-css-javascript-cdn-blobstorage-or-webrole?forum=windowsazuredata
    http://stackoverflow.com/questions/6968011/storing-css-files-on-windows-azure
    Regards,
    Nithin.Rathnakar

  • Host/server name and port

    Hi,
    is there like session/repository variable that holds the server/host name and port? i would like to get these values programmatically.
    thanks.

    In my humble opinion do not see any use in setting up these details on variables. The fact that these could be used only after logging on, which will obviously need these details manually. If you require it for tracking purpose, You could do it manually, as they are going to be static at least for that session.

  • Errors with VI after down converting from 2009 to 8.x and porting from Windows to Linux

    Hi All,
    I'm pretty new to Labview so I've been trying to learn along the way. I've been tasked with porting a .VI that my supervisor developed on Windows to a Linux machine. The ultimate goal would be to build an executable that would be able to run on Linux based VMEs. The .VI was developed on Labview 2009 and the Linux machine has Labview 8.2. From what I understand I would need to downconvert the .VI in 2009 to be compatible with 8.2, then from there I would compile the .VI on 8.2 in Linux and create the executable.
    After having downconverted the .VI I tried to run the .VI to see if the program still worked/if any parts were broken. Unfortunately, it seems like after having downconverted and porting to Linux the program is unable to communicate over TCP/IP with the module that the program was designed to work with. My supervisor ran the debugging application where it showed the progress of the data as it travelled along the block diagram and it seems to break at the TCP write blocks.
    The error that I've recieved was Error 56 at TCP Read in WriteThenReadRegister.vi->E_LINAC_BPM_REV.1.0.vi
    Possible reasons: labview: the network operation exceeded the user-specified or system time limit.
    We've tested the connection outside of Labview and the Linux VME can definitely communicate with the module in xterm.
    Can anyone point me in the right direction to start trouble shooting this? 
    When I performed the downconvert operation I recieved a bunch of warnings that stated:
    C:\BPM_Labview_Files\My_LabVIEW\New folder\E_LINAC_BPM_Rev.1.0 Folder\E_LINAC_BPM_Rev.1.0.vi (E_LINAC_BPM_Rev.1.0.vi)
    The object "Increment" does not support output configuration in the previous version.
    The object "Divide" does not support output configuration in the previous version.
    The object "Increment" does not support output configuration in the previous version.
    The object "Divide" does not support output configuration in the previous version.
    The object "Divide" does not support output configuration in the previous version.
    The object "Multiply" does not support output configuration in the previous version.
    The object "Divide" does not support output configuration in the previous version.
    The object "Increment" does not support output configuration in the previous version.
    The object "Divide" does not support output configuration in the previous version.
    The object "Increment" does not support output configuration in the previous version.
    The object "Divide" does not support output configuration in the previous version.
    The object "Increment" does not support output configuration in the previous version.
    The object "Divide" does not support output configuration in the previous version.
    The object "Increment" does not support output configuration in the previous version.
    The object "Increment" does not support output configuration in the previous version.
    The object "Divide" does not support output configuration in the previous version.
    The object "Boolean Array To Number" does not support output configuration in the previous version.
    The object "Increment" does not support output configuration in the previous version.
    The object "Multiply" does not support output configuration in the previous version.
    The object "Boolean Array To Number" does not support output configuration in the previous version.
    The object "Boolean Array To Number" does not support output configuration in the previous version.
    The object "Increment" does not support output configuration in the previous version.
    The object "Increment" does not support output configuration in the previous version.
    C:\BPM_Labview_Files\My_LabVIEW\New folder\E_LINAC_BPM_Rev.1.0 Folder\PowerScan.vi (PowerScan.vi)
    The object "Multiply" does not support output configuration in the previous version.
    The object "Multiply" does not support output configuration in the previous version.
    The object "Multiply" does not support output configuration in the previous version.
    The object "Multiply" does not support output configuration in the previous version.
    The object "Subtract" does not support output configuration in the previous version.
    Thanks in advance,
    Jason.

    I guess I should also post the .VIs in case someone could give some insight as to what's breaking.
    Again, I need to downconvert this from 2009 to 8.2 to run on a linux machine.
    In the mean time I'll be playing around with the "save as previous version" and the tool kit options.
    Thanks again in advance.
    Jason.
    Attachments:
    E_LINAC BPM 2009.zip ‏266 KB

  • How to determine the Message Server ipaddress and Port Num

    Hi All,
    I installed SAPR/3 4.7EE on windows with Local Installtion on windows and the SystemNumber is 00.
    I am developing one SAP Load Balancing System Object in the Netweaver Portals,at the time of creating it is asking the values of Message Server IP addess and the Port number.
    Can i give the same ipaddress of SAP R/3 server as Message Server Ip or its different? If it is different, How can we determine the Message Server IP addess and the Port number?
    Regds
    Phanikumar

    Hi Pahani,
    Message server ip is nothing but your server IP if it is stand alone and port is 3600.
    if you want to check the info got to tcode SMMS>GOTO tab select PARAMETERS>display.it will show the info.
    cheers
    Shyam.

Maybe you are looking for