summaryrefslogtreecommitdiffstats
path: root/servicegateway
diff options
context:
space:
mode:
Diffstat (limited to 'servicegateway')
-rw-r--r--servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/inf/IServiceGatewayRoaModule.java5
-rw-r--r--servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImpl.java13
2 files changed, 6 insertions, 12 deletions
diff --git a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/inf/IServiceGatewayRoaModule.java b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/inf/IServiceGatewayRoaModule.java
index 302b2bd9..0e8b03ce 100644
--- a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/inf/IServiceGatewayRoaModule.java
+++ b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/inf/IServiceGatewayRoaModule.java
@@ -18,7 +18,6 @@ package org.openo.gso.gui.servicegateway.roa.inf;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
@@ -63,10 +62,10 @@ public interface IServiceGatewayRoaModule {
* @throws ServiceException when operate database or parameter is wrong.
* @since GSO 0.5
*/
- @DELETE
+ @POST
@Produces({"application/json"})
@Consumes({"application/json"})
- @Path("/{serviceId}")
+ @Path("/{serviceId}/terminate")
Response deleteService(@PathParam("serviceId") String serviceId, @Context HttpServletRequest servletReq)
throws ServiceException;
diff --git a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImpl.java b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImpl.java
index c3dee4a3..3ff4f89b 100644
--- a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImpl.java
+++ b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImpl.java
@@ -139,21 +139,16 @@ public class ServiceGatewayImpl implements IServiceGateway {
// Parse request
String reqContent = RestUtils.getRequestBody(httpRequest);
Map<String, Object> requestBody = JsonUtil.unMarshal(reqContent, Map.class);
- Map<String, Object> service = (Map<String, Object>)requestBody.get(Constant.SERVICE_INDENTIFY);
- if(null == service)
- {
- service = requestBody;
- }
ValidateUtil.assertObjectNotNull(requestBody);
// Validate data
- String gatewayUri = (String)service.get(Constant.SERVICE_GATEWAY_URI);
+ String gatewayUri = (String)requestBody.get(Constant.SERVICE_GATEWAY_URI);
ValidateUtil.assertStringNotNull(gatewayUri);
- service.remove(Constant.SERVICE_GATEWAY_URI);
+ requestBody.remove(Constant.SERVICE_GATEWAY_URI);
- String operation = (String) service.get(Constant.SERVICE_OPERATION);
+ String operation = (String) requestBody.get(Constant.SERVICE_OPERATION);
ValidateUtil.assertStringNotNull(operation);
- service.remove(Constant.SERVICE_OPERATION);
+ requestBody.remove(Constant.SERVICE_OPERATION);
// call the restful
try {