cancel
Showing results for 
Search instead for 
Did you mean: 

URL to set session properties?

Former Member
0 Kudos

Is there a URL to SET session properties? I know I can get a list of them by calling "/XMII/PropertyAccessServlet?mode=list&Content-Type=text/xml", but is there a way to set them in a similar manner?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use:

Service=PropertyAccessService&Mode=Store&PropName=XXX&PropValue=YYY

Former Member
0 Kudos

Thanks Rick,

I knew there was a way, just couldn't find it anywhere.

jcgood25
Active Contributor
0 Kudos

Rick's URL was meant for the Illuminator servlet, but you will not find this documented anywhere...

Former Member
0 Kudos

It should be. It's better than putting a dummy/hidden applet on a page just to set a session property.

Former Member
0 Kudos

Thanks for asking Ryan. I was just coming out to the forum to find out the same thing!

--Amy Smith

--Haworth

Former Member
0 Kudos

Heck, with 12.0, you won't find anything documented anywhere...

Former Member
0 Kudos

Whew, brave soul, I wasn't going to go there.

Former Member
0 Kudos

Hi all, If you want me to start a new thread let me know...

I'm having funky, although repeatable, results using the URL to set a session parameter via AJAX call,

which always gets a Successful message.

/XMII/PropertyAccessServlet?mode=Store&PropName=plantId&PropValue=60

I am verifying the session parameter 2 ways:

1. Refresh the page and view source (I took the lt and gt out)

...............span id="savedPlantId" style="visibility:hidden;"

2. AJAX call to /XMII/PropertyAccessServlet?mode=List

Quirk #1: I see the value in the span. I do not see it in the servlet list.

Quirk #2: I can change the value a couple (2 or 3 times) then it doesn't change after that

Quirk #3: When it stops changing via the AJAX call, I can still change it with a browser URL

http://<server>:50000/XMII/PropertyAccessServlet?mode=Store&PropName=plantId&PropValue=199

Any hints or ideas?

Yes, I am trying to use a single pixel applet, but having trouble with that too! See a different post.

I really would prefer to use the URL as there is no visual indication to the user

and an applet (and JVM) doesn't have to load.

--Amy Smith

--Haworth

Oh, and P.S. Is there a mode=Delete to remove the session parameter?

Former Member
0 Kudos

I haven't experienced the problem, yet. I can confirm the MII version tomorrow.

Out of curiosity, how are you calling the URL? I know through AJAX, but more specifically.

I am using the jQuery library and the .ajax method. I am using the "async: false" property. I know, an asynchronous call isn't really AJAX, but it ensures the URL action is completed before continuing, which might just be your problem. If you are truly doing asynchronous calls, your span may be refreshing before the session property is being set. Just a hunch.

As far as the delete mode of the PropertyAccessService, I'm not really sure. Maybe someone who "knows" the bowels can comment on that.

Former Member
0 Kudos

I am using straight javascript. I did wait until I got the response back with the Successful message before I did anything else.


if (createRequest()) {
  request.onreadystatechange = handleResponse;
  request.open('GET', url, true);
  request.send(null);
} 

I changed it to an synchronous call


 if (createRequest()) {
  request.open('GET', url, false);
  request.send(null);
  var xmlDoc = request.responseText;
...

Same "Quirks", although another symptom discovered. I saw the session param in the servlet list a few times and thought that Quirk#1 was fixed, but now it isn't showing any more. I don't think I changed anything as I was just trying to document the tests.

--Amy Smith

Former Member
0 Kudos

No, there's not a delete mode. Just list/retrieve/store.

Former Member
0 Kudos

Ha! I didn't know there was a Retrieve. I guess I don't have to parse the XML coming back from the List mode now to get my value - doh.

Former Member
0 Kudos

Hi Amy,

I'm starting to experience some flakiness of setting session properties via the URL call. I think this is similar to what you are/were experiencing. Has your issue been resolved? Or have you found a work around?

Former Member
0 Kudos

Hi Ryan,

No, I have not put in a support call. I don't even know if SAP would accept a support call on an unpublished "feature". So, I didn't even try. I am using


<APPLET name="saveSessionParameters" CODE="iCommand" 
CODEBASE="/XMII/Classes/" ARCHIVE="illum8.zip" HEIGHT="1" WIDTH="1" MAYSCRIPT>
<PARAM NAME="InitialUpdate" VALUE="false">
</APPLET>

And JavaScript:  document.saveSessionParameters.setPropertyValue('plantId', plantId);

There is an issue with Java 1.6+ and this is WAY too slow. For the time being, as this is an

internal itranet app and our standard is 1.5.7, we are OK. That will need a resolution

eventually though. I'm hoping it is better in MII 12.1.

--Amy Smith

--Haworth

Former Member
0 Kudos

Ryan --

The URL with AJAX is working in 12.0.8 Build(21).

/XMII/PropertyAccessServlet?mode=Store&Content-Type=text/xml&PropName=myNum&PropValue=1

That will save us from having to load any applets for ECC transactions. The majority of our shop floor PCs will not need the Java plugin. Which, considering the PCs on the floor is a very good thing.

--Amy Smith

--Haworth

Answers (1)

Answers (1)

Former Member
0 Kudos

so every user who knows this url can change the session properties ?

former_member185280
Active Contributor
0 Kudos

I dont know about earlier versions, but in 12.1+ there are the XMII_PropertyAccessService_RW and XMII_PropertyAccessService_R UME security Actions available.