# How To: Create new internal SOAP and REST end points for ArcGIS Server for the Java platform

## Summary

Instructions provided describe how to create new internal SOAP and REST end points for the built-in Tomcat Web server at port 8399 on the ArcGIS Server for the Java platform. Additional or alternative SOAP and REST end point names may be preferred or required within the same built-in port 8399.

Also, creating new SOAP and REST end points might help to troubleshoot connectivity and usability problems with ArcGIS Server on port 8399.

## Procedure

`Note:While the concepts presented here apply to both the Windows and Unix/Linux platforms, the steps provided are for ArcGIS Server for the Java platform on a Windows environment.`

1. Copy the source rest.war and services.war files from C:\Program Files\ArcGIS\java\manager\software to a temporary folder.
2. Rename the copied WAR files to new SOAP and REST handler names, for example, newservices.zip and newrest.zip.
3. Extract the compressed files newservices.zip and newrest.zip files.
4. Copy the two new folders to: C:\Program Files\ArcGIS\java\web_output.
5. Edit the following file using a text editor, such as NotePad: C:\Program Files\ArcGIS\java\manager\service\tomcat\managerappserver\conf\server.xml.
6. At the bottom of this file, copy the following line: <Context path="/arcgis/services" docBase="../services"/>.

Paste the line that was just copied below the existing one, and change the value to a new SOAP end point name, for example, 'newarcgis/newservices'.

The new line should look like the following: <Context path="/newarcgis/newservices" docBase="../newservices"/>.
7. In the same file, copy the following line: <Context path="/arcgis/rest" docBase="../rest"/>.

Paste the line that was just copied below the existing one, and change the value to a new REST end point name, for example 'newarcgis/newrest'.

The new line should look like the following: <Context path="/newarcgis/newrest" docBase="../newrest"/>.
8. This part of the file should now look like the following:
`Code:<Context path="" docBase="../"/> <Context path="/arcgis/kml" docBase="../kml"/> <Context path="/arcgis/wms" docBase="../wms"/> <Context path="/arcgis/enterprise" docBase="../enterprise"/> <Context path="/arcgis/explorer" docBase="../explorer"/> <Context path="/arcgis/manager" docBase="../manager"/> <Context path="/arcgis/applications" docBase="../applications"/> <Context path="/arcgis/server" docBase="c:/arcgisserver"/> <Context path="/arcgis/rest" docBase="../rest"/> <Context path="/newarcgis/newrest" docBase="../newrest"/> <Context path="/arcgis/sdk" docBase="../sdk"/> <Context path="/arcgis/services" docBase="../services"/> <Context path="/newarcgis/newservices" docBase="../newservices"/> <Context path="/arcgis/tokens" docBase="../tokens"/> `

9. Save this file and close the text editor.
10. Make a backup of the following file: C:\Program Files\ArcGIS\java\web_output\newservices\WEB-INF\classes\arcgis_wshandler.properties.
11. Copy the following file: C:\Program Files\ArcGIS\java\web_output\services\WEB-INF\classes\arcgis_wshandler.properties to overwrite the existing file located here: C:\Program Files\ArcGIS\java\web_output\newservices\WEB-INF\classes\arcgis_wshandler.properties.
`Note:Alternatively, the existing arcgis_wshandler.properties file can be edited manually, but the password cannot be encrypted. The edited file should appear as follows:`
`Code:arcgis.som.domain=server_namearcgis.som.username=arcgismanagerarcgis.som.password=arcgis_manager_passwordarcgis.som.password.encrypted=false#cluster type can be none or failover or roundrobinarcgis.som.resource.clustertype=nonearcgis.som.resource.hosts=server_name#recheck failed som after n incoming requestarcgis.som.recheckfailedsomcount=100#List of foldernames to allow; the default is blank, causing all folders to be allowed#set timeout for check tile file access. Timeout unit is second.arcgis.webservice.generatedtileaccess.timeout=60arcgis.som.foldernames=arcgis.webservices.relativeurls=falsearcgis.webservices.security.authenticationtype=NONEarcgis.webservices.security.roles=.arcgis.webservices.security.tokenserviceurl=`

12. Make a back up of the following file: C:\Program Files\ArcGIS\java\web_output\newrest\WEB-INF\classes\server.properties.
13. Copy the following file: C:\Program Files\ArcGIS\java\web_output\rest\WEB-INF\classes\server.properties to overwrite the existing file located here: C:\Program Files\ArcGIS\java\web_output\newrest\WEB-INF\classes\server.properties.
`Note: Alternatively, the existing server.properties file can be edited manually, but the password cannot be encrypted. The edited file should appear as follows:`
`Code:com.esri.rest.HOST=\${Host}com.esri.rest.DOMAIN=server_namecom.esri.rest.USER_NAME=arcgismanagercom.esri.rest.PASSWORD=arcgis_manager_passwordcom.esri.rest.PASSWORD_ENCRYPTED=falsecom.esri.rest.SOAP_URL=http://server_name:8399/arcgis/servicescom.esri.rest.SOAP_HTTPS_URL=#Secondary Hosts (for failover / roundrobin), if any - comma separated. e.g. host2, host3com.esri.rest.SECONDARY_HOSTS=#If secondary hosts are specified, the type of server cluster. Valid values are: failover, roundrobincom.esri.rest.SERVER_CLUSTER_TYPE=\${ServerClusterType}`

14. Go to Windows Administrative Tools > Services and restart the 'ArcGIS Server Manager Service' and 'ArcGIS Server Object Manager' services.
15. (Optional) To test the changes, the two new internal SOAP and REST handlers can be accessed in a Web browser using the following URLs:

http://<server_name>:8399/newarcgis/newservices?wsdl
http://<server_name>:8399/newarcgis/newrest
16. (Optional) To test the changes in ArcCatalog, go to ArcCatalog > GIS Servers > Add GIS server > Use GIS services > Internet URL. Type in the following URL: http://<server_name>:8399/newarcgis/newservices.