Locate proxyinfo for a url using java
Hi,
I need to get the proxy info for a given url
Ex:
hi,
public void getProxy(String url)
//url example http://yahoo.com/
get proxyserverHostName for the above Url
get proxyserverportNo for the above URL
can any body please help me
Thanks
naveen
AFAIK - proxy server information (such as URLs not to proxy for) is not available through the standard Java API. You might look into a native solution or hit google for a possible Java one.
Good Luck
Lee
Similar Messages
-
Which Book is good for e-commerce using JAVA & XML
I want to find a Book that is good for e-commerce using JAVA & XML,
or where can find JAVA & XML new and develop?
can you suggest me?
Thanks very much!I can recommend "Java and XML" from O'Reilly. It's a very good book.
-
Need Sample Code for Vendor creation using JAVA API
Hi,
I have a scenario like Vendor creation using <b>Java API</b>.
1.I have Vendors (Main) Table.
2.I have <b>look up</b> tables like Account Group.
3.Also <b>Qualifier table</b>(Phone numbers) too.
Could you please give me the sample code which helps me to create Vendor records using Java API?
<b>I need Code samples which should cover all of the above scenario.</b>
<b>Marks will be given for the relevent answers.</b>
Best Regards
PK DevarajHi Devraj,
I hope the below code might solve all your problem:-
//Adding Qualified field
//Creating empty record in Qualifed table
//Adding No Qualifiers
Record qualified_record = RecordFactory.createEmptyRecord(new TableId(<TableId>));
try {
qualified_record.setFieldValue(new FieldId(<fieldId of NoQualifier), new StringValue(<StringValue>));//Adding No Qualifier
catch (IllegalArgumentException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
catch (MdmValueTypeException e2) {
// TODO Auto-generated catch block
e2.printStackTrace();
//Creating Record in Qualified table
CreateRecordCommand create_command = new CreateRecordCommand(connections);
create_command.setSession(sessionId);
create_command.setRecord(qualified_record);
try
create_command.execute();
catch(Exception e)
System.out.println(e.toString());
RecordId record_id = create_command.getRecord().getId();
//Adding the new record to Qualifed Lookup value and setting the Yes Qualifiers
QualifiedLookupValue lookup_value = new QualifiedLookupValue();
int link = lookup_value.createQualifiedLink(new QualifiedLinkValue(record_id));
//Adding Yes Qualifiers
lookup_value.setQualifierFieldValue(0 , new FieldId(<FieldID of Yes Qualifier>) , new StringValue(<StringValue>));
//Now adding LookUP values
//Fetch the RecordID of the value selected by user using the following function
public RecordId getRecordID(ConnectionPool connections , String sessionID , String value , String Fieldid , String tableid)
ResultDefinition rsd = new ResultDefinition(new TableId(tableid));
rsd.addSelectField(new FieldId(Fieldid));
StringValue [] val = new StringValue[1];
val[0] = new StringValue(value);
RetrieveRecordsByValueCommand val_command = new RetrieveRecordsByValueCommand(connections);
val_command.setSession(sessionID);
val_command.setResultDefinition(rsd);
val_command.setFieldId(new FieldId(Fieldid));
val_command.setFieldValues(val);
try
val_command.execute();
catch(Exception e)
RecordResultSet result_set = val_command.getRecords();
RecordId id = null;
if(result_set.getCount()>0)
for(int i = 0 ; i < result_set.getCount() ; i++)
id = result_set.getRecord(i).getId();
return id;
//Finally creating the record in Main table
com.sap.mdm.data.Record empty_record = RecordFactory.createEmptyRecord(new TableId("T1"));
try {
empty_record.setFieldValue(new FieldId(<FieldId of text field in Main table>),new StringValue(<StringValue>));
empty_record.setFieldValue(new FieldId(<FieldId of lookup field in Main table>), new LookupValue(<RecordID of the value retrieved using the above getRecordID function>));
empty_record.setFieldValue(new FieldId(<FieldId of Qualified field in Main table>), new QualifiedLookupValue(<lookup_value>));//QualifiedLookUp value Retrieved above
} catch (IllegalArgumentException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (MdmValueTypeException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
//Actually creating the record in Main table
CreateRecordCommand create_main_command = new CreateRecordCommand(connections);
create_main_command.setSession(sessionId);
create_main_command.setRecord(empty_record);
try
create_main_command.execute();
catch(Exception e)
System.out.println(e.toString());
Thanks
Namrata -
How to do Front End Validation for JSP Forms using Java Script with 9iJD...
How to do Front End validation using 9iJD. Any wizard is there. We need to do the val. using Java Script. If its not available, please include that in the Production Release.
Thanks a lot. When is the Production Release is scheduled. Please tell us whether itll be available for Free Download. Bec, we couldnt buy. Bec, if its working fine with all the options without any bug only, we can ask our company to buy 9iJD by stating the advantages. Just explain us.
-
Unable to locate existing file from unix using java program
Hi
I have created a file in unix using java program, file.createNewFile();
And when i try to search for the same file using file.exists() it is returning false. Paths are correct. Can anybody help me out.
Thanks & Regards,
PrasanthIn Linux FC5 using JDK1.6, this code File temp = new File(System.getProperty("user.home") + "/abcdefghijklmn");
System.out.println(temp.createNewFile());prints 'true' and the file is created with length zero. -
OCR SDK for wireless devices using java?
Dear Forum members,
Can any one please sugest some OCR SDK for mobile devices which is compatible with java......
Thanks in advance....
---VidyaThanks.
This makes our deployement script stop working. We don't want to use the Webi Rich Client to deploy webi report manually to different servers (like Development, SIT, UAT, Production, etc.). We use shell scripts calling Java programs to deploy reports.
Is there any other way to deploy webi reports using Java SDK which can find the universe by name in the same CMS automatically and link to it? -
WebStart support for Firefox Browser using Java Linux AMD64
I am trying to setup a Firefox browser to use Java WebStart (jnlp).
I am running Java Linux (AMD64)
but I have no <JAVA_HOME/jre/plugins directory and no libjavaplugin_oji.so file with the Java installation.
1) Can I download libjavaplugin_oji.so plugin somewhere?
2) Will it work in Java Linux (AMD64)?
3) Can Java Linux (AMD64) be setup to operate Java WebStart Technology?
If so, How the h--- do I do it?
Frustrated
NewbeanI have the same problem. Downloaded the 64 bit jre and found no libjavaplugin_oji.so in it.
Then downloaded the 32 bit jre and did the soft link and still no work.
Has anyone made the 32 bit jre work on the 64 bit linux? -
Get location/coordinates for a field using JavaScript in Acrobat Professional
Good day,
I am looking for a way to get the coordinates of a text field.
I would like to create a listbox and set the location of the listbox top left to the text fields bottom left coordinates, I have had a look at the scripting guides ... could not turn up anything.
I know how to create and populate this listbox using the JavaScript code, only problem is, to get the coordinates of the text box.Try this:
1. Move or change the dimensions of the text boxes on the extracted page in the configuration that you want.
2. When you are satisfied with the new configuration, modify the following JavaScript to use the names of the text boxes that you want to include on the page.
//find_rect //find coordinates of text boxes whose names are included in the var rct,ary = ["fld_1","fld_2","fld_3","fld_4"]; //...etc.
for (j = 0; j<ary.length; j++){
console.println(ary[j]);
rct = this.getField(ary[j]).rect;
for (i= 0; i< rct.length; i++) console.println(rct[i]);
3. Add the modified code to the document level of form. (as a doc level javascript but with no function name or brackets included.
4. When you run the code, the coordinates for the fields that you have included in the array will be printed in the console window:
Example:
fld_1
21
777
296
717
fld_2
30
769
65
729 -
Set up DB Connection Pool for Oracle DataBase Using Java App Server8
Hi,
In the Admin Console of Java App Server 8, I tried to create a connection pool for the oracle database. I chose Resource Type to be "javax.sql.ConnectionPoolDataSource" and the Vendor is Oracle. So the Data Source Class Name is filled by the system to be "oracle.jdbc.pool.OracleConnectionPoolDataSource". Now, I set up the class path to point to the database driver class "sun.jdbc.odbc.JdbcOdbcDriver" and also the to the Data Source Class Name. Also I set up the JVM options in the console. Restart the server, and then try to ping to the database, but get the error:
Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Connection could not be allocated because: No suitable driver
I don't understand what else I should do and why this error is coming?
Please help me out.
Thank you
Regards,
SarahHi,
I've already solve the problem. I did the following:
set the Url to be: jdbc:oracle:thin:@hostname:port:SID
set username
set password
add oracle.jdbc.drivers.OracleDriver into the JVM options -Djdbc.drivers
restart the server
test the connection
it works :) -
User defined Metadata for XML DB using Java API
I have been looking through and reading the documentation for Oracle XML DB. I am trying to find out if there is a way to create user define metadata using a Java API. when I look in the XML "Java API Reference (Javadoc)" setProperty(java.lang.String name, java.lang.String value, int type) it states: Sets the specified (single-value) property to the specified value. If the property does not yet exist, it is created. I have tried several ways to do this and have not been successful. I have looked for java examples in the XML DB Developer's Guide, XML Developer's Kit Programmer's Guide.
Is there a good example out there as to how to create user-defined metadata that can be populated using the JCR API.
Thanks in advance.We need to create the 2 xml schemas, one for request and the other for response of selected operation in the WSDL.
This we need to do dynamically. There will not be any java classes generated, the xsd files need to be created on the fly.
Please suggest xml schema creation in this sequence. -
Help needed for report generation using java technologies
May i get some idea about report generation api available. some report generation tools that can be downloadble. can you please suggest how to use scheduling the printers or report generation by scheduling.
e.g. for one of my school project which generate reconciliation report (banking project) we add in a letterheader and the rest of the information presented below.
but there is some problem here.
either you "catch" no. x row where the printing will be trancated then prevented it from trancated by formatting your pages such that data will not be printed in that region. -
Adding a listener to Active directory for user creation using Java
Hi,
I would like to add a listener to active directory such that when a user is created to the "Users" container, I should be notified or informed. I would like to do this with Java. What should I do ?
Regards,
Anand Kumar DYou should add a NamingListener or a NamespaceChangedListener.
-
How to create a Win 2000 shortcut for my application using Java?
Hi
How can I create a shortcut from within Java that would be on the desktop?
Cheers, RasCheck out installanywhere. There are other ways but that is probably the easiest.
hth,
m -
Setting System DSN for MS Access Database using Java Code
How to set the system DSN for Access database using Java Code at runtime....???
Replies are deeply appreciated...I found a 3rd Party MS Access JDBC Driver from a Google search. I downloaded and tried the free trial version. It worked fine but we opted not to purchase the full version and went a different route. If you don't find it, let me know and I'll see if I can track down the name of the product we tested.
-
Req. Sample code for the Updation of Master record in MDM using Java API..
Hi All,
Can anyone provide me the same code for Updation of master record in MDM using Java API ??Hi SakthiNarayananD,
You can additionally go through the following links to work with MDM and Java API:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2d18d355-0601-0010-fdbb-d8b143420f49 (Java API)
http://help.sap.com/javadocs/MDM/SP05/(Java api programs)
https://help.sap.com/javadocs/MDM/current/index.html (java api codes)
http://help.sap.com/javadocs/MDM/SP06P2/index.html (Java Docs for SP06)
Reg: Using JAVA API - Search
Re: Retrieving Drop Down List Value using JAVA API - Lookup values
How to retreive records from Lookuptable of type flat - Lookup Values
Reg: MDM with webdynpro - READ,INSERT,MODIFY
Hope It Helped
Thanks & Regards
Simona Pinto
Maybe you are looking for
-
Launch problem opening PSE 13 from a read only desktop applied by group policy
PSE 13 won't launch. What is different between opening PSE 13 and other programs? On a normal login it opens. Are there special requirements?
-
How to get 4 first characters from a full name ?
Hello, in my database I can choose the value Last_Name; this generates the full last name of someone. In a DECODE I would only like to get the first 4 characters of the Last_Name. How can I make this in a DECODE ? Thanks for you help. Anouk
-
Standard Report for Quotation Order conversion status
Here i need a report where i can see the list of Quotations and Whether it has been converted to order or not.......
-
Please HELP! Problems booting K8N Neo2 Plat.
Hey peeps, I've been having major problems with getting my system to work with the Neo2. My first board worked ok and I finished installing windows and switched it off for the night. Then about 3 hrs later it TURNS ITSELF ON... and the power supply
-
How do you delete links in your reading list in the browser?
How do you delete links in the reading list and bookmarks?