diff options
author | j00302280 <j00101220@huawei.com> | 2016-10-26 20:37:30 +0800 |
---|---|---|
committer | j00302280 <j00101220@huawei.com> | 2016-10-26 20:37:30 +0800 |
commit | 1fb807a55d7a3d9c9bd1bcbefd7b023d280e36a2 (patch) | |
tree | fc559a3c95d6a008dfc534f3119c9fbd10af7bee /servicegateway/service | |
parent | 991a89223097363b5dc7005d4732144efa0288a9 (diff) |
Issue ID: GSO-60
Change-Id: I21a3cc86c326487f0c7df82616a66a00458334ca
Signed-off-by: j00302280 <j00101220@huawei.com>
Diffstat (limited to 'servicegateway/service')
-rw-r--r-- | servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImpl.java | 7 |
1 files changed, 4 insertions, 3 deletions
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 4f592f5b..5f23ad4e 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 @@ -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); |