Okay, in the interest of knowledge sharing.... When it comes to outbound REST calls from JDE, I suggest that the connector be put into its' own ORCH and that be the only component in that orchestration. Set it to return raw data. A top level ORCH is where all of the real work is done. In the top level orchestration which calls the connector orchestration, set the connector ORCH to return raw data as well. The connector has to return the response in 100% of all cases. This is how I have come to learn to do it, thanks to Nami on the Oracle help line.
When you do this, the top level ORCH will get the connector response regardless of what it is. In my opinion (based on my very limited experience with outbound REST calls), a connector will yield 3 responses: success, failure returned by a server (communications issues, authentication, token, etc), or failure based on an invalid request. In the top level ORCH, immediately following the connector ORCH, add a groovy custom request to parse the response. Here is a sample of how I do this.
Note, try/catch code blocks are used to determine which of the 3 possible responses was actually received. try/catch in groovy allows the statement to execute if the json element is not present without crashing groovy with a null reference error. An example - I am speaking about this statement specifically - "testString = inResponse.continuedOnError[0];". Each try/catch block contains a statement similar to this one and this is how we can use groovy to figure out which of the 3 possible responses were returned by the connector.
import com.oracle.e1.common.OrchestrationAttributes;
import java.text.SimpleDateFormat;
import groovy.json.*;
HashMap<String, Object> main(OrchestrationAttributes orchAttr, HashMap inputMap)
{
HashMap<String, Object> returnMap = new HashMap<String, Object>();
String inResponseString = (String)inputMap.get("inResponseString");
def inResponse = new JsonSlurper().parseText(inResponseString);
String orchestrationName = orchAttr.getOrchestrationName();
String testString;
String responseType;
String responseStatus;
String responseStatusCode;
String responseErrorMessage;
// test for failed token or authentication (the server rejected the request)
try{
testString = inResponse.continuedOnError[0];
responseStatus = 'Failed - Token';
responseStatusCode = inResponse.continuedOnError[0].message."ServiceRequest: 55CN_SalesForceCase_Connector".statusCode;
responseErrorMessage = inResponse.continuedOnError[0].message."ServiceRequest: 55CN_SalesForceCase_Connector".error;
} catch(Exception e){}
// test for failed data
try{
testString = inResponse.ConnectorRequest1.compositeResponse[0];
responseStatus = 'Failed - Data';
responseStatusCode = inResponse.ConnectorRequest1.compositeResponse[0].httpStatusCode;
responseErrorMessage = inResponse.ConnectorRequest1.compositeResponse[0].body[0].message;
} catch(Exception e){}
// test for success
try{
testString = inResponse.compositeResponse[0].httpsStatusCode;
responseStatus = 'Success';
responseStatusCode = inResponse.compositeResponse[0].httpStatusCode;
responseErrorMessage = inResponse.compositeResponse[0].referenceId;
} catch(Exception e){}
returnMap.put("orchName", orchestrationName)
returnMap.put("inResponseString", inResponseString)
returnMap.put("responseStatus", responseStatus);
returnMap.put("responseStatusCode", responseStatusCode);
returnMap.put("responseErrorMessage", responseErrorMessage);
return returnMap;
}