Page 1 of 1
Getting started with TM1 Web
Posted: Wed Dec 23, 2015 1:13 pm
by Joris
Hi everyone
I'm interested in building TM1 Web applications. Currently all our 'users' use Perspectives, but we might be able to provide them with a better user experience if we would build some apps of our own.
Based on the help-files I only came so far as to check if the web server is actually running:
returns the typical IBM background, so at least that is working
However, the next step should be to access a view this way: (yes I do have 'Planning Sample' running)
Code: Select all
http://localhost:9510/tm1web/UrlApi.jsp#Action=Open&Type=CubeViewer&Cube=plan_BudgetPlan&View=Budget%20Input%20Detailed&AccessType=Public&AdminHost=localhost&TM1Server=Planning%20Sample&Username=admin&Password=apple
This however only returns a blank page. HTML shows this:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8,9">
<meta http-equiv="Content-Type" content="text/html; UTF-8">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<script type="text/javascript" src="scripts/tm1web/common/DjConfig.js"></script>
<script type="text/javascript">
djConfig.locale ="nl-be";
</script>
<script language="javascript" src="scripts/dojo/dojo.js"
type="text/javascript"></script>
<script language="javascript" type="text/javascript">
require([
"tm1web/urlApi/main"
], function(urlApi) {
urlApi.startup(null);
});
</script>
<link href="scripts/dojo/resources/dojo.css" rel="stylesheet"
type="text/css" />
<link href="scripts/dijit/themes/claro/claro.css" rel="stylesheet"
type="text/css" />
<link href="css/standaloner.css" rel="stylesheet" type="text/css" />
<link href="scripts/tm1web/themes/tm1web/tm1web.css" rel="stylesheet"
type="text/css" />
<title>IBM Cognos TM1 Web</title>
</head>
<body class="claro tm1web"></body>
</html>
As this early step in the tutorial already goes wrong I don't really know how to move on. Any suggestions?
Also, if anybody knows a good tutorial to TM1 Web, that would be very welcome. I'm currently stuck with the IBM help, which isn't always the best way to learn something new.
Thanks everyone!
Re: Getting started with TM1 Web
Posted: Wed Dec 23, 2015 1:28 pm
by declanr
What version of TM1 are you on and what browser are you using?
The URL is looking for localhost for the web server and localhost for the admin server... so are you opening the browser from the same machine that web and the admin host are installed?
Also log in to the service through architect and check that the cube plan_BudgetPlan exists and contains the PUBLIC view Budget Input Detailed. Although it should provide an error if not.
I noticed you have "Public"; this at some point required to all be upper case "PUBLIC" not sure if thats still true but I stick with it to be certain.
I didnt realise IBM actually had a web dev guide; based on their other guides and the truly awful examples of websheets they have created in the past (both in sample and actual implementations) i would question how good it is. But sadly I dont know of any good quality tutorials that do cover it; ive done some ad hoc courses for customers on it before so might be worth checking with good consultants in your area who use web.
I would also say that although the web url api is fantastic when used correctly - I would ignore it for the time being and focus on just getting individual sheets working well and getting the feel of the cubeviewer and then come back to it later.
Re: Getting started with TM1 Web
Posted: Wed Dec 23, 2015 1:50 pm
by Joris
Thanks for your response
declanr wrote:What version of TM1 are you on and what browser are you using?
10.2
declanr wrote:are you opening the browser from the same machine that web and the admin host are installed?
Yes, I started with testing it on the same machine.
declanr wrote:Also log in to the service through architect and check that the cube plan_BudgetPlan exists and contains the PUBLIC view Budget Input Detailed. Although it should provide an error if not.
It's a sample from IBM, so I guess this shouldn't be the problem.
declanr wrote:this at some point required to all be upper case "PUBLIC" not sure if thats still true but I stick with it to be certain.
No change.
declanr wrote:I didnt realise IBM actually had a web dev guide; based on their other guides and the truly awful examples of websheets they have created in the past (both in sample and actual implementations) i would question how good it is.
I found it in the help files in the installation directory. And yes, they indeed are written in the same wonderful fashion as a lot of others (otherwise I wouldn't be asking questions here after just two pages I suspect).
Re: Getting started with TM1 Web
Posted: Wed Dec 23, 2015 1:58 pm
by tomok
What you are attempting is to use the TM1Web URL API. You DO NOT have to use this in order to use TM1Web. TM1Web comes with it's own navigation tree and you have the Applications folder for placing links to cube views and web sheets. You can even create your own "App" menu system with a web sheet and action buttons. I've been doing this for years. It's WAY easier then trying to kluge through the Web API. I would only use the API if I had a web site, outside of TM1, where I wanted to reference in some cube views in frames, but the bulk of the site was not in TM1Web.
Re: Getting started with TM1 Web
Posted: Wed Dec 23, 2015 2:03 pm
by gtonkin
Tested on my dev machine running 10.2.2 FP4 and it opens the cube view as expected when referencing my test TM1 model, Cube and View.
Please confirm which version of 10.2 you are using as a lot has changed on TM1 Web in recent times. Also, as Tomok points out, you would not generally start with the API calls - you may embed these on another web page as a short-cute or within websheets to link to detail.
Re: Getting started with TM1 Web
Posted: Thu Dec 24, 2015 8:19 am
by Joris
gtonkin wrote:Please confirm which version of 10.2
Sorry, it's 10.2.2 to be precise.
As suggested I leave the URL API for now and start with the basic TM1WEB. So I made a small website to test the login() function provided in the manual:
Code: Select all
<script type="text/javascript">
function login() {
var xhr = new XMLHttpRequest();
xhr.open("POST", "http://localhost:9510/tm1web/dwrx/jsonp/TM1Service/login", true);
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.onload = function() {
var response = JSON.parse(xhr.responseText).reply;
if(response != null) {
var sessionToken = response.sessionToken;
console.debug("Session token: " + sessionToken);
}
else {
console.error("Login failed.");
}
}
var params = "param0=localhost¶m1=Planning+Sample¶m2=admin¶m3=apple";
xhr.send(params);
};
</script>
Calling this function has no effect, so I tested the POST request in the browser bar (
https://localhost:9510/tm1web/dwrx/jsonp/) which returned an error code 403. So I don't seem to have permissions set right I guess.
Re: Getting started with TM1 Web
Posted: Thu Dec 24, 2015 3:19 pm
by tomok
Joris wrote:As suggested I leave the URL API for now and start with the basic TM1WEB. So I made a small website to test the login() function provided in the manual:
??? Why did you create a web site? TM1Web IS a web site already. When you go to
http://localhost:9510/tm1web you don't have to create anything or call some login function. You will automatically be directed to a login page where you can enter your TM1 credentials. Once authenticated it will open the TM1Web navigation page.
Re: Getting started with TM1 Web
Posted: Thu Dec 24, 2015 6:06 pm
by gtonkin
Hi Joris, I migrated a TM1 10.2.2 installation to 10.2.2 FP4 today by chance. When I went the the [url]http://<server>:9510/tm1web[/url] URL I got the IBM background colours and nothing else, no login prompts etc. It took a while and some searching but remembered that this may be due to some information being cached. The client uses IE 9 so I did Ctrl+Shift+Clicked the refresh icon and this seemed to do the trick. Login screen appeared as expected. Hope this helps.
Re: Getting started with TM1 Web
Posted: Fri Dec 25, 2015 1:06 pm
by lotsaram
Merry Christmas!
I'm with Tomok this one. Joris - if you want to start with TM1 web then stop over-complicating things. Just go to
http://yourserver:9510/tm1web and login. Done, nothing more to do.
Build a simple application with some websheets and some action buttons to navigate. Then try the url api if you like as an alternative to the action button navigation within tm1 web. Then if you see a need think about using the url api to show tm1 content within an external web application.
As always first crawl, then walk, then run.
Re: Getting started with TM1 Web
Posted: Mon Jan 04, 2016 1:04 pm
by Joris
Thanks for your suggestions guys. I started trying different things just because I can't seem to find a way to reach tm1web (well, at least I still can't get past the first screen):
http://s23.postimg.org/6nyp7w5iz/Untitled.png
As suggested by gtonkin I tried Ctrl+Shift+Refresh click, as well as different browsers. However the result is always the same. Maybe I'm missing settings in TM1?
Re: Getting started with TM1 Web
Posted: Tue Jan 05, 2016 12:07 pm
by pandinus
Try adding it to your trusted sites
Re: Getting started with TM1 Web
Posted: Tue Jan 05, 2016 3:13 pm
by Joris
pandinus wrote:Try adding it to your trusted sites
Interesting suggestion, thanks.
Unfortunately this didn't seem to make a difference.
Re: Getting started with TM1 Web
Posted: Tue Jan 05, 2016 3:36 pm
by gtonkin
This may be a sledgehammer approach but it may be worthwhile trying the following:
- Stop the TM1 Application Server service
- Go to the folder "C:\Program Files\ibm\cognos\tm1_64\webapps\"
- Rename tm1web to tm1web.safe - just in case you want to keep any config files etc.
- Extract tm1web.war into a folder called tm1web i.e. you are creating the default tm1web
- Start the TM1 Application Server service
- Open your browser and go to the usual tm1web url
- If you get a blank background with the IBM colouring try Ctrl+Reload / Ctrl+F5
Good luck.
Re: Getting started with TM1 Web
Posted: Tue Jan 05, 2016 3:41 pm
by tomok
I would quit wasting your time trying to debug and just uninstall and reinstall TM1. It's not that difficult and most of the time will solve your problem. I've had to do this on more than one occasion when installing TM1 at a client. For one reason or the other TM1Web can have hiccups during the installation process.
Re: Getting started with TM1 Web
Posted: Wed Jan 06, 2016 8:00 am
by Joris
gtonkin wrote:This may be a sledgehammer approach but it may be worthwhile trying the following:
...
Good luck.
You Sir are a hero, thanks!
This indeed did work.
Re: Getting started with TM1 Web
Posted: Wed Jan 06, 2016 4:09 pm
by gtonkin
Glad it worked-hopefully things will fall into place for you now.