Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

autocompleter / xhr calls to on demand process from an external site

558828Jul 10 2008 — edited Nov 13 2008
Hi folks, I have a bit of an interesting problem I need to solve.

We've got a webapp and an instance of apex both behind a single sign on solution/webgate. If a user goes to a page in the webapp without hitting the SSO, they are redirected there, then brought back. If a user goes to one of the APEX pages without first hitting the SSO, same deal.

So, with that in mind, in the webapp we need to setup a typeahead autocomplete for a particular column of data in the apex app's schema. So this means that the webapp has to make a remote (xhr, ajax) call to an On Demand process on the apex side.

There's plenty of good examples on how to do this all from within APEX, and they've given me a great start on the problem, but there's one issue:

I can seem to hit the On Demand process without a valid session id, and that will make a remote call a little difficult to pull off from an external app.

For instance, the URL for the on demand process with a session id works great:

http://example.com:7777/pls/apex/f?p=103:0:403983899276095:APPLICATION_PROCESS=AutoCompleteForContext:::AUTOCOMPLETE_SEARCH:t

My on demand process returns an HTML unordered list collection that I can use with good old' Ajax.Autocompleter (scriptaculous).

But without it, nothing is returned at all, just a blank page:

http://example.com:7777/pls/apex/f?p=103:0::APPLICATION_PROCESS=AutoCompleteForContext:::AUTOCOMPLETE_SEARCH:t

So I guess that leaves me in a bit of a bind:

1) Do I /need/ to include a session id in the url?

2) If I do, how do I get that into a global var in the calling webapp's javascript remotely, without doing any redirecting and playing with cookies?

Thanks for any advice!
Billy

P.S. For anybody else attempting anything like this, you'll need to customize your autocompleter to update the query string to have APEX style parameters, you can't just tack another &searchString=search request param, you'll just get an error from APEX .
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 11 2008
Added on Jul 10 2008
11 comments
2,666 views