title: Single Sign On with Java + Exchange 2007 EWS
body: <p>I've been working on a project which uses SPNEGO to have Single Sign On for a Java based webapp. At the moment, it is working successfully with Jetty + SPNEGO and Active Directory so if you visit my test page, it can output the auth_user as well as the Negotiate token if the browser has been configured properly.</p>
  
  <p>The next step of the project is to be able to pass that user and token to the Exchange Web Services as the authentication so I can access the remote users exchange directory (mail, contacts etc)</p>
  
  <p>I've run JAX-WS to generate the stub files from the Services.wsdl file and able to connect to Exchange using these classes. The only problem is that it will only authenticate the user that is running the web server, not the remote user.</p>
  
  <p>I've also noticed that I can't find the correct class to pass the token, rather than username and password to the EWS. Also, the generated files don't have any references to SPNEGO.</p>
  
  <p>Does anyone know of a possible solution, or does it look like I'll have to generate the SOAP calls manually rather than using the generated classes? </p>
  
  <p>Thanks for your time</p>