DavidAKoontz
Programmer
I've just received the SDK for ReportNet - I know nothing about the product, I've been asked to write a session bean to make a connection to the ReportNet Server, run a report and pass that report on to the calling program.
It took me a while to figure out that the execute() was asynchronous! I've read in the SDK doc (pg 28 - example code) that one can set the primary & secondary "thresholds" to 0 and that this should make it wait til finished.
Upon trying this I got an Axis timeout.
Cognos support sent some more example code, it shows a completely different technique for getting the connection. Instead of calling the CognosReportNetServiceLocator getCognosReportNetPort(url) method I am supose to:
CognosReportNetServiceLocator service = new CognosReportNetServiceLocator();
oCrn = new CognosReportNetBindingStub(URL, service);
oCrn.setTimeout(0); // 0 turns the timeout off
Apparently this setTimeout on the BindingStub obj. is the trick to control the Axis timeouts.
Hey I'm game to hack the thing to get it to work - BUT Shouldn't a ServiceLocator be called to get a service, not passed to some constructor? And if I set the report options threshold value to zero - should this not in turn imply that the communication channel (what ever it is - doesn't matter to me) should handle this option. That is to say if I set an option at the SDK level it's the SDK's responsibility to make that happen. It appears to me that Cognos has a 'leaky abstraction'.
Well what ever - how have you solved the async/sync issue?
Thanks David
It took me a while to figure out that the execute() was asynchronous! I've read in the SDK doc (pg 28 - example code) that one can set the primary & secondary "thresholds" to 0 and that this should make it wait til finished.
Upon trying this I got an Axis timeout.
Cognos support sent some more example code, it shows a completely different technique for getting the connection. Instead of calling the CognosReportNetServiceLocator getCognosReportNetPort(url) method I am supose to:
CognosReportNetServiceLocator service = new CognosReportNetServiceLocator();
oCrn = new CognosReportNetBindingStub(URL, service);
oCrn.setTimeout(0); // 0 turns the timeout off
Apparently this setTimeout on the BindingStub obj. is the trick to control the Axis timeouts.
Hey I'm game to hack the thing to get it to work - BUT Shouldn't a ServiceLocator be called to get a service, not passed to some constructor? And if I set the report options threshold value to zero - should this not in turn imply that the communication channel (what ever it is - doesn't matter to me) should handle this option. That is to say if I set an option at the SDK level it's the SDK's responsibility to make that happen. It appears to me that Cognos has a 'leaky abstraction'.
Well what ever - how have you solved the async/sync issue?
Thanks David