How do I make the proxy set with Java to work?

435
1
Jump to solution
09-19-2018 03:49 AM
ArchanaVenkataraman
New Contributor III

The Portal for ArcGIS  and ArcGIS Server 10.61 is set on Suse 12 SP 3 on the web server Apache Tomcat 7.0.82.

A custom application, developed using ArcGIS API for Javascript 3.24, was deployed on the same web server.

The Java proxy was also deployed. The rules for their server and portal were added in the proxy.config. The proxy can be pinged but it does not work.

    matchAll="true"
   username = "username"
    password = "p@ssword"
   rateLimit="600"
   rateLimitPeriod="60"/>
   matchAll="true"
   username = "username"
   password = "p@ssword"/>

It was tested by trying to access https://domain.com/Java/proxy.jsp?https://domain.com/server/rest/services 

While it opens the services, only the public services are visible.

The proxy rules were also added to the custom application JS code to test as below:

 urlUtils.addProxyRule({
   proxyUrl: "https://domain.com/Java/proxy.jsp"
  },
   {
    proxyUrl: "https://domain.com/Java/proxy.jsp"
  }
 );

Other combinations of portal URL "https://domain.com/portal/sharing/rest/" and with clientID and clientSecret was also tested with no improvement.

We have not had any luck with it so far. What is to be done to get the Java proxy working, other than to make the services public?

The same rules set in DotNet proxy in a Windows server works for other project that we have implemented, but not in the Suse server.

0 Kudos
1 Solution

Accepted Solutions
ArchanaVenkataraman
New Contributor III

The issue has been resolved. The log file could be accessed by giving the absolute path in proxy.config file. 

Debugging the JSP file, we found that the username and password values were empty. 

The space between the parameter name and "=" was the issue. Seems like this is an issue with the way the file is parsed. The config file looked like this at the end:

    matchAll="true"
   username= "username"
    password= "p@ssword"/>
   matchAll="true"
   username="username"
   password="p@ssword"/>
This works well.

View solution in original post

1 Reply
ArchanaVenkataraman
New Contributor III

The issue has been resolved. The log file could be accessed by giving the absolute path in proxy.config file. 

Debugging the JSP file, we found that the username and password values were empty. 

The space between the parameter name and "=" was the issue. Seems like this is an issue with the way the file is parsed. The config file looked like this at the end:

    matchAll="true"
   username= "username"
    password= "p@ssword"/>
   matchAll="true"
   username="username"
   password="p@ssword"/>
This works well.

View solution in original post