How to determine SMTP hostname, and port?
I need create e-mail configure option in my application. And I have to determine what settings of e-mail is installed.
Regards Kostya!
Hi Kostyal,
check out the interesting posting done by Jornica at http://jornica.blogspot.com/2007/01/apex-system-preferences.html
Patrick
Check out my APEX-blog: http://inside-apex.blogspot.com
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,
RobertRobert,
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 determine server host and server port
Dear Experts.
How to determine server host and server port where Webdynpro application is working.
If the url is following
http://sapr3dm:50500/webdynpro/dispatcher/local/ForecastingPowerProject2/NewObjectConnection?SAPtestId=6
How to receive sapr3dm and 50500Hi,
May be of use
WDProtocolAdapter.getProtocolAdapter().getRequestObject().getServerName();
WDProtocolAdapter.getProtocolAdapter().getRequestObject().getServerPort();
Regards
Ayyapparaj -
hello colleagues,
In the phase Connect Diagnostics dont show the Agent available in SLD, but when go to SLD i have the agents,
Error,
Connect Diagnostics Agent
The table does not contain any data
Agent availables in all SLD
SOAP:1.007 SRT: Unupported xstream found: ("HTTP Code 401 : Unauthorized")
Web service invocation problem on host hostname and port 8000 protocol : http logical port name : LP_WS_SMDAGENT_MONITORING
ThanksOK, then pls follow below steps;
- Go to step 'Create Users' in solman_setup System Preparation scenario and make sure the user SM_INTERN_WS has a green status. Use the 'Test Login' button to make sure the user is not locked and has correct credentials maintained in solman_setup
- Immediately after checking the user status, navigate to Configure Connectivity->Enable Web Services and execute again the 'Create Logical Ports' automatic activity, in order to propagate the correct credentials to the Logical Port definitions.
- If the above operation is not successful, repeat the two steps above, providing a different user Id in 'Create Users' step, eg SM_INTERN_W1. This will prevent situations where the user gets locked by Logical Ports using an obsolete password.
Let me know the results.
Regards,
Vivek -
Getting Proxy name and proxy port using Hostname and port
Hi Colleagues,
I my Application i am consuming webserice and i am setting proxy host and proxy port using the below code :
httpItf = HTTPControlFactory.getInterface(port);
httpItf.setHTTPProxy("proxy", 8080);
But this "Proxy" is getting changed if the application is deployed to another network. (like some other landscape)
So Could it be possible to get the proxy dynamically depending on the Hostname and port.
such that it should automatically pick up the "ProxyHost" and "Proxy port".........depending upon the system it runs .
Please help me out here
Thanks & Regards
Swetha
Edited by: Swetha Nellore on Sep 17, 2009 7:52 AMHi Colleagues,
i have solved this by maintaining a proxy settings properties file.....where proxy settings can be changed using system administrator
Thanks & Regards
Swetha -
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 -
Retrieve the Hostname and port of the server
Hi,
How can i from my webdynpro code get the hostname and the port of the server in which the program is running?
Thanks in Advance!
JoHi Jo,
I think so u can retrive using this URL:
http://<host name>:<port number>/webdynpro/dispatcher/local/<Web Dynpro project>/<name of Web Dynpro application>.
check on to this link for more details:
http://help.sap.com/saphelp_erp2005/helpdata/en/7d/09044132bcef23e10000000a155106/frameset.htm
Hope tihs helps u,
Regards,
Nagarajan. -
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 change IP, Hostname and domain name for Oracle Application R12
Hi,
I'm new to Oracle, we used to have one production and one test server for Oracle Application R12, but the test server was corrupted, so we decided to clone production server and create a new test server, after cloning and creation of test server, how should we do to change IP address, hostname and domain name for test server?
Our production and test server environment is:
Linux Enterprise AS 2.6.9
Application module: E-Business Suite Treasury only
Your advice will be much appreciated.
Regards,
Kenneth
Edited by: 850209 on Apr 7, 2011 5:37 PM850209 wrote:
Hi,
There are few tnsnames.ora and listener.ora files in the system, how to know which one are effective? If I change tnsnames.ora hostname entry, do I need to change listerner.ora file also?
Thanks.
Regard,
Kenneth.tnsnames.ora is used only by client processes. listner.ora is used only to configure the listener, and that is a server side issue only. In addition, the listener can start without any listener.ora at all, using all default values. See my discussion of tns issues at edstevensdba.wordpress.com
If you are using dbcontrol, you will most likely need to reconfigure it, using the emca utility. -
How to read the Domain and Port of our server
hi guru,
Is there any method to get the portal Domain and Port .
http://<domain>:<port>/irj/portal
http://<Domain><port> /irj/servlet/prt/portal/prtroot/com.sap.portal.appintegrator.sap.bwc.Transaction?System=NIB_Aliase&SAP_TCode=se80
in our project we are hard coded the Domain and port .
if we transfer the application is some other server again we want to change.
So is there any solution for that.Please help me in this situation
Advance thank's
Regard's
Vivekanathan.SHi,
import com.sap.tc.webdynpro.services.sal.deployment.api.WDDeployableObjectPart;
import com.sap.tc.webdynpro.services.task.TaskBinder;
WDDeployableObjectPart d = wdComponentAPI.getDeployableObjectPart();
String hostName = TaskBinder.getCurrentTask().getProtocolAdapter().getServerName();
int port = TaskBinder.getCurrentTask().getProtocolAdapter().getServerPort();
With the above code you can get the host name, and port.
If your problem is solved, award me the points.
Thanks,
Srini -
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 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?
ManishaHi
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 -
How to configure SMTP dynamic send port?
Hi,
I am trying to configure STMP send port to send emails, enabled SMTP Server on the DEV box and configured it as described in the link below.
https://sandroaspbiztalkblog.wordpress.com/2013/05/09/biztalk-2013-installation-and-configuration-install-and-configure-smtp-server-feature-part-4/
Able to send emails using Telnet client, and these email get stored in C:\inetpub\mailroot\Queue folder.
I have a dynamic send with following values.
msgEMail(SMTP.CC) = “[email protected]”;
msgEMail(SMTP.DeliveryReceipt) = False;
msgEMail(SMTP.From) = “[email protected]”;
msgEMail(SMTP.ReadReceipt) = False;
msgEMail(SMTP.Password) = “XXX;
msgEMail(SMTP.Username) = “DDD”;
msgEMail(SMTP.SMTPAuthenticate) = System.Convert.ToUInt32(XX.SMTPAuthenticate);
msgEMail(SMTP.SMTPHost) = “smtp.domain.local”;
msgEMail(SMTP.Subject) = “sdfgdfgd;
msgEMail(SMTP.MessagePartsAttachments) = 2;
Message gets suspended with the following error message.
A message sent to adapter "SMTP" on send port "XXX_DynamicSendPort_XXXX" with URI "mailto:
[email protected]" is suspended.
Error details: There was a failure executing the send pipeline: "Microsoft.BizTalk.DefaultPipelines.XMLTransmit,
Microsoft.BizTalk.DefaultPipelines, Version=3.0.1.0, Culture=neutral, PublicKeyToken=81bf3856ad764e35" Source: "XML assembler" Send Port: "XXX_DynamicSendPort_XXXXX URI: "mailto:localhost" Reason: Data at the root level is invalid.
Line 1, position 1.
MessageId:
{3C50F418-24C4-4661-9B34-4B7F5F6FBBA4}
InstanceID: {2F6B9A0E-92EE-4953-81D2-9A124FAC99CE}
Please can some advise me what is wrong here? do you think I have configured
msgEMail(SMTP.SMTPHost) property correctly? Or should it be the name of the DEV box?
Thanks
SS
Shiva SadayanHi Shiva,
You should not be using XMLTransit pipeline at the send port.
Perhaps you should go with default passthrough pipeline or
Create a send pipeline with MIME/SMIME encoder and drop it at Encode section of pipeline. Accept the default settings for MIME/SMIME encoder and use it with the dynamic port.
I found this article very useful while sending email from BizTalk. Refer:
Sending Emails in Biztalk
Rachit
Please mark as answer or vote as helpful if my reply does -
How to configure the sort and port of a SOAP address dynamically
Hi All,
In the wsdl we have the SOAP Address defined but in practice we would like to configure the host and the port. As the server on which the service resides may/will change.
For example:
http://usciq74.wdf.sap.corp:50077/sap/bc/srt/rfc/sap/CPM_PLANNING_HISTORY?sap-client=003
We would like to configure the proxy to point to say:
http://<host>:<port>//sap/bc/srt/rfc/sap/CPM_PLANNING_HISTORY?sap-client=003
What we see in the Proxy Code is:
port.setSOAPAddress(new com.sap.flex.ws.runtime.SOAPAddress("http://usciq74.wdf.sap.corp:50077/sap/bc/srt/rfc/sap/CPM_PLANNING_HISTORY?sap-client=003"));
How could this be achieved.
Please help.Hi Sumit,
Thanks for the quick response. However, I do not want to change the host and the port in the wsdl. I want it to be so, that it will pick the host and port dynamically(as you have mentioned). However, in out case, the web service has the SOAP address hardcoded as <b>http://usciq74.wdf.sap.corp:50077</b>.
We would want to write something as http://host:port and then let it pick the host and port dynamically. How is that possible.
Best Regards,
Debashree. -
How to determine the Country and Organization from IP
Hi,
I would like to determine the Country and Organization from a given IP. I have to write a JSP, which when given the IP address gives the country and the organization to which the IP belongs. The organization may be the ISP, or a MNC or any other corporate/government body, or it may be of an individual. I have to do it progamitically from inside a JSP?
Any suggestions anybody
Thanks in Advance for your replyeven when tracking IP's, if it is static you can narrow it down pretty far - if it's dynamic, you can only narrow it down to a specific part of the country.
Maybe you are looking for
-
How to Map the Unit field in case of DSO and INFOCUBE
Dear Experts, I have a issue ,Please help me to solve this I have DSO as provider , And, i have to map transformations btw the Datasource and DSO. In generic Data source, i have unit fields like BASME,MEINS (Quantity units) & STWAE (currency field)
-
Adobe Reader not working after update to version XI
I have had Adbobe Reader installed on my PC for ages and have been using this to view my PDF files without any issues. However, Adobe Reader updated automatically to version XI a few days ago. Since then, I have been completely unable to open Adobe R
-
Hi, How to configure Crystal report using MySql? I added mysqlconnector.jar in CRConfig.xml file, Is there any jar to include for mySql? Pls Help me those who knows...
-
Sun Java Directory Server Linux RHEL 5 Installation
Hello, As Linux RHEL ES/AS 5 is not officially listed in the operating system requirements. Has somebody been succesful in the installation ? - With which Linux RHEL 5 update. - Are the package depencies the same (compat-C/C++ libraries) - Which Edit
-
I import an album and it loads to multiple albums. I imported a CD and went through the steps and when I was done I had 3 albums by the same artist. One was the CD imported and the other 2 had slightly different names. I would like to load them into