cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable proxy setting for Web Dynpro application

Former Member
0 Kudos
69

Hi,

I have a weather web dynpro application, which fetchs weather data from yahoo weather site in xml format. The application is working fine in development environment(where proxy is not enabled), but the same is not working in client environment where proxy setting are enabled.

How can we enable proxy setting for web dynpro applications????

Thanks for help.

Thanx,

Dheeram

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Proxy settings for WD applications in the Developer Studio can be made under Window ->Preferences -> Workbench -> Proxy Settings.

Hope this helps.

Srinivasan T

PS: Reward helpful answers

Former Member
0 Kudos

Hi Srinivas,

Thanks for helping me in providing a solution.

But the approach did not slove my problem.

Is that we need to do some settings on WAS for proxy?

I'm struggling with problem since a month. Please help me out.

Thanks for your help.

Dheeram

former_member182372
Active Contributor
0 Kudos

Hi Dheeram,

How do you establish a connection to yahoo weather? Through java.net.URLConnection?

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi Maksim,

Please help me.

The logic is as follows:

URL url = new URL("http://xml.weather.yahoo.com/forecastrss?p=USPA0656");

URLConnection urlConn = url.openConnection();

BufferedReader br = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));

I'm getting the following error:

Server returned HTTP response code: 403 for URL: http://xml.weather.yahoo.com/forecastrss?p=USPA0656

Thanks in advance.

Dheeram

former_member182372
Active Contributor
0 Kudos

Hi Dheeram,

Check this http://bdn.borland.com/article/29783

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi Maksim,

I went through those steps by setting proxy host and port to System properties. But still the problem exists.

Thanx,

Dheeram

former_member182372
Active Contributor
0 Kudos

Hi Dheeram,

I don`t think that System proerties will work in this case. Article is talking about "JVM`s proxy setting". I think you should use URL construcor like public URL(String protocol, String host, int port, String file);

or try to set properties

System.getProperties().put("proxySet", "true");

System.getProperties().put("proxyHost", "proxy.domain.com");

System.getProperties().put("proxyPort", "3128");

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi Maksim,

When I use the URL constructor by passing the protocol, host, port and file like:

URL url = new URL("http","abc",80,"http://xml.weather.yahoo.com/forecastrss?p=USPA0656");

It is generating url as http://abc:80/http://xml.weather.yahoo.com/forecastrss?p=USPA0656

I used the code of setting the proxy

like

System.getProperties().put("proxySet", "true");

System.getProperties().put("proxyHost", "abc");

System.getProperties().put("proxyPort", "80");

Thanx,

Dheeram

former_member182372
Active Contributor
0 Kudos

Does it work with System.getProperties().put(...)?

Former Member
0 Kudos

No it does not work with those setting. With the following links I came to know that it is some thing to with Web AS proxy setting but not sure of how to configure those setting.

/message/1594919#1594919 [original link is broken]

Thanx,

Dheeram

Former Member
Former Member
0 Kudos

Dheeram,

This settings is configured using ConfigTool (path like this: C:\usr\sap\F50\JC90\j2ee\configtool\ConfigTool.bat)

Add aforementioned settings to JVM arguments of server instance.

VS

Former Member
0 Kudos

Hi VS,

Thanks for your help.

But can you please tell me how to add new arguments??

Thanx,

Dheeram

Former Member
0 Kudos

Hi All,

After doing all these changes also the problem still exists.

Please guide me to resolve this issue.

Thanks in advance.

Thanx,

Dheeram