cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid Session in xMII

Former Member
0 Kudos

Hi All,

I am not able to pass session variable across pages / windows.

According to the xMII Documentation, I made a web page and tried to set a property using

iGrid.setProperty("PropName", "value");

but there is an error shown in java script console as 'Invalid Session'

Can you please tell me how to do it in any other way (passing variables across pages)

Thanks,

Piyush

Accepted Solutions (0)

Answers (5)

Answers (5)

jcgood25
Active Contributor
0 Kudos

Piyush,

Another thing to consider is that you must be logged into xMII in order to actually have a session, and using http://localhost does not really give you a 'normal' session. If you try to do document.APPLET.setPropertyValue("TestName","TestValue"); you will get the following errors in the Java Console:

ERROR - Error Setting Property TestName to TestValue

ERROR - No properties were set, invalid session

Another tip to see all attributes in your current session you can run the following useful URL: http://<servername>:<port>/Lighthammer/PropertyAccessServlet?Mode=List

Best Regards,

Jeremy Good

Former Member
0 Kudos

Hi Jeremy,

It's quite a point. As I am not logging in xMII, I am getting the same error as you said. Also there is no session i am able to see in xMII admin console/active sessions.

How do i loginto xMII and run the same URL. I mean do i need to create some user and its dashboard for this....

When i click on the SAP xMII link in windows start menu... it out rightly gets me to the Admin page and i don't need to give any Login/password.

Regards,

Piyush

jcgood25
Active Contributor
0 Kudos

You need to use http://servername and not http://localhost. If you use http://servername/Lighthammer it will force you to login and then take you to the home page. From there just navigate to your page using the http://servername/Path/Page.htm which will keep the session. Then your .setPropertyValue(name,value) javascript method will work.

Regards,

Jeremy

Former Member
0 Kudos

By giving server name ..no page is getting displayed.....let me see if i need to configure this in xMII trusted servers or my IIS settings are not proper...

Thanks,

Piyush

jcgood25
Active Contributor
0 Kudos

What is the URL you are trying? Do you need to include the port number after the server name?

Former Member
0 Kudos

Thanks man...

This was the error.....

So guys ! you need to be careful while using xMII.... not to use it as localhost....

Regards,

Piyush

Former Member
0 Kudos

Hi Piyush,

Please check the script once more...

I think it should be <b>document.Appletname.setPropertyValue("PropName","Value" )</b>

You have only used setProperty instead of setPropertyValue()

Regards

Muzammil

Former Member
0 Kudos

good catch!

sufw
Active Participant
0 Kudos

Hi Piyush,

can you please provide some more details? Are you using a HTML page with a .irpt file extension (rather than .html)? If you use anything else, xMII will not create an authenticated session, which is where this error might come from.

I tried the following script in an .irpt page, which worked without errors:


            document.getElementById('iGridID').setPropertyValue('test','asdf');
            alert(document.getElementById('iGridID').getPropertyValue('test'));

sufw
Active Participant
0 Kudos

Hi Piyush,

please see a previous forum thread on how to do this:

Former Member
0 Kudos

Thanks Gents,

Still the question remains that why I am not able to get a valid session Automatically........Is it an IIS property..?

Regards,

Piyush

Former Member
0 Kudos

A few things to check:

- Do you have any anti-virus, anti-spyware, or IE settings that are blocking cookies (sessions are linked to temporary cookies in your browser)

- Is your IE set to open new windows in a new process? If so, temporary cookies will not be shared between those windows.

- Any unusual DNS configuration on this server?

Best regards,

Rick

Former Member
0 Kudos

The easiest method is to use *.irpt pages which are xMII specifc server side renderings which allow you to pass parameters through the URL to other popups or other pages for that "dynamic interaction"

Please reference the xMII help at: <a href="http://help.sap.com/content/documentation/xapps/docu_xapps_mii.htm">xMII Help</a>

For the specific answer on how to use .irpt pages please follow this link: <a href="http://help.sap.com/saphelp_xmii115/helpdata/en/Localization/Localization_Editor.htm">.irpt Page Usage</a>

For future references please also use the xMII Wiki which is currently expanding with a lot of helpful information.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/wiki?path=/display/xmii/main">xmii Wiki</a>

Note: Please assign points if this answer was helpful. Thank You!