Focal Point
[CLOSED] Javascript Send - Long parameter string gets cut off

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4587013106

March 31, 2011, 02:40 PM
jammer
[CLOSED] Javascript Send - Long parameter string gets cut off
I am not very good at javascript. This is some inherited code I have.

cellDashboard.open("POST", url, false);
cellDashboard.send(webFex);

(The url is http + server name + port + ibiweb.exe)

The varible webfex is put together by function setDMPostQueryString shown below.


The variable webex returned is
IBIS_page=DFLTPROMPT&
IBIC_SERVER=&
IBIC_user=temp&
IBIC_pass=temp&
IBIS_prcname=fexname&
IBIF_appname=baseapp&
CGIX_cmd=PromptDflt&
CGIX_option=nodflt*
IBIS_file=&
IBIS_connect=on&
IBIS_disconnect=on&
IBIC_svc_name=WC_DEFAULT&
IBIS_appusername=temp&
IBIF_cmd=EX%20CMASAP%20REQ_NAME%20fexname&

THEN A PARAMETER STRING


This works fine when the PARAMETER string length is short but when it is long my fex does not receive all the parameters. It seems like something limits the size of the string passed. This works fine on my production server but on our NEW Development Server this does not work.

The NEW Server is:
WebFocus 7.7.02
Tomcat 6.0
Windows 2008 64bit
Internet Explorer 8


Can anyone tell me if there is some setting I need to make?



**************************************
function setDMPostQueryString(fexname, server, path, params) {
var fParams = new Array();
alert(params);
fParams.push(encodeURIComponent("IBIS_page") + "=" + encodeURIComponent("DFLTPROMPT"));
fParams.push(encodeURIComponent("IBIC_Server") + "=" + encodeURIComponent(""));
fParams.push(encodeURIComponent("IBIC_user") + "=" + encodeURIComponent("irfuser"));
fParams.push(encodeURIComponent("IBIC_pass") + "=" + encodeURIComponent("irfuser"));
fParams.push(encodeURIComponent("IBIS_prcname") + "=" + encodeURIComponent(fexname));
fParams.push(encodeURIComponent("IBIF_appname") + "=" + encodeURIComponent(path));
fParams.push(encodeURIComponent("CGIX_cmd") + "=" + encodeURIComponent("PromptDflt"));
fParams.push(encodeURIComponent("CGIX_option") + "=" + encodeURIComponent("nodflt"));
fParams.push(encodeURIComponent("IBIS_file") + "=" + encodeURIComponent(""));
fParams.push(encodeURIComponent("IBIS_connect") + "=" + encodeURIComponent("on"));
fParams.push(encodeURIComponent("IBIS_disconnect") + "=" + encodeURIComponent("on"));
fParams.push(encodeURIComponent("IBIC_svc_name") + "=" + encodeURIComponent("WC_DEFAULT"));
fParams.push(encodeURIComponent("IBIS_appusername") + "=" + encodeURIComponent("irfuser"));
fParams.push(encodeURIComponent("IBIF_cmd") + "=" + encodeURIComponent("EX CMASAP REQ_NAME=" + fexname + ",PARMS=\"" + params +"\""));
return fParams.join("&");
}

This message has been edited. Last edited by: Kerry,


Webfocus 7.6.4
Windows 2003 Server, SQL Server 2005
Excel, HTML , JavaScript ,and PDF.
Reportcaster, BID, Tomcat
March 31, 2011, 04:17 PM
Waz
There is a limit to a length of a URL, this is effectively submitting a form with a method of GET, all the parameters are visible.

The solution to this is to have a form available, and have javascript set the parameters then submit it, making sure that the forms method is POST, and not GET.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

March 31, 2011, 04:28 PM
jammer
I believe that is what I am doing:
cellDashboard.open("POST", url, false);

the url does not have the parameters list - it is in the form.

(and it works on production server?)


Webfocus 7.6.4
Windows 2003 Server, SQL Server 2005
Excel, HTML , JavaScript ,and PDF.
Reportcaster, BID, Tomcat
April 01, 2011, 11:53 AM
jammer
Is there a seting in tomcat?


Webfocus 7.6.4
Windows 2003 Server, SQL Server 2005
Excel, HTML , JavaScript ,and PDF.
Reportcaster, BID, Tomcat
April 03, 2011, 06:10 PM
Waz
quote:
cellDashboard


I think this is acase of understanding what cellDashboard.open/send does.

Do you know where this function comes from ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

April 04, 2011, 09:43 AM
dlogan
quote:
(The url is http + server name + port + ibiweb.exe)


I think this is likely your problem. I seem to recall there were size limitations built into CGI.

Since you're running 764, you might also have a Servlet running. If so, you really should be using:

http://HOST:PORT/ibi_apps/WFServlet

Rather than ibiweb.exe.

The other possibility is that your new production server is running URLScan, or some other security filter that doesn't like what you're passing in your parameters.

Hopefully this helps...

You can also compare the server.xml files between the two Tomcat's if you wish. There are parameters in Tomcat that control the HTTP Header and the POST/GET sizes accepted.

I'd be kind of surprised if you were hitting these, but it is possible.

The settings would be on the connector you're going through. (e.g. If you're going through IIS, it would be the AJP connector at port 8009).


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


April 04, 2011, 09:50 AM
dlogan
quote:
I think this is acase of understanding what cellDashboard.open/send does.


BTW, "open" and "send" I am assuming are the standard AJAX/SJAX calls using XMLHTTPRequest.

http://www.w3schools.com/ajax/...httprequest_send.asp


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP


April 04, 2011, 12:29 PM
jammer
dlogon,

thanks - this gives me something to look at

Prior I looked into the CGI think but I will also relook at that


Webfocus 7.6.4
Windows 2003 Server, SQL Server 2005
Excel, HTML , JavaScript ,and PDF.
Reportcaster, BID, Tomcat
April 04, 2011, 05:36 PM
jammer
I have looked at everything and no luck

I have a feeling it has something to do with running CGI instead of WFServlet, but I can't seem to get the application to execute the datamigrator flow by changing it to http://HOST:PORT/ibi_apps/WFServlet

In the meantime I have a cheap workaround until I can understand how to start a datamigrator flow "cmasap" from a webpage.


Webfocus 7.6.4
Windows 2003 Server, SQL Server 2005
Excel, HTML , JavaScript ,and PDF.
Reportcaster, BID, Tomcat
April 05, 2011, 10:35 AM
Francis Mariani
I think it would have been useful if you mentioned in your original post that this issue is occurring in Data Migrator ...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
April 05, 2011, 10:58 AM
jammer
Well - it an application from the bi dashboard that executes a datamigrator flow.

I do not believe my problem is with datamigrator since I can manually create my parameters with datamigrator and it accepts all the parameters.

(I created the iway post hoping the datamigrator folks could help)


Webfocus 7.6.4
Windows 2003 Server, SQL Server 2005
Excel, HTML , JavaScript ,and PDF.
Reportcaster, BID, Tomcat
April 06, 2011, 08:43 AM
dlogan
How long is the request? (e.g. How many characters?).

Running an HTTP trace with something like Fiddler2 (http://www.fiddler2.com), might tell you more information as well.

You could at least compare the requests from Prod and Dev and validate that the entire requests are exactly the same between the two servers and something else is influencing things.


WF 71.x, 76.x, 7701, 8.0 Beta OS: Linux, Win2k3, Win2k, Win2k8, WinXP