Focal Point
[SOLVED] How to handle POST request in webfocus

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

November 11, 2013, 11:45 AM
santu
[SOLVED] How to handle POST request in webfocus
Hi All,

I am working on java and webfocus pdf reports. I am able to get the reports using below code from JavaScript (below code following GET request URL).

 
var url = webFocusUrl + "IBIC_server="
												+ webFocusServer
												+ "&IBIF_webapp=" + webApp
												+ "&IBIAPP_app="
												+ applicationName
												+ "&IBIF_ex=basedatahistory"
												+ "&SORTBY="
												+ sortBy2.toUpperCase()
												+ "&SORTORDER=" + sortOrder
												+ "&BANKACCT=" + accNbr
												+ "&INTEXPIND=" + intExpInd
												+ "&ALLOCMTH=" + finalDate // selDate
												+ "&INCLFLG=" + incExl
												+"&TAIND="+accType
												+ "";

																				window
												.open(
														url,
														'open_window',
														'menubar, toolbar, location, directories, status, scrollbars, resizable, dependent, width=640, height=480, left=0, top=0');

 


Since I have large number of parameters, I wanted to pass the parameters as POST request (which will keep the parameters in request body) because there is a limitation on length of URL.

Can anyone suggest me on this issue?

Thanks,
Santu

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


Web FOCUS 7.7.03
PDF
November 11, 2013, 11:51 AM
Kamesh
Are you getting any error when send it with POST request?


WFConsultant

WF 8105M on Win7/Tomcat
November 11, 2013, 03:45 PM
Waz
I would have thought that you could just create a page and submit it.

Am I missing something ?


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!

November 12, 2013, 10:11 AM
eric.woerle
I believe to do it as a post request you need to capture all of the values as input tags and not as a URL. That's how webfocus used to do it in the earlier versions before all of the XML got incorporated. You still see some of that hanging around in the html.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
November 13, 2013, 03:41 PM
<FreSte>
Santu,

What I recently did is writing all those variables (in the main procedure) to a file in the FOCCACHE directory.
In the MAIN-procedure you only have to pass the variable for the column that was click'd on.

In the drilldown-procedure (in your example the basedatahistory.fex) just -INCLUDE the file that was written with
all the parameters.

Works like a charm.

-Fred-
November 15, 2013, 11:51 AM
santu
Hi All,

Thank you for all of your suggessions.

I have resolved this issue from java end. This hidden parameters I can access as &FILTERDATA

  
<form name="postData" id="webfocus" action="http://server name:port/ibi_apps/WFServlet?IBIF_ex=reportname&IBIC_server=EDASERVE&IBIF_webapp=/ibi_apps&IBIAPP_app=applicationname"  method="post" target="_blank">
			Name:<INPUT type="hidden" name="NAME" id="FILTERDATA"/>
		<br/>

	</form>
	<label id="ok">PRINT</label>

$('#webfocus').submit();



Web FOCUS 7.7.03
PDF