Issue ID: GSO-60
authorj00302280 <j00101220@huawei.com>
Wed, 26 Oct 2016 12:37:30 +0000 (20:37 +0800)
committerj00302280 <j00101220@huawei.com>
Wed, 26 Oct 2016 12:37:30 +0000 (20:37 +0800)
Change-Id: I21a3cc86c326487f0c7df82616a66a00458334ca
Signed-off-by: j00302280 <j00101220@huawei.com>
servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImpl.java

index 4f592f5..5f23ad4 100644 (file)
@@ -94,9 +94,10 @@ public class ServiceGatewayImpl implements IServiceGateway {
                 // Record the result of registration
                 // (201:success;415:Invalid Parameter;500:Internal Server Error)
                 LOGGER.info("restful call result:"+ restfulRsp.getStatus());
-                id = restfulRsp.getRespHeaderStr(Constant.SERVICE_ID);
-                id = (null == id) ? restfulRsp.getRespHeaderStr(Constant.NS_INSTANCE_ID) : id;
-                id = (null == id) ? restfulRsp.getRespHeaderStr(Constant.JOB_ID) : id;
+                Map<String,Object> rspBody = JsonUtil.unMarshal(restfulRsp.getResponseContent(),Map.class);
+                id = (String)rspBody.get(Constant.SERVICE_ID);
+                id = (null == id) ? (String)rspBody.get(Constant.NS_INSTANCE_ID) : id;
+                id = (null == id) ? (String)rspBody.get(Constant.JOB_ID) : id;
             }
         } catch(ServiceException e) {
                LOGGER.error("service gateway create restful call result:", e);