Home » Developer & Programmer » Forms » Web.Show_Document - Authentication
Web.Show_Document - Authentication [message #335963] Thu, 24 July 2008 04:59 Go to next message
Signum
Messages: 13
Registered: July 2008
Junior Member
Hi, everyone.

I have a problem with Web.Show_Document. I'm using this procedure to load a report from a form module. However, I have to specify the "userid" parameter in the URL which is not possible for a security reason. So, I found this whitepaper (http://www.oracle.com/technology/products/forms/pdf/10g/frmwebshowdoc_rep.pdf) about how securing "Web.Show_Document". I followed all the instructions but I keep having this error on the Java Console :

oracle.forms.net.ConnectionException: Forms session <4> aborted : Unable to communicate with the runtime process.

	at oracle.forms.net.ConnectionException.createConnectionException(Unknown Source)
	at oracle.forms.net.HTTPNStream.getResponse(Unknown Source)
	at oracle.forms.net.HTTPNStream.doFlush(Unknown Source)
	at oracle.forms.net.HTTPNStream.flush(Unknown Source)
	at java.io.DataOutputStream.flush(Unknown Source)
	at oracle.forms.net.StreamMessageWriter.run(Unknown Source)


Here is the code I use :

message('test');
message('test');

set_custom_property('CONTROL.USERID_BEAN',1,'ADD_USERID', get_application_property(username)||'/'||
get_application_property(password)||'@'||
get_application_property(connect_string));

message('test2');
message('test2');

set_custom_property('CONTROL.USERID_BEAN',1,'WRITE_USERID_COOKIE','10g');


The first message test always works (as expected) but the second one was never displayed so I think the error comes from the JavaBean. The JavaBean was correctly added (in a data block called "CONTROL" and the JavaBean has "USERID_BEAN" as name) with the implementation class "oracle.reports.utility.FrmReportsInteg". The "Get_Application_Property" function works fine and always returns the right value.

For info, I'm using Forms 10g, and Database 10g.

So, what's the problem here ? And is there a way to avoid using the "userid" parameter like authenticate the user when he/she uses his/her login and password for the first form module ? Yes, I can use "RUN_REPORT_OBJECT" but I don't want to add a report object to my form module (there are more than 100 reports to add and I don't want anyone to modify this form module when there will be a new report).

[Updated on: Thu, 24 July 2008 05:02]

Report message to a moderator

Re: Web.Show_Document - Authentication [message #336203 is a reply to message #335963] Fri, 25 July 2008 03:15 Go to previous message
Signum
Messages: 13
Registered: July 2008
Junior Member
I figured out what the problem was. The JavaBean component was not added to an active form (the one who creates the cookie) ans was only on a control block, that's why it kept showing the error...

Well, now I have another problem. It seems that the cookie cannot be created without specifying a domain and I'm testing it with localhost which is not a domain... I even tried the IP address but it didn't work. I read somewhere that the domain is set to " " whenever there is no domain set (or if it's not valid such as localhost, IP address, etc...).

Is there a way to test the cookie in localhost ? :/ Or create a domain (I mean for free and just for tests) ?

[Updated on: Fri, 25 July 2008 03:19]

Report message to a moderator

Previous Topic: Same built-in procedures working in menus but non functional in toolbar buttons.
Next Topic: d2kwutil library.
Goto Forum:
  


Current Time: Mon Feb 17 17:38:45 CST 2025