summaryrefslogtreecommitdiffstats
path: root/adapters/mso-vnf-adapter
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-vnf-adapter')
-rw-r--r--adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/BpelRestClient.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/BpelRestClient.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/BpelRestClient.java
index a4f1046df9..6dc0dc35d9 100644
--- a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/BpelRestClient.java
+++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/BpelRestClient.java
@@ -240,9 +240,6 @@ public class BpelRestClient {
LOGGER.debug("Sending to BPEL server: "+bpelUrl);
LOGGER.debug("Content is: "+toBpelStr);
- //Client 4.3+
- CloseableHttpClient client = HttpClients.createDefault();
-
//POST
HttpPost post = new HttpPost(bpelUrl);
if (credentials != null && !credentials.isEmpty())
@@ -260,9 +257,13 @@ public class BpelRestClient {
.build();
post.setConfig(requestConfig);
+ //Client 4.3+
+ CloseableHttpClient client = null;
+
//Client 4.3+
//Execute & GetResponse
try {
+ client = HttpClients.createDefault();
CloseableHttpResponse response = client.execute(post);
if (response != null) {
lastResponseCode = response.getStatusLine().getStatusCode();