code: def rename_service(self, serviceName, serviceType,
                         serviceNewName, folder=None):
          
          params = {
              "f" : "json",
              "serviceName" : serviceName,
              "serviceType" : serviceType,
              "serviceNewName" : serviceNewName
          }
          if folder is None:
              uURL = self._url + "/renameService"
          else:
              uURL = self._url + "/%s/renameService" % folder
          return self._post(url=uURL, param_dict=params,
                               securityHandler=self._securityHandler,
                               proxy_url=self._proxy_url,
                               proxy_port=self._proxy_port)
docs: Renames a published AGS Service
             Inputs:
                serviceName - old service name
                serviceType - type of service
                serviceNewName - new service name
                folder - location of where the service lives, none means
                         root folder.
             Output:
                JSON message as dictionary