Building With Atlserver Based Soap Project With Visual Studio 2008
- 17 Jan 2008
**UPDATE: Replace ATLServer with WWSAPI! **<font color=#000000>**Windows Web Services API Client code walkthrough**</font>** **
When I tried to build an old ATLServer WebClient SOAP project I got these errors:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
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.
I did this and then had one more hurdle!
error C2065: ‘s_szAtlsWSDLSrf’ : undeclared identifier
Add this to stdafx.h before the #include \_ATLSOAP\_DECLARE\_WSDL\_SRF(); Everything builds fine now.