TM1 connecting to a Web Service

Post Reply
recoliveira
Posts: 2
Joined: Wed Nov 26, 2014 1:59 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

TM1 connecting to a Web Service

Post by recoliveira »

Hi all!

I need to read some information that is available through a web service. What do I do in TM1 to access this information and save in a cube?

Thanks a lot!

Renata
blackhawk
Community Contributor
Posts: 136
Joined: Thu May 29, 2008 2:29 pm

Re: TM1 connecting to a Web Service

Post by blackhawk »

Renata,

If you have 10.2, you can use the REST API

https://www.ibm.com/developerworks/comm ... I%2010.2.2

EDIT: Oh...oops...I read that the wrong direction. :(

Are you trying to get data into TM1 from a web service via a TI script?
recoliveira
Posts: 2
Joined: Wed Nov 26, 2014 1:59 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

Re: TM1 connecting to a Web Service

Post by recoliveira »

Hi blackhawk!

Yes, via TI script. Is it possible? If not, should I use only the REST API?

Thank you!
User avatar
Harvey
Community Contributor
Posts: 236
Joined: Mon Aug 04, 2008 4:43 am
OLAP Product: PA, TM1, CX, Palo
Version: TM1 8.3 onwards
Excel Version: 2003 onwards
Contact:

Re: TM1 connecting to a Web Service

Post by Harvey »

TM1 does not have any built in functionality to connect to external web services.

If you would like to import data from a web source, you would need to write a custom executable or script to do the work.

Many approaches are possible. For instance, the program/script might poll the web service periodically and write the data to the file system. You could pick this up with a scheduled chore that imports the local file into a TM1 cube. Alternatively, you might opt to write executable application that gets the data, then uses the TM1 API to fire off a TI process to import it.

How you approach it really depends on the scenario, connectivity and nature of the data.
Take your TM1 experience to the next level - TM1Innovators.net
Wim Gielis
MVP
Posts: 3113
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: TM1 connecting to a Web Service

Post by Wim Gielis »

Harvey wrote:..., then uses the TM1 API to fire off a TI process to import it.

Or TM1runti.exe can be used.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
blackhawk
Community Contributor
Posts: 136
Joined: Thu May 29, 2008 2:29 pm

Re: TM1 connecting to a Web Service

Post by blackhawk »

Actually, the way I would consider doing it is create a Java extension to pull the data from a web service and then write it to a file. The java extensioni could be called from the TI script in the prolog section. Then, the TI processes like normal using this new file.

Code: Select all

vWSUrl = 'http://myserver/getdata';
vTempFile = 'filename.tmp';

retVal = ExecuteJavaN( 'com.sample.GetWSData',vWSUrl, vTempFile );
If( retVal > 0 )
    ProcessQuit;
EndIf;

DatasourceNameForServer = vTempFile
You can make the GetWSData dumb, in that all it does is take the data from the web service and write it to a CSV or tab delimited file. Then leave it up to the TI process to understand what columns it should load or not load.

Hope that helps.
User avatar
tianoklein
Posts: 41
Joined: Fri Jun 13, 2014 1:23 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

Re: TM1 connecting to a Web Service

Post by tianoklein »

Hi blackhawk,
Did you try this ???

http://tm1server:9510/pmpsvc/services

http://www.tm1forum.com/viewtopic.php?f=3&t=11028


OR

Did you try to create a TI - TM1 SDK JavaExtensions??

http://www.tm1forum.com/viewtopic.php?p=51180

Please let me know if you have succeeded, because I have the same problem and could not find a solution. :roll:
Post Reply