Dataprocessor defineAction not working in release v3.5

Sorry, bit difficult to produce a complete example because of all the elements involved. But I have tried my client/server code on the old version and it works but the new version does not.

All I am trying is a simple:

      mydp.defineAction("error", function(response) {
        alert("ERROR");
        return true;
      });

Apologies I take that back. The error is in fact the JSONCommonConnector.java class I am using.

What is happening is that this class is converting ALL output to JSON format including the response.

I have put in a dirty hack to get around it but I am sure there is a better way to do this.

	public void output_as_xml(String data){
    if (data.startsWith("<data><action type=")) {
      super.output_as_xml(data);
    } else {
      http_response.reset();
      http_response.addHeader("Content-type", "text/javascript;charset=" + encoding);

      try {
        java.io.Writer out = http_response.getWriter();
        out.write(data);
        out.close();
        http_response.flushBuffer();
      } catch (IOException e){
        LogManager.getInstance().log("Error during data outputing");
        LogManager.getInstance().log(e.getMessage());
      }
		  end_run();
    }
	}

Any chance you guys could provide a proper fix for this?

Problem confirmed, fixed version will be available in few days.

Hi Stanislav,

Any news on the ETA for the fix?

Hi Stanislav,

Sorry to bug you, but any updates

Please try to use the updated jar file, it must work correctly. ( dataprocessor response will be formed as valid xml for all connectors )
connector.zip (276 KB)