diff options
3 files changed, 7 insertions, 1 deletions
diff --git a/properties-node/provider/pom.xml b/properties-node/provider/pom.xml index b3a1cf53..a9a3c94d 100755 --- a/properties-node/provider/pom.xml +++ b/properties-node/provider/pom.xml @@ -46,7 +46,6 @@ <dependency>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
- <scope>provided</scope>
</dependency>
</dependencies>
</project>
diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Parameters.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Parameters.java index c170cfc7..d3fec37e 100644 --- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Parameters.java +++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Parameters.java @@ -49,4 +49,5 @@ public class Parameters { public String oAuthSignatureMethod; public String oAuthVersion; public AuthType authtype; + public Boolean returnRequestPayload; } 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 d215d909..5168b3ec 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 @@ -112,6 +112,7 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { * <tr><td>customHttpHeaders</td><td>Optional</td><td>a list additional http headers to be passed in, follow the format in the example</td><td>X-CSI-MessageId=messageId,headerFieldName=headerFieldValue</td></tr> * <tr><td>dumpHeaders</td><td>Optional</td><td>when true writes http header content to context memory</td><td>true or false</td></tr> * <tr><td>partner</td><td>Optional</td><td>needed for DME2 calls</td><td>dme2proxy</td></tr> + * <tr><td>returnRequestPayload</td><td>Optional</td><td>used to return payload built in the request</td><td>true or false</td></tr> * </tbody> * </table> * @param ctx Reference to context memory @@ -150,6 +151,10 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { ctx.setAttribute(pp + "header." + a.getKey(), StringUtils.join(a.getValue(), ",")); } } + + if (p.returnRequestPayload && req != null) { + ctx.setAttribute(pp + "httpRequest", req); + } if (r.body != null && r.body.trim().length() > 0) { ctx.setAttribute(pp + "httpResponse", r.body); @@ -246,6 +251,7 @@ public class RestapiCallNode implements SvcLogicJavaPlugin { p.customHttpHeaders = parseParam(paramMap, "customHttpHeaders", false, null); p.partner = parseParam(paramMap, "partner", false, null); p.dumpHeaders = Boolean.valueOf(parseParam(paramMap, "dumpHeaders", false, null)); + p.returnRequestPayload = Boolean.valueOf(parseParam(paramMap, "returnRequestPayload", false, null)); return p; } |