Focal Point
Report Caster Web Services for 7.1.1

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

January 23, 2006, 10:25 AM
Declan
Report Caster Web Services for 7.1.1
Does anyone have any advice about 'best practice' for the Report Caster Web Services.
January 24, 2006, 10:15 AM
dhagen
I don't know if there is any best practice guide, but if you can explain what type of app your building, I might be able to give you some practical advice.
January 24, 2006, 01:33 PM
<DocServices>
The ReportCaster Web Services 7.1 manual (DN4500716.0505) has some high level information in the intro chapter that may be of some use, but it is not exactly Best Practices material.

You can view, download, and/or buy this manual from the i-Base: The Technical Documentation Library.

If you have an InfoResponse ID, log on to the Tech Support Web site. From the top navigation bar, click Publications then select Tech Library Home. By logging in first, you can download the PDF file and/or view the HTMLHelp version.

Hope this helps.

Regards,
Jennifer
January 24, 2006, 03:09 PM
Declan
The application needs to trigger reports when given events have happened or are have completed within the application. The standard approach that we have employed is to trigger the reports using the Report Servers Web Services. We are currently in the process of moving the Report Server to WebFOCUS.

When a request is made it needs to be run as quickly as possible and the results saved in the Report Library. Since we need to save the results in the Report Library we switched to use the Report Caster Web Services from our first implementation which used the WebFOCUS implementation.
January 25, 2006, 04:55 PM
dhagen
When you trigger a process that will schedule a report, the newly scheduled report will always wait for the next execution run (typically 1 min intervals). It appears that your timing is critical, so I would suggest that you pre-schedule all of your potential reports as a "run once" option. When the event occurs, use the ScheduleManagerWS.run function for emediate execution of your report.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
January 25, 2006, 08:36 PM
Declan
Thanks DHagan,

Thats pretty much the approach we have taken, but I am having problem getting back the log information, even though I can see it on the Report Caster GUI. Has anyone else seen any errors with the Log Service.
January 26, 2006, 12:29 PM
dhagen
I havent had to do any log work with the api's for some time. Could you give a little more detail on what the actual problem is?


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
February 01, 2006, 03:51 PM
Declan
Sorry Tony,

I have raised a ticket with IBI Tech Support but here is the same code:

// These are a Schedule Id and its Job Id that I know have been run and visible throught the web client.

String jobId = "J1143o9ng756";
String scheduleId = "S113scidkb36";

com.ibi.schema.reportcaster711.services.log.LogManagerWSService LService =
new com.ibi.schema.reportcaster711.services.log.LogManagerWSServiceLocator();
com.ibi.schema.reportcaster711.services.log.LogManagerWS logService = LService.getLogService();

com.ibi.schema.reportcaster711.services.log.Authenticate a2 =
new com.ibi.schema.reportcaster711.services.log.Authenticate();
a2.setUser(user.getUserId());
a2.setPassword(user.getPassword());
a2.setSecurityToken(user.getToken());


logger.info("Attempting to get Schedule Id : " + scheduleId);

// com.ibi.schema.reportcaster711.services.log.DsLog parent = logService.getLastLogByScheduleId(a2, scheduleId);
// com.ibi.schema.reportcaster711.services.log.DsLog parent = logService.getLogByJobId(a2, scheduleId);

com.ibi.schema.reportcaster711.services.log.DsLog[] parent =
logService.getLogInfoListByOwner(a2, user.getUserId());

for (int i = 0; i < parent.length; i++) {
com.ibi.schema.reportcaster711.services.log.DsLog log = parent[i];
logger.info(log.getScheduleId());
}

If I try any of these calls I get the following error:

2006-01-24 12:28:22,221 main ERROR ReportCasterWsdlReport: - Actuate Report
Error: AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.reflect.InvocationTargetException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.reflect.InvocationTargetException
faultActor:
faultNode:
faultDetail:

java.lang.reflect.InvocationTargetException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:2-
60)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:16-
9)
at org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati-
onContextImpl.java:1015)
at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator-
.java:1550)
at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM-
LDocumentScanner.java:1204)
at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.-
java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon-
textImpl.java:242)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at com.ibi.schema.reportcaster711.services.log.LogServiceSoapBindingStub.getLas-
tLogByScheduleId(LogServiceSoapBindingStub.java:390)
at com.fidelity.gpws.framework.reports.webfocus.ReportCasterWsdlReport.doExecut-
eReport(ReportCasterWsdlReport.java:638)
at com.fidelity.gpws.framework.reports.webfocus.ReportCasterWsdlReport.doExecut-
eAndTransmitReport(ReportCasterWsdlReport.java:290)

This is for WebFOCUS 711 and ReportCaster 711.
February 02, 2006, 05:46 PM
dhagen
Ok,

This is obviously crapping out at the logon stage. Are you invoking your logonService at any point? This is a quick test (axis) sample that works:

 /*
 * Created on Feb 2, 2006
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package rctest;

import ReportCaster.*;
import localhost.rcaster.services.LogonService.*;
import localhost.rcaster.services.LogService.*;

/**
 * @author dhagen
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class ScheduleTesting {
	
	public static void main(String[] args) {
		
		String jobId = "J113cks74k19";
		
		// authenticate to caster first ...
		try {
			LogonManagerWSService LogonService = new LogonManagerWSServiceLocator();
			LogonManagerWS RCLogon = LogonService.getLogonService();
			
			LogManagerWSService LService = new LogManagerWSServiceLocator();
			LogManagerWS L = LService.getLogService(); 
			
			String sectoken = RCLogon.logon("admin","");
			System.out.println("Security Token: " + sectoken);
			
			try	{
				Authenticate Authobj = new Authenticate();
				Authobj.setSecurityToken(sectoken);
				
				DsLog log = L.getLogByJobId(Authobj, jobId);
				
				for ( int i=0; i<log.getLogElementList().length; i++ )
				{
					String newOutput = log.getLogElementList()[i].getMessage();
					System.out.println("Log: " + newOutput);
				}
			}
			catch (Exception e)	{
				System.out.println(e.toString());
			}
			
		}
		catch (Exception e)
		{
			System.out.println(e.toString());
		}
	}

}
 


Hope this helps
February 06, 2006, 12:17 PM
Declan
The code has already logged in. At point the LogService is being accessed the code has already setup and run a schedule to run a report, using the Schedule Service, and checked that the Schedule has run, using the Console Service. I am pretty sure the login at this point is good.

Here is the SOAP Request that is being transmitted (I have dummed out the Security Token as it fairly:

"



S114o74tg061


XXXXXXX




"

Thanks

Declan