import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
-import org.jvnet.hk2.annotations.Service;
import org.onap.holmes.common.aai.config.AaiConfig;
import org.onap.holmes.common.config.MicroServiceConfig;
import org.onap.holmes.common.exception.CorrelationException;
import org.onap.holmes.common.utils.JerseyClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
import javax.ws.rs.client.Entity;
import javax.ws.rs.core.MultivaluedHashMap;
private String getResponse(String url) throws CorrelationException {
try {
- return new JerseyClient().headers(getHeaders()).get(url);
+ return JerseyClient.newInstance().headers(getHeaders()).get(url);
} catch (Exception e) {
throw new CorrelationException("Failed to get data from aai", e);
}
private void put(String url, String content) throws CorrelationException {
try {
- new JerseyClient().headers(getHeaders()).put(url, Entity.json(content));
+ JerseyClient.newInstance().headers(getHeaders()).put(url, Entity.json(content));
} catch (Exception e) {
throw new CorrelationException("Failed to put data in AAI", e);
}