summaryrefslogtreecommitdiffstats
path: root/adapters/mso-sdnc-adapter/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-sdnc-adapter/src/main')
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java9
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java8
2 files changed, 12 insertions, 5 deletions
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
index 69e015ea50..10175d83b5 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java
@@ -43,7 +43,6 @@ import org.openecomp.mso.logger.MsoLogger;
public class SDNCServiceRequestConnector extends SDNCConnector {
private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
- private static final String YES = "Y";
@Override
protected SDNCResponseCommon createResponseFromContent(int statusCode, String statusMessage,
String responseContent, TypedRequestTunables rt) {
@@ -58,7 +57,7 @@ public class SDNCServiceRequestConnector extends SDNCConnector {
@Override
protected SDNCErrorCommon createErrorResponse(int statusCode, String errMsg,
TypedRequestTunables rt) {
- return new SDNCServiceError(rt.getReqId(), String.valueOf(statusCode), errMsg, YES);
+ return new SDNCServiceError(rt.getReqId(), String.valueOf(statusCode), errMsg, "Y");
}
/**
@@ -134,10 +133,10 @@ public class SDNCServiceRequestConnector extends SDNCConnector {
// ack-final-indicator is optional: default to "Y".
if (ackFinalIndicator == null || ackFinalIndicator.trim().isEmpty()) {
- ackFinalIndicator = YES;
+ ackFinalIndicator = "Y";
}
- if (!YES.equals(ackFinalIndicator) && !"N".equals(ackFinalIndicator)) {
+ if (!ackFinalIndicator.equals("Y") && !"N".equals(ackFinalIndicator)) {
throw new ParseException("Invalid ack-final-indicator in SDNC response: '" + ackFinalIndicator + "'", 0);
}
@@ -149,7 +148,7 @@ public class SDNCServiceRequestConnector extends SDNCConnector {
// If the response code in the message from SDNC was not 2XX, return SDNCServiceError.
- if (!responseCode.matches("2[0-9][0-9]")) {
+ if (!responseCode.matches("2[0-9][0-9]") && !responseCode.equals("0")) {
// Not a 2XX response. Return SDNCServiceError.
return new SDNCServiceError(svcRequestId, responseCode, responseMessage, ackFinalIndicator);
}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
index 2c5355f5fb..f3ae6d62f7 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java
@@ -138,6 +138,14 @@ public class SDNCServiceRequestTask implements Runnable {
Element requestInformation = addChild(root, "request-information");
addTextChild(requestInformation, "request-id", request.getRequestInformation().getRequestId());
+ if(request.getRequestInformation().getRequestAction()!= null) {
+ addTextChild(requestInformation, "request-action",
+ request.getRequestInformation().getRequestAction());
+ }
+ if(request.getRequestInformation().getRequestSubAction()!= null) {
+ addTextChild(requestInformation, "request-sub-action",
+ request.getRequestInformation().getRequestSubAction());
+ }
addTextChild(requestInformation, "source", request.getRequestInformation().getSource());
addTextChild(requestInformation, "notification-url", request.getRequestInformation().getNotificationUrl());