gwt using native javascript to send POST request for remote server fails
===

I am working on a GWT application that needs to send data to a remote cognos server to run a few reports. I am using native javascript code to send data but somehow cognos server doesn't receive all the data, we are sending large data as parameters in the URL. This is the code: 

    private static native void openReportWindow(String action, String uiObject, String reportName, String reportParams) /*-{
	    var form = document.createElement("form");
        form.setAttribute("method", "POST");
        form.setAttribute("action", action);
        form.setAttribute("target", "reports");

		var reportValues = new Array();
		reportValues = reportParams.split('&');

		for(var i=0;i<reportValues.length;i++) {
			var tempArr = new Array();
			tempArr = reportValues[i].split('=');
			var hiddenField = document.createElement("input");
			hiddenField.setAttribute("name", tempArr[0]);
			hiddenField.setAttribute("value", tempArr[1]);
			form.appendChild(hiddenField);
		}
        
		document.body.appendChild(form);

		// open a new window to display the reports
		window.open(action, 'reports', 'scrollbars=yes,menubar=no,height=600,width=800,resizable=yes,toolbar=no,status=no');
		form.submit();
		
	}-*/;

Is there a better way to do this? 

Thanks for all the help. 

