dvader0571
Programmer
ATL Server, Web Service solution Visual Studio .NET
I have the code exactly like the sample OnlineAddressBook from the MSDN library yet I get the error whereas that app does not. Such simple things can stop a programmer for hours.
Here is the code I am using. Note that the Web Service this code is in compiles fine, it's when I compile the SRF (ATL Server) project that the error occurs, let me know if you need to see more code.
// DataConsumerWS.h : Defines the ATL Server request handler class
//
#pragma once
namespace DataConsumerWSService
{
const wchar_t MYDATASOURCE[] = L"Provider=SQLOLEDB.1ersist Security Info=False;User ID=me;Initial Catalog=mine;Data Source=SERVER;Use Procedure for Prepare=1;Auto Translate=Trueacket Size=4096;Use Encryption for Data=False;Tag with column collation when possible=False";
// all struct, enum, and typedefs for your webservice should go inside the namespace
// IDataConsumerWSService - web service interface declaration
//
[
uuid("2E179D71-E436-42EE-A1D6-00758BF3D7AA",
object
]
__interface IDataConsumerWSService
{
// HelloWorld is a sample ATL Server web service method. It shows how to
// declare a web service method and its in-parameters and out-parameters
[id(1)] HRESULT GetStudents([out] int *arrSize,[out,size_is(*arrSize)] BSTR **NameList,[out,size_is(*arrSize)] LONG **IDList);
// TODO: Add additional web service methods here
};
// DataConsumerWSService - web service implementation
//
[
request_handler(name="Default", sdl="GenDataConsumerWSWSDL",
soap_handler(
name="DataConsumerWSService",
namespace="urnataConsumerWSService",
protocol="soap"
)
]
class CDataConsumerWSService :
public IDataConsumerWSService
{
public:
// uncomment the service declaration(s) if you want to use
// a service that was generated with your ISAPI extension
CDataConnection m_dc;
HTTP_CODE InitializeHandler(AtlServerRequest *pRequestInfo, IServiceProvider *pProvider)
{
if (HTTP_SUCCESS != CSoapHandler::InitializeHandler(pRequestInfo, pProvider))
return HTTP_FAIL;
[Reply][View Thread][Get Link] [Modify|Delete]
Rate this message: 1 2 3 4 5 (out of 5)
I have the code exactly like the sample OnlineAddressBook from the MSDN library yet I get the error whereas that app does not. Such simple things can stop a programmer for hours.
Here is the code I am using. Note that the Web Service this code is in compiles fine, it's when I compile the SRF (ATL Server) project that the error occurs, let me know if you need to see more code.
// DataConsumerWS.h : Defines the ATL Server request handler class
//
#pragma once
namespace DataConsumerWSService
{
const wchar_t MYDATASOURCE[] = L"Provider=SQLOLEDB.1ersist Security Info=False;User ID=me;Initial Catalog=mine;Data Source=SERVER;Use Procedure for Prepare=1;Auto Translate=Trueacket Size=4096;Use Encryption for Data=False;Tag with column collation when possible=False";
// all struct, enum, and typedefs for your webservice should go inside the namespace
// IDataConsumerWSService - web service interface declaration
//
[
uuid("2E179D71-E436-42EE-A1D6-00758BF3D7AA",
object
]
__interface IDataConsumerWSService
{
// HelloWorld is a sample ATL Server web service method. It shows how to
// declare a web service method and its in-parameters and out-parameters
[id(1)] HRESULT GetStudents([out] int *arrSize,[out,size_is(*arrSize)] BSTR **NameList,[out,size_is(*arrSize)] LONG **IDList);
// TODO: Add additional web service methods here
};
// DataConsumerWSService - web service implementation
//
[
request_handler(name="Default", sdl="GenDataConsumerWSWSDL",
soap_handler(
name="DataConsumerWSService",
namespace="urnataConsumerWSService",
protocol="soap"
)
]
class CDataConsumerWSService :
public IDataConsumerWSService
{
public:
// uncomment the service declaration(s) if you want to use
// a service that was generated with your ISAPI extension
CDataConnection m_dc;
HTTP_CODE InitializeHandler(AtlServerRequest *pRequestInfo, IServiceProvider *pProvider)
{
if (HTTP_SUCCESS != CSoapHandler::InitializeHandler(pRequestInfo, pProvider))
return HTTP_FAIL;
[Reply][View Thread][Get Link] [Modify|Delete]
Rate this message: 1 2 3 4 5 (out of 5)