+ /**
+ * Returns parameters from the parameter map.
+ *
+ * @param paramMap parameter map
+ * @param p parameters instance
+ * @return parameters filed instance
+ * @throws SvcLogicException when svc logic exception occurs
+ */
+ public static Parameters getParameters(Map<String, String> paramMap,
+ Parameters p)
+ throws SvcLogicException {
+ p.templateFileName = parseParam(paramMap, "templateFileName",
+ false, null);
+ p.requestBody = parseParam(paramMap, "requestBody", false, null);
+ p.restapiUrl = parseParam(paramMap, restapiUrlString, true, null);
+ validateUrl(p.restapiUrl);
+ p.restapiUser = parseParam(paramMap, "restapiUser", false, null);
+ p.restapiPassword = parseParam(paramMap, "restapiPassword", false,
+ null);
+ p.oAuthConsumerKey = parseParam(paramMap, "oAuthConsumerKey",
+ false, null);
+ p.oAuthConsumerSecret = parseParam(paramMap, "oAuthConsumerSecret",
+ false, null);
+ p.oAuthSignatureMethod = parseParam(paramMap, "oAuthSignatureMethod",
+ false, null);
+ p.oAuthVersion = parseParam(paramMap, "oAuthVersion", false, null);
+ p.contentType = parseParam(paramMap, "contentType", false, null);
+ p.format = Format.fromString(parseParam(paramMap, "format", false,
+ "json"));
+ p.authtype = fromString(parseParam(paramMap, "authType", false,
+ "unspecified"));
+ p.httpMethod = HttpMethod.fromString(parseParam(paramMap, "httpMethod",
+ false, "post"));
+ p.responsePrefix = parseParam(paramMap, responsePrefix, false, null);
+ p.listNameList = getListNameList(paramMap);
+ String skipSendingStr = paramMap.get(skipSendingMessage);
+ p.skipSending = "true".equalsIgnoreCase(skipSendingStr);
+ p.convertResponse = valueOf(parseParam(paramMap, "convertResponse",
+ false, "true"));
+ p.trustStoreFileName = parseParam(paramMap, "trustStoreFileName",
+ false, null);
+ p.trustStorePassword = parseParam(paramMap, "trustStorePassword",
+ false, null);
+ p.keyStoreFileName = parseParam(paramMap, "keyStoreFileName",
+ false, null);
+ p.keyStorePassword = parseParam(paramMap, "keyStorePassword",
+ false, null);
+ p.ssl = p.trustStoreFileName != null && p.trustStorePassword != null
+ && p.keyStoreFileName != null && p.keyStorePassword != null;
+ p.customHttpHeaders = parseParam(paramMap, "customHttpHeaders",
+ false, null);
+ p.partner = parseParam(paramMap, "partner", false, null);
+ p.dumpHeaders = valueOf(parseParam(paramMap, "dumpHeaders",
+ false, null));
+ p.returnRequestPayload = valueOf(parseParam(
+ paramMap, "returnRequestPayload", false, null));
+ p.accept = parseParam(paramMap, "accept",
+ false, null);
+ p.multipartFormData = valueOf(parseParam(paramMap, "multipartFormData",
+ false, "false"));
+ p.multipartFile = parseParam(paramMap, "multipartFile",
+ false, null);
+ return p;