diff options
Diffstat (limited to 'catalog-core/catalog-mgr/src/main/java')
-rw-r--r-- | catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/Wso2ServiceConsumer.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/Wso2ServiceConsumer.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/Wso2ServiceConsumer.java index da52dcd7..48b866e0 100644 --- a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/Wso2ServiceConsumer.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/plan/wso2/Wso2ServiceConsumer.java @@ -66,6 +66,11 @@ public class Wso2ServiceConsumer { Integer.parseInt(Config.getConfigration().getWso2HostPort()), WSO2_APP_URL,
buildRequest(ins, planFilePath));
+ if (res.getStatusCode() == null || res.getResult() == null) {
+ throw new CatalogResourceException(
+ "Deploy Package return null. Response = " + res);
+ }
+
if (200 == res.getStatusCode() || 201 == res.getStatusCode()) {
DeployPackageResponse response =
new Gson().fromJson(res.getResult(), DeployPackageResponse.class);
@@ -182,4 +187,3 @@ public class Wso2ServiceConsumer { }
}
-
|