From f360b7b2bc9ed8d321dade9cadafe2ebda4f46ab Mon Sep 17 00:00:00 2001 From: "Smokowski, Kevin (ks6305)" Date: Tue, 2 Apr 2019 13:38:06 +0000 Subject: [PATCH] RestApiCallNode HTTP method patch not working RestApiCallNode patch not working after upgrading from sun jersey to glassfish, apply workaround Change-Id: I3a36b9c0c8b241b46059edec08fb80087e67fd93 Issue-ID: CCSDK-1191 Signed-off-by: Smokowski, Kevin (ks6305) --- .../java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java index 4c04c9d3..521c66cb 100644 --- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java +++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/RestapiCallNode.java @@ -58,6 +58,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.UriBuilder; import org.apache.commons.lang3.StringUtils; import org.glassfish.jersey.client.ClientProperties; +import org.glassfish.jersey.client.HttpUrlConnectorProvider; import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; import org.glassfish.jersey.client.oauth1.ConsumerCredentials; import org.glassfish.jersey.client.oauth1.OAuth1ClientSupport; @@ -622,6 +623,8 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { .build(); } client.property(ClientProperties.CONNECT_TIMEOUT, 5000); + // Needed to support additional HTTP methods such as PATCH + client.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true); WebTarget webTarget = addAuthType(client, p).target(p.restapiUrl); -- 2.16.6