aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/util/RestfulServices.java20
-rw-r--r--intentanalysis/src/main/resources/application.yaml5
2 files changed, 7 insertions, 18 deletions
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/util/RestfulServices.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/util/RestfulServices.java
index a9755bc..c922095 100644
--- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/util/RestfulServices.java
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/util/RestfulServices.java
@@ -49,27 +49,21 @@ public class RestfulServices {
public static <T> T create(String baseUrl, Class<T> clazz) {
Retrofit retrofit = new Retrofit.Builder().baseUrl(baseUrl)
- .addConverterFactory(JacksonConverterFactory.create()).build();
+ .addConverterFactory(JacksonConverterFactory.create()).build();
return retrofit.create(clazz);
}
public static <T> T create(Class<T> clazz, final String userName, final String passWord) {
//Set the interface response time
- OkHttpClient okHttpClient = new OkHttpClient.Builder().authenticator(new Authenticator() {
- @Nullable
- @Override
- public Request authenticate(@Nullable Route route, Response response) throws IOException {
- String authStr = Credentials.basic(userName, passWord);
- return response.request().newBuilder().addHeader("Authorization", authStr).build();
- }
- }).connectTimeout(300, TimeUnit.SECONDS).readTimeout(300, TimeUnit.SECONDS)
- .sslSocketFactory(getSSLSocketFactory(), new CustomTrustManager()).hostnameVerifier(getHostnameVerifier())
- .build();
+ OkHttpClient okHttpClient = new OkHttpClient.Builder()
+ .connectTimeout(300, TimeUnit.SECONDS)
+ .readTimeout(300, TimeUnit.SECONDS)
+ .build();
String msbUrl = getMSBIAGAddress();
- Retrofit retrofit = new Retrofit.Builder().baseUrl("https://" + msbUrl + "/").client(okHttpClient)
- .addConverterFactory(JacksonConverterFactory.create()).build();
+ Retrofit retrofit = new Retrofit.Builder().baseUrl("http://" + msbUrl + "/").client(okHttpClient)
+ .addConverterFactory(JacksonConverterFactory.create()).build();
return retrofit.create(clazz);
}
diff --git a/intentanalysis/src/main/resources/application.yaml b/intentanalysis/src/main/resources/application.yaml
index b4b4d81..6db6b46 100644
--- a/intentanalysis/src/main/resources/application.yaml
+++ b/intentanalysis/src/main/resources/application.yaml
@@ -2,11 +2,6 @@ server:
port: 8083
servlet:
context-path: /api/usecaseui-intent-analysis/v1
- ssl:
- protocol: TLS
- key-store: classpath:keystore/uuiIntentAnalysis.jks
- key-store-password: Aa123456
- key-store-type: JKS
spring:
datasource:
url: jdbc:postgresql://${POSTGRES_IP:127.0.0.1}:${POSTGRES_PORT:5432}/${POSTGRES_DB_NAME:intentdb}