Kbase P121849: How to convert EasyAsk server requests from sessions to stateless
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/25/2007 |
|
Status: Unverified
GOAL:
Convert EasyAsk server requests from sessions to stateless
FACT(s) (Environment):
EasyAsk
CHANGE:
When using the HTTP/XML syntax for integration, there are two basic changes that will need to be made.
First, they will need to include the &oneshot=1 parameter in the url. This will tell the server to create a session just long enough to get a result and then kill it. This will free the memory used and not leave a session around.
Second, in order to preserve the semblance of 'state' when the &oneshot parameter is used, the url also needs to include the &CatPath parameter. The &CatPath parameter will contain the steps the user took to get to this particular state. Each time EasyAsk is called there is a tag called <EA_FullPath> returned with the XML result. The contents of this tag consist of the prior actions taken by the user. To maintain the users context or 'state' the contents of the <EA_FullPath> tag should be sent as the value of the &CatPath parameter with subsequent calls to allow the server to quickly reconstruct context.
For example, if a user first did a search for 'drills' the call would look like:
http://localhost:9100/EasyAsk/apps/Advisor.jsp?dct=Rock&RequestAction=advisor&RequestData=CA_Search&indexed=1&oneshot=1&disp=XML&CatPath=All%20Products&q=drills
The resulting <EA_FullPath> tag would return:
<EA_FullPath>All+Products%2F%2F%2F%2FUserSearch%3Ddrills</EA_FullPath>
If the same user then wanted to click on a category called "Hand Tools" on the result page, the url syntax would be:
http://localhost:9100/EasyAsk/apps/Advisor.jsp?dct=Rock&RequestAction=advisor&RequestData=CA_CategoryExpand&indexed=1&oneshot=1&disp=XML&CatPath=All+Products%2F%2F%2F%2FUserSearch%3Ddrills////Hand Tools
Note the change to the RequestData and CatPath parameters. The resulting <EA_FullPath> tag would be:
<EA_FullPath>
All+Products%2F%2F%2F%2FUserSearch%3Ddrills%2F%2F%2F%2FHand+Tools
</EA_FullPath>
The CatPath will continue to expand as long as appropriate. To clear context (perhaps the next time a search is added to the search box) the context can be cleared simply by submitting a CatPath parameter with the value All Products as shown in the first example above.