How to get Host name and port inside UDF
Hi,
I want to access the Host and port in UDF to pass it to a link http://host:port/AdapterFramework/ChannelAdminServlet?party=&service=&channel=*&action=status dynamically.
How can I acieve it?
Manisha
Hi
With this code. I am getting error:
try
java.net.InetAddress addr = java.net.InetAddress.getLocalHost();
String host = addr.getCanonicalHostName();
catch (UnknownHostException e){}
if (ProcessMode.equals("P"))
try{
String xyz="/AdapterFramework/ChannelAdminServlet?party=&service=&channel="Name"&action=stop";
URL server = new URL("http", host, 8XXX, xyz);
tring userPassword =Userid + ":" + Password;
String encoding = new sun.misc.BASE64Encoder().encode (userPassword.getBytes());
URLConnection uc=server.openConnection();
uc.setRequestProperty ("Authorization", "Basic " + encoding);
BufferedReader br = new BufferedReader(new InputStreamReader(uc.getInputStream()));
while ((inputLine = br.readLine()) != null)
output+=inputLine;
br.close();
catch (Exception e){}
ERROR:
cannot resolve symbol
symbol : variable host location: class com.sap.xi.tf._MM_CommunicationChannel_Stop
_ URL server = new URL("http", host, 8xxx, xyz);
^ 1 error
Any other way to get host and port?
Manisha
Similar Messages
-
Getting host name and port number from application
Does anyone know how I would be able to get the host name
and port number from an application launched by java webstart ?
This is the host and port of the URL that this application is launched from.A couple of suggestions:
-The note is about 6.40. Doesn't fit for your server
-Don't!
-Reinstall!
Regards,
Benny -
Getting host name and port number from an application
Does anyone know how I would be able to get the host name
and port number from an application launched by java webstart ?
This is the host and port of the URL that this application is launched from.A couple of suggestions:
-The note is about 6.40. Doesn't fit for your server
-Don't!
-Reinstall!
Regards,
Benny -
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 -
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.
-
How to get Host name and SQL Instance Name by T-SQL
I am using SQL 2000, 2005 and 2008. I have few multi instances SQL servers. I would like to gather following information:
Host Name
SQL Instance Name
SQL Version
Server1
Server1
SQL 2000
Server1
Server1\ABC
SQL 2005
Server1
Server1\XYZ
SQL 2008
Server2
Server2
SQL 2008
Is there any way I can get it by T-SQL? Any help would be appreciated.
Thanks
SaumenSELECT
SERVERPROPERTY('MachineName') AS [ServerName],
SERVERPROPERTY('ServerName') AS [ServerInstanceName],
SERVERPROPERTY('InstanceName') AS [Instance],
SERVERPROPERTY('Edition') AS [Edition],
SERVERPROPERTY('ProductVersion') AS [ProductVersion],
Left(@@Version, Charindex('-', @@version) - 2) As VersionName
|
Blog: MSBICOE.com |
MCITP - BI, SQL Developer & DBA
Hate to mislead others, if I'm wrong slap me. Thanks! -
How to get the Host name and port number
Hi all,
I am working in xRPM. I need to get the server name, host name & port number for the portal and i need to diaplay as a link in the Workflow step. I cant give the portal link as static, as it will vary depends on the DEV, QUAL, PROD. Is there any FM or class is available, so i can get the server name, port no. for my purpose?.
Regards,
VinothHi Kanagaraja,
My client has configured the portal and backend in different stack. So when i execute the FM you provided and with class: CL_HTTP_SERVER, CL_WD_UTILITIES, i am getting only the backend host name and port no. not the portal's info. So please help is there any way we can get the portal's info.
Thanks for your reply.
-Vinoth -
SMICM and WAS host name and port
Hi all,
Can someone please throw some light on the activity WAS host name and port in port... the question is:
Q. The information about host name and port is available in Tx SMICM, looking there in my case I find port 80xx whereas the portal runs on port 500xx. What value should we enter in the port field of "Connecting to a WAS system" in portal?
Is it what is given in SMICM or we should use 500xx?
Regards.(80xx assuming you're starting Web Dynpro ABAP apps, integrated ITS and BSPs.)
Thanks Michael,
How about in case when it's not ABAP it's java apps i.e. when we are connecting BI to portal with SSO on dual stake. BI uses the 500xx port on FQDN and thus it's confusing me, whether to use 80xx or 500xx (when 500xx seems the port in use on BI portal).
Hope I made my point clear.
Regards. -
ITS host name and port.
Hi Experts,
What is integrated ITS host name and port for portal services? Where can I find the ITS Parameters to create a SYSTEM in Portal?
Regards,
Amit.Hi Amit,
GO to SMICM toce in R3 system and clcik on (F) servicess button , u will get ITS host path and port number .
GIve this details in System object ITS .
ITS host name : from SMICM
ITS path should be /sap/bc/gui/sap/its/webgui
Surekha. -
Replacing Host Name and Port number throughout Environments
So I am currently working on a project that have several classes using simple JDBC code. I'm switching all of it to use JNDI instead of what is currently being used. I'm using Weblogic and the plan is to have the code run in a cluster.
Here is a code Snippet of some of the code.
Context ctx = null;
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL,
"t3://hostname:port");
My problem lies in the the "t3://hostname:port" String. I don't want to hardcode that since I know its bad code practice but my question is what is the best way to replace that with the Host Name and Port number as I move environments. Should I have a Class with a Static Variable and just reference that through the other classes or should I put it in some Property file and read the value from there? Any insight into this would be greatly appreciated.
Thank you.would it be something like this?
Properties properties = new Properties();
try {
properties.load(new FileInputStream("src/jndi.properties"));
String url = properties.getProperty("url");
System.out.println(url );
} catch (IOException e) {
} -
How to change host name and domain name in installed Cisco Meeting Place Express 2.0?
Hi
I have Cisco Meeting Place Express 2.0 installed on server. Meting Place uses Linux (Red Hat) as base operation system. Please tell me how I can change host name and domain name for Meeting Place Express application to integrate it into corporate domain infrastructure.
Thanks in advance!!!
Sincerely yours
Sergey BondarenkoHi
Thanks for your attention for my humble problem.
I have performed Meeting Place Express configuration through the “net” command.
But now unfortunately I can't connect to meeting place through web browser. I just get blank page.
Though I can reach the server with help of ssh. I think my DNS works properly because I can resolve the ip address of cumpxvoice .uclab.com and cumpxweb. uclab.com with help of dig command.
Have you any idea?
A lot of thanks in advance!!
Sincerely yours Sergey Bondarenko
Here I have printed the net configuration output of Cisco meeting Place Express:
[root@cumpxvoice root]# net
This is the MeetingPlace Express network configuration utility.
Up to the point where you save changes, it is safe to hit ^C to get
out at any time, in which case nothing will have changed.
1) List current configuration
2) Configure Ethernet port 1
3) Configure Ethernet port 2
4) Configure service bindings
5) Set host names
6) Set domain name
7) Configure DNS service
8) Configure NTP service
9) Configure routing
10) Done
Select: 1
Primary/audio host name: cumpxvoice
HTTP host name: cumpxvoice
RTMP host name: cumpxweb
Domain name: uclab.com
Service bindings:
Audio: port 1 (eth0)
Web browsing (HTTP): port 1 (eth0)
Web conferencing (RTMP): port 2 (eth1)
Port 1 (device eth0):
IP Address: 10.62.60.116
Network mask: 255.255.255.0
Default gateway: 10.62.60.1
Link setting: autoneg on
Port 2 (device eth1):
IP Address: 10.62.60.117
Network mask: 255.255.255.0
Default gateway: 10.62.60.1
Link setting: autoneg on
Static routes:
Destination Gateway Network mask Port
0.0.0.0 10.62.60.1 0.0.0.0 1
DNS Servers:
10.62.60.115
10.0.1.4 -
Getting host name and IP address
I have develop different types of forms which resides on server and clients are acessing it.Now from my end i want to track that which user is accessing my forms on the server i.e i want to know the client IP address and host name.When the user execute some query on the database then i will get it easily using sys_context function but if it perform some functions within the form and i catch the host name then it returns the server host name where the actual forms resides not the client host name and i want to know the client host name and IP address who is running the forms.Plz let me know the way so i can do that easily .
thanksHi Grant,
I want to get ip/address host name of reports server, sitting on forms server.
can you tell me how to do this.
in a web base environment.
i have several report server instances running on different machines.
when i run a report using RUN_REPORT_OBJECT using report_server=mac_rep1
i want to know mac_rep1 resides on which host/ip machine.
regds -
How to Get Host Name Domain Name : Port No. for App Server From Forms
Forms 10g r2
I am looking to run various forms and reports from within a form. I am using web_show_document. I am passing the URL which includes "http://{host name . domain name : port number}/forms/frmservlet?config=schema1_schema2 form=ab0001 p_param1=151 p_param2=1409 p_x=X". My schema1_schema2 config section in formsweb.cfg contains user name, password, connection information.
All works well when the actual host_name.domain_name:port_no are hard-coded within a string that is used for the URL with web_show_document, but I need to be able to distribute the form without hard-coding the host_name, domain_name, and port_no.
I have looked in forms help for application properties, system variables, and within this forum for the built-in or system variable that returns this information, but have not found it.
Can someone please tell me how I can get this information (host_name, domain_name, and port_number for the application server on which the form is currently running) so that I can build this working URL dynamically?
I appologize if I have overlooked it within this forum.
Thanks greatly,
JamesThanks, Rosario.
As it turns out, I don't need the IAS Host_Name, Domain_name, and Port_No. Instead, I can do what I described by stripping off precisely THAT information leaving a URL that looks like:
v_url := "/forms/frmservlet?config=schema1_schema2 form=ab0001 p_param1=151 p_param2=1409 p_x=X";
WEB.SHOW_DOCUMENT(v_url,'_blank');
The original IAS Host_Name, Domain_Name, and Port_No. are assumed and the named config -- schema1_schema2 is still properly referenced so as to use the username/password and connect string to the 2nd schema. This is done by use of the relative path. -
How to get service name and listening host to connect to oracle DB server?
I have successfully installed oracle db client 10g release 2 on my winXP. But when I tried to use Net Congiguration Assistance to connect to oracle db server. I do not know what is the "service name" and listening "host" I supporse to enter. Where can I get the names?
PLEASE HELP! THANKS!machine name or IP = machine name or IP address of the database server
To know the service name do the following on the server :
$ lsnrctl services
LSNRCTL for Linux: Version 10.1.0.3.0 - Production on 30-DEC-2005 00:24:28
Copyright (c) 1991, 2004, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "test10" has 1 instance(s).
Instance "test10", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
The command completed successfully
$The service name is test10 in my case. Of course you have to use yours. -
How to get host name in the workflow?
Hi,
I've a requirement where I need to get CQ Inbox url (http://<hostname>:<port>/inbox) in my custom workflow process. I thought of configuring url to some node and retriving from there.. but It's not the good approach as host name will be different for differnt CQ environments. So what is the best way of getting inbox url?
Env: CQ 5.6
Thanks
SivaYep Justin, If the configuration is wrong, any link generated would also be wrong.. I mean, default configuration will be some thing like..
I mean, I can change those configurations as per my instance host name, right?
Example: my instance's host url is: mytest:1501
So I would like to update the same in configurations ..
Maybe you are looking for
-
Pages on my iPad3 has become very slow to open documents after upgrading to ios7. I posted on here about this a few weeks back and someone suggested force-closing Pages -- and that does indeed enable me to open things -- but I have had to force-close
-
Creating a Pocast to be hosted somewhere other than .mac
Anyone had any experience of creating iweb pages with a podcast and hosting on site other than a .mac? I know I can save the site/podcast to the desktop and then add/upload to an existing website. When iWeb saves locally it asks for the url for the s
-
DVD-Rom drive in Satellite C655-S5128 not working properly in Windows 8
I recently upgraded my system from Windows 7 to Windows 8. However, the DVD-Rom drive after the upgrade no longer works properly -- it now treats the pre-recorded disk as if it was completely blank. I tried reinstalling the Toshiba Disc Creator, but
-
i insert my cd into the drive and usually something comes up in itunes that says "would you like to import these songs into your library" and nothing is coming up like the cd isn't even in there. can someone help me?
-
How do I download in Safari and read pdf documents on ipad?
Have brand new iPad and want to download a pdf document using Safari as browser and read on the iPad. I have Adobe Reader app and Files app. iCloud is enabled. Reading List only shows download page. I can download this document quickly on my Lapt