Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
hi
we've two kinds of clients, web client and an application which works as a client.
now our application simulates web requests by calling index.php as the web client does. we want to change it to calling web services via nusoap. but there's a problem. web services are session-less. for example, a web service is called to authenticate. the second service when called has no sense about the authentication and it's completely a separate call. someone told me that i may put something eg. a hash code in http headers to include the data provided via authentication so that the next web services read the data from header and realize the call has been for what session. this way something like session simulation occurs.
i'm not so familiar with 'http headers'. i don't know how can i do that. in the whole, i like to know what may be the best solution and whether nusoap keeps something internally like sessions so that i may read the in web services?
what's your suggestion?
thx
Posted 13-Nov-12 5:50am
Comments
ryanb31 at 13-Nov-12 11:13am
   
If they are .Net web services they can use the Session. Just declare your WebMethod as such: [WebMethod(EnableSession = true)]public string CustomMethod(...
ilostmyid2 at 13-Nov-12 11:19am
   
client is C# and web services are located on Linux Ubuntu.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Sessions are not available in webservices. but you can authenticate any caller by passing an id to the called method or post id as query string from java script.
  Permalink  
Comments
ilostmyid2 at 14-Nov-12 7:20am
   
ur right. this is a good solution to add a parameter to all web services to know who is the caller and simulate sessions this way. but i like to know whether it may be done automatically somehow eg. by filling some attribute in http protocol header, etc.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 535
1 OriginalGriff 275
2 BillWoodruff 260
3 Shweta N Mishra 244
4 Deepu S Nair 230
0 OriginalGriff 6,168
1 Sergey Alexandrovich Kryukov 5,818
2 DamithSL 4,958
3 Manas Bhardwaj 4,539
4 Maciej Los 3,755


Advertise | Privacy | Mobile
Web03 | 2.8.1411019.1 | Last Updated 14 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100