Focal Point
[CLOSED]Help for WebFOCUS RESTful Web Services

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

March 30, 2016, 03:04 PM
rbissonMDF
[CLOSED]Help for WebFOCUS RESTful Web Services
Hi,

We try to use the WebFOCUS RESTful Web Service.

Our goal with the Web Service is to build a more friendly interface to create report schedule.
Is there someone who uses it to add schedule in ReportCaster by using fex and mas file?
If yes, how do you do, and which authentication are you using in the adpater?

Thank you

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 8.1.5
Windows, All Outputs
March 30, 2016, 04:57 PM
Waz
We build an HTML interface to create caster jobs. It uses RESTful web services to create modify and delete the jobs.

The call syntax is well defined in the documentation.


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, 2016, 07:22 AM
Ricardo Augusto
http://infocenter.informationb...Fsource%2Ftopic8.htm


WebFOCUS 8.1.05 / APP Studio
March 31, 2016, 09:01 AM
rbissonMDF
Waz, your HTML interface, did you build it into WebFOCUS or it is external and you do the call with a HTTPRequest?

We already have the doc..

Our IBI contact suggest us to do call to the Web Service using synonym and call it from a fex procedure. but we get a return code: 1401, Distribution error creating item.
March 31, 2016, 05:15 PM
Waz
One of the issues with calling via a FEX is that you need two calls. The first to log in, the second to issue the action.

If, like us, you create an HTML page/javascript to do the same, you are already authenticated from logging in and only have to issue the action.


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 01, 2016, 09:45 AM
rbissonMDF
Waz,

I did some test with the chrome plugin POSTMAN.

If in the XML bloc distributionList we put the information for storage library or ftp it works fine.
But for Email we got error message returncode="8002" returndesc="Serialization error (improper XML) "

here by request body:

URL: http://myserver.host.com:1080/ibi_apps/rs/ibfs

IBIRS_path=/WFC/Repository/RESTful_Web_Services/Car_Reports/REST_Schedule.sch
&IBIRS_action=put
&IBIRS_replace=false
&IBIRS_object=<rootObject _jt="IBFSCasterObject" description="Schedule Created through REST" type="CasterSchedule">
	<casterObject _jt="CasterSchedule" active="true" deleteJobAfterRun="false" description="Schedule Created through REST" owner="admin" priority="3" traceType="0">
		<notification _jt="CasterScheduleNotification" addressForBriefNotification="" addressForFullNotification="" description="test1" from="" subject="" type="INACTIVE" />
		<distributionList _jt="array" itemsClass="CasterScheduleDistribution" size="1">
			<item _jt="CasterScheduleDistributionEmail"
				authEnabled="false" authPassword="" authUserId="" description="Email"
				enabled="true" index="0" inlineMessage="Here your report by email"
				inlineTaskIndex="" mailFrom="test@test.com"
				mailReplyAddress="test@test.com" mailServerName="smtp.server.com"
				mailSubject="Your report by email" sendingReportAsAttachment="true"
				sslEnabled="false" tlsEnabled="false" zipFileName="" zipResult="false">
				<destination _jt="CasterScheduleDestination" distributionFile=""
					distributionListFullPath="" singleAddress="test@test.com"
					type="SINGLE_ADDRESS" />
			</item>
		</distributionList>
		<timeInfoList _jt="array" itemsClass="CasterScheduleTimeInfo" size="1">
			<item class="ibi.broker.api.data.schedule.TimeInfoOnce"
				description="test2" enabled="true" index="0" name="">
				<startTime _jt="calendar" time="1355756400000" />
			</item>
		</timeInfoList>
		<taskList _jt="array" itemsClass="CasterScheduleTask" size="1">
			<item alertEnabled="false" burst="true"
				class="ibi.broker.api.data.schedule.TaskStandardReport" description="Task 1"
				domainHREF="" enabled="true" execId="guest" execPassword="guest"
				firstPostProcessingProcedure="" firstPreProcessingProcedure=""
				index="0" procedureDescription=""
				procedureName="IBFS:/WFC/Repository/RESTful_Web_Services/Car_Reports/CarReport.fex"
				reportName="car_sales.htm" secondPostProcessingProcedure=""
				secondPreProcessingProcedure="" sendFormat="HTML" serverName="EDASERVE">
				<parameterList _jt="array" itemsClass="CasterScheduleParameter"
					size="1">
					<item _jt="CasterScheduleParameter" enabled="true" index="0" name="COUNTRY" value="ENGLAND" />
				</parameterList>
			</item>
		</taskList>
	</casterObject>
</rootObject>


Did create schedule for email distribution ?

Thanks

René


WebFOCUS 8.1.5
Windows, All Outputs
April 01, 2016, 03:39 PM
rbissonMDF
Hi I found my problem, its was the parameter inlineTaskIndex="" into distributionList block.
when a delete it the schedule was created.

thanks a lot for your help.

I have another question for you, in the block taskList how do you get the execId and execPassword ?

for execId I know IBIMR_user but for password ?


WebFOCUS 8.1.5
Windows, All Outputs
April 03, 2016, 06:06 PM
Waz
Hi René,

The Execution Id is not known until the job is run (submitted), not sure what you mean by exec password.


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, 2016, 08:40 AM
rbissonMDF
Hi,

In the XML tag taskList --> Item it have two parameters execId and execPassword :

ServerUserid
Is the user name needed to establish a connection to the WebFOCUS Reporting Server. The
user name is one of the credentials necessary for a user to access a WebFOCUS procedure
that resides on the WebFOCUS Reporting Server during scheduling, as well as to run this
procedure at the time the job is run.
This setting must have a value even if using an unsecured Reporting Server.

ServerPassword
Is the password needed to establish a connection to the WebFOCUS Reporting Server. The
password is one of the credentials necessary for a user to access a WebFOCUS procedure
that resides on the WebFOCUS Reporting Server during scheduling, as well as run this
procedure at the time the job is run. This setting must have a value even if using an unsecured
Reporting Server.

Thank


WebFOCUS 8.1.5
Windows, All Outputs
April 04, 2016, 04:22 PM
Waz
Ah, thanks for reminding me.

ExecId is the logon Id of the user that schedule will run under.

ExecPassword we set to "serverpassword" as for Us Caster is trusted.


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 06, 2016, 09:41 AM
rbissonMDF
Hi,

I Know the goal of those 2 fields, but how to set the the password ?
ExecId = &IBIMR_user
ExecPassword = ??

It is important for us to have the good user because we have db rules associated to the user. And almost users are SSO.

Thanks


WebFOCUS 8.1.5
Windows, All Outputs
April 06, 2016, 05:55 PM
Waz
Is Report Caster set up Trusted ?


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 07, 2016, 10:56 AM
rbissonMDF
I Dont know, I'm not familiar with the setup/security and our team lead on vacation...

I will report this part to when he return back..

Thank for you help


WebFOCUS 8.1.5
Windows, All Outputs
April 21, 2016, 10:31 AM
rbissonMDF
We are not sure, If we looking at the good place, but ReportCaster Administration / Configuration / node Data Server / EDASERVE, the Security Type is set to User.

Is a this place wee needs to set to Trusted ?

thks


WebFOCUS 8.1.5
Windows, All Outputs
April 21, 2016, 05:55 PM
Waz
Going trusted is very much a set up that needs to match the client connection to the WF server. If that is trusted, then RC should be trusted.

This is where you set it in RC


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!

May 06, 2016, 11:24 AM
rbissonMDF
Hi,

with the trusted in RC setting the schedule is running well.

But now we have another problem with the authentication on the web service.
I Know you suggest pass by a direct call to the webservice but for now we use a call to a fex file using the REST Adapter.

We want to save the sch file into the user My Content folder.

How can we logon with the current user if it is a SSO user (without password)
or can we give some write to a admin user which one can write into user my content folder ?

thk for you help


WebFOCUS 8.1.5
Windows, All Outputs
May 08, 2016, 06:20 PM
Waz
Does the SSO user have privileges to call the RESTful web service ?

If the user is SSO or has logged in, they are authenticated and should be able to call the web service as long as they have the privilege.


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!

July 12, 2017, 04:34 PM
WFDevConsultant
We are trying to do the same but having the same issue mentioned here.

1401 - Distribution error line item.

We have created the master file and running the report against it. For testing, trying to create the weekly schedule but no luck yet.


8.2.06
Windows, All Formats