Removed separate doPost call in callout execution as it was duplicated (service already calls it).
authorAntonio Moreno <antonio.moreno@openbravo.com>
Tue, 08 Mar 2011 12:48:37 +0100
changeset 11084 25740f5d26f9
parent 11083 d0fe886ea0dd
child 11085 475327b2ce2d
Removed separate doPost call in callout execution as it was duplicated (service already calls it).
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Tue Mar 08 11:07:40 2011 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Tue Mar 08 12:48:37 2011 +0100
@@ -774,13 +774,9 @@
         calloutsToCall.remove(calloutClassName);
         lastfieldChangedList.remove(lastFieldChanged);
         Object calloutInstance = calloutClass.newInstance();
-        Method method = null;
         Method init = null;
         Method service = null;
         for (Method m : calloutClass.getMethods()) {
-          if (m.getName().equals("doPost")) {
-            method = m;
-          }
           if (m.getName().equals("init") && m.getParameterTypes().length == 1) {
             init = m;
           }
@@ -789,7 +785,7 @@
           }
         }
 
-        if (method == null || init == null || service == null) {
+        if (init == null || service == null) {
           log.info("Couldn't find method in Callout " + calloutClassName);
         } else {
           RequestContext rq = RequestContext.get();
@@ -804,7 +800,6 @@
           CalloutHttpServletResponse fakeResponse = new CalloutHttpServletResponse(rq.getResponse());
           Object[] arguments = { rq.getRequest(), fakeResponse };
           service.invoke(calloutInstance, arguments);
-          method.invoke(calloutInstance, arguments);
           String calloutResponse = fakeResponse.getOutputFromWriter();
 
           // Now we parse the callout response and modify the stored values of the columns modified