title: How to use Intersystem's session within web services
body: <p>I am trying to set some session information in one web method and return it in another web method, but the session data is always empty on the second web method.  Here is what I tried</p>
  
  <p><strong>Web Method 1 - Sets session information</strong></p>
  
  <pre><code>Method StartSession() As %String [WebMethod]
  {
       set %session.NewSession = 1
       set %session.Data("key") = "dude"
       Quit "Session Started"
  }
  </code></pre>
  
  <p><strong>Web Method 2 - Gets session information  should return dude, but is returning blank</strong></p>
  
  <pre><code>Method TestSession() As %String [WebMethod]
  {
      Quit $Get(%session.Data("key"))         
  }
  </code></pre>