UPDATE: Replace ATLServer with WWSAPI! Windows Web Services API Client code walkthrough 

 

 

When I tried to build an old ATLServer WebClient SOAP project I got these errors:

 

fatal error C1083: Cannot open include file: 'atlsrvres.h': No such file or directory

fatal error RC1015: cannot open include file 'atlsrvres.h'

 

Download the latest ATLServer code from http://www.codeplex.com/AtlServer and unzip it on the build machine.

 

Set the resource and C++ include paths of your project to point to the include folder location from the unzipped codeplex code.

 

Rebuild.  I then got this error:

 

error C2337: 'request_handler' : attribute not found

error C2337: 'soap_handler' : attribute not found

 

I found this thread (Orcas is Visual Studio 2008 now):

http://www.codeplex.com/AtlServer/Thread/View.aspx?ThreadId=12010

 

ATL Server attributes are not supported by Orcas compiler. You have to remove attributes from your code and get non-attributed ATL Server code that used to be injected by the compiler. To do this, recompile your code with /FX with the current version of compiler you are using. Here is more information about what /FX does - http://msdn2.microsoft.com/en-us/library/d8ex062w(VS.80).aspx. After compiler generated .mrg files, make a backup copy of your old source files and replace them with .mrg. files generated by /FX build. Rebuild your app with the current version of Visual Studio and make sure everything works as expected. Then port the code to Orcas and version of ATL Server from this project. You can comment out attributes now and Orcas compiler should build new source just fine.

  

Note that the "current version of the compiler" means Visual Studio 2003 or Visual Studio 2005 since only they know how to handle the attributes.

 

I did this and then had one more hurdle!

 

error C2065: 's_szAtlsWSDLSrf' : undeclared identifier                    

 

Add this to stdafx.h before the <atlsoap.h> include

 

#include <atlspriv.h>

_ATLSOAP_DECLARE_WSDL_SRF();

 

Everything builds fine now.