Преглед на файлове

Merge pull request #9032 from rpastrana/HPCC-16123-configuremethod-multiple

HPCC-16123 Populate return fields

Reviewed-By: Russ Whitehead <william.whitehead@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman преди 8 години
родител
ревизия
306f48d9c5
променени са 2 файла, в които са добавени 20 реда и са изтрити 6 реда
  1. 6 3
      esp/scm/ws_esdlconfig.ecm
  2. 14 3
      esp/services/ws_esdlconfig/ws_esdlconfigservice.cpp

+ 6 - 3
esp/scm/ws_esdlconfig.ecm

@@ -161,9 +161,12 @@ ESPrequest [nil_remove] ConfigureESDLBindingMethodRequest
 
 ESPresponse [exceptions_inline] ConfigureESDLBindingMethodResponse
 {
-    string ServiceName;         //which ESDL definition are we configuring
-    int ServiceEsdlVersion;     //which version of the ESDL def are we configuring
-    string EspProcName;         //Name of ESP Process
+    string EspProcName;                          //Name of ESP Process
+    [max_ver("1.1")] string ServiceName;         //which ESDL definition are we configuring
+    [max_ver("1.1")] int ServiceEsdlVersion;     //which version of the ESDL def are we configuring
+    [min_ver("1.2")] string EspBindingName;
+    [min_ver("1.2")] string EsdlDefinitionID;    //The ESDL definition name.ver
+    [min_ver("1.2")] string EsdlServiceName;     //which ESDL definition are we configuring
     ESPstruct BaseESDLStatus status;
 };
 

+ 14 - 3
esp/services/ws_esdlconfig/ws_esdlconfigservice.cpp

@@ -945,9 +945,7 @@ bool CWsESDLConfigEx::onConfigureESDLBindingMethod(IEspContext &context, IEspCon
                 if (!existsESDLMethodDef(esdlDefinitionName.str(), esdlver, esdlServiceName.str(), methodName))
                 {
                     StringBuffer msg;
-                    msg.appendf(
-                            "Could not configure: Invalid Method name detected: '%s'. Does not exist in ESDL Service Definition: '%s' version '%d'",
-                            methodName, esdlServiceName.str(), esdlver);
+                    msg.appendf("Could not configure: Invalid Method name detected: '%s'. Does not exist in ESDL Service Definition: '%s' version '%d'", methodName, esdlServiceName.str(), esdlver);
                     resp.updateStatus().setCode(-1);
                     resp.updateStatus().setDescription(msg.str());
                     return false;
@@ -960,12 +958,25 @@ bool CWsESDLConfigEx::onConfigureESDLBindingMethod(IEspContext &context, IEspCon
                 }
             }
         }
+
+        resp.setEspProcName(espProcName.str());
+        resp.setEspBindingName(espBindingName.str());
+        resp.setEsdlDefinitionID(esdlDefIdSTR.str());
+        resp.setEsdlServiceName(esdlServiceName.str());
+
+        if (context.getClientVersion() < 1.2)
+        {
+            resp.setServiceName(esdlDefinitionName.str());
+            resp.setServiceEsdlVersion(esdlver);
+        }
     }
     catch(IException* e)
     {
        FORWARDEXCEPTION(context, e, -1);
     }
 
+    resp.updateStatus().setCode(0);
+
     return true;
 }