on 10-31-2008 4:07 PM
Hi all,
I am trying to read a webpage in UDF using the below code. But i get the connection time out. Can any body please suggest the possible reason?
try {
URL google = new URL("http//www.google.com");
result.addValue(""+google);
URLConnection yc = google.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(yc
.getInputStream()));
while ((inputLine = in.readLine()) != null) {
result.addValue(inputLine);
break;
}
in.close();
} catch (Exception e) {
result.addValue(""+e);
}
URL google = new URL("http//www.google.com");
change
URL google = new URL("http://www.google.com");
you are missing : in between http://
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Internet access should be there on XI server to execute your mapping. If it is under firewall just check with that to solve this.
UDF looks ok
Thanks
Gaurav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.