on 01-16-2008 6:46 PM
Hi there!
I have written a Web Dynpro application that connects to a web service using a web service model. The request is configured to use a HTTP destination by means of the _setHTTPDestinationName() method. I configured the HTTP destination in the visual administrator and it uses Logon ticket to authenticate.
All this works perfectly in my test environment. Unfortunately in my production environment the web service must be accessed through a HTTP proxy and I could not find where to configure the proxy settings for HTTP destinations.
I found some information about "open a transaction in SICF" an so on which doesn't help me because I have no ABAP client.
I found some information about configuring proxies in the NWA but this does not seem to apply to my NW version, wich is 2004 SP16.
Any clues?
Thanks in advance.
Hi Robert,
In ABAP it's very easy to define the proxy in transaction SM59 for an HTTP destination.
In the java stack, it is, in my opinion, badly designed because you have to define the proxy globally for the J2EE application server. You can only define an exception list.
It means that it is not possible to have a different proxy for different HTTP destinations !
You define the single proxy with the Config tool on the Server ( not dispatcher) Java Parameters.
Example :
-Dhttp.proxyHost=myproxy.mydomain.mycountry
-Dhttp.proxyPort=80
-Dhttp.nonProxyHosts="localhost|*.mydomain.mycountry|host1|host2"
-Dhttps.proxyHost=myproxy.mydomain.mycountry
-Dhttps.proxyPort=443
Regards,
Olivier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Olivier,
thank you for your reply.
Is there really a possiblity to configure a proxy for any given HTTP Destination in ABAP? Because if there is, I cannot believe that there is no equivalent in Java. As there is no such a thing as a HTTP Destination "for ABAP" and a HTTP Destination "for Java", what would happen if I used the HTTP Destination with proxy settings created in ABAP for my Java program?
There is another way to use a proxy which I found by analysing the generated Java classes of my web service model. You can do the following:
-
SomeServiceImpl service = SomeDMSModel.getServiceImpl();
service.setHTTPProxyResolver(new HTTPProxyResolver() {
HTTPProxy proxy;
public HTTPProxy getHTTPProxyForHost(String host) throws RemoteException {
if (this.proxy == null) {
this.proxy = new HTTPProxy();
this.proxy.setProxyHost("proxy.company.com");
this.proxy.setProxyPort(1234);
}
return this.proxy;
}
});
-
This is NOT a good way to do it, as it transfers a portal administration task to the programmer, but it shows that the functionality is present in Java.
So I haven't given up on finding where it has to be configured...
Edited by: Robert Rodewald on Jan 18, 2008 11:01 AM
Hi Robert,
in my opinion, it is not so bad to use a proxy in the way you described. If you'd handle the use of a proxy in the application, you could do it without side effects on other applications on the same server. The parameters like proxy host or port could be made available in a Java property file or something like that. There is just one flaw, this is how to make proxy user and password available in a secure manner.
Regards
Andreas
Hi Andreas,
let me elaborate on why I think that this is not the right way to do it.
Suppose there are two applications running on the server which both want to use the configured destination. Both applications would need to connect to the backend system through the proxy. It would be necessary to configure both applications to use a proxy, which can be a tedious task.
Let's further suppose the portal team has to change the infrastructure and the backend server is moved to another location where another proxy is used. Now the administrator has to know which of the dozens of applications he has on his server is using the destination because he has to change the proxy settings in the application itself. In addition if he is unlucky this will have to be done differently in each application, as the applications may have been written by different programmers.
Regards,
Robert
Hi Robert,
no doubt, you are absolutely right, there is a lack of functionality and I hope, SAP will solve this problem soon (Hey SAP, anybody listening ? :-).
But as a workaround - if I had to decide between the option to configure proxies in the virtual maschine or to do it with a property file in the application, I'd choose the application.
Kind Regards
Andreas
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.