• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

web services and sessions

Guest
Feb 27, 2007 Feb 27, 2007

Copy link to clipboard

Copied

how to maintain a session with coldfusion web service?
TOPICS
Advanced techniques

Views

751

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 28, 2007 Feb 28, 2007

Copy link to clipboard

Copied

Can you please post the reason why you would want that?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 01, 2007 Mar 01, 2007

Copy link to clipboard

Copied

BrainSan,
How do you expose web service for complex business log using bunch of web service functions (without transactions)? You really can't with or can you?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 05, 2007 Mar 05, 2007

Copy link to clipboard

Copied

You can try partial transactions.
Altho you need alot of logic in handling the return values.
Insuractive gave you a rather good solution.
Use UUID's to communicate between the webservices to handle the data that was parsed before.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 28, 2007 Feb 28, 2007

Copy link to clipboard

Copied

Many sites handle this by generating a transaction key on the intial web service contact and then forcing the client to echo the transaction key back for every web service method called. You could then store your CF variables in a database using the transaction key as the way to store/retrieve them. Easiest way would be to serialize a CF structure using <cfwddx>. Given, you wouldn't be using your typical coldfusion session variables (which I don't think you could use anyway via webservice as there is no way to id the session) - but it should work about the same. You would just need to schedule a task to go through and remove old data on a regular basis, as the "session" data would eventually fill your DB.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 01, 2007 Mar 01, 2007

Copy link to clipboard

Copied

Too bad there is not a single example of transactional web service that ships with ColdFusion 7... Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 06, 2007 Mar 06, 2007

Copy link to clipboard

Copied

Insuractive's described method works well with CF. We use a login() method (accepts username and password, creates session, sets session.isLoggedIn flag) to return a jsessionid to the webservice consumer.

The consumer then passes the jsessionid back to CF on each subsequent request: CF checks the jsessionid for validity on each request.

CF uses createObject("java", "coldfusion.runtime.SessionTracker").getSession("YOUR_CFAPPLICATION_NAME_" & jsessionid) to grab the WS consumer's session data from the JVM.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 06, 2007 Mar 06, 2007

Copy link to clipboard

Copied

Can I pass session variables form asp to coldfusion? We are exploring using external authentication from a company that uses asp. Can logging in successfully from asp externally then pass session variables to the member area of our site, especially with different levels of users?

Bob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 10, 2007 Mar 10, 2007

Copy link to clipboard

Copied

LATEST
Hi,
Could you send me full example of client.cfm and server.cfc code, please? Thanks so much. Dariusz.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation