basic authentication and SSL with ATL CSoapSocketClientT

  • Thread starter Miroslav Milosevic via .NET 247
  • Start date
M

Miroslav Milosevic via .NET 247

I have mfc-based windows application which consumes a web service.
I implemented ATL-based secure SOAP communication as per Microsoft's SecureSOAP Sample,
http://msdn.microsoft.com/library/d...en-us/vcsample/html/vcsamSecureSOAPSample.asp

as following:

typedef CSoapSocketClientT<CSecureEvtSyncSocket> CSecureSoapSocketClient;

// Create ssl wrapper for MyService service1
MyService<CSecureSoapSocketClient> service1;

My problem is integrating basic HTTP authentication for a client.
If I use following code:
(My authObject also implements IAuthInfo)
class CMyBasicAuth : public CBasicAuthObject, public IAuthInfo
{
...
}


CMyBasicAuth authObject;
service1.m_socket.AddAuthObj(ATL_HTTP_AUTHTYPE_BASIC, &authObject, &authObject);

... my application fails to compile with this message:

C:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\include\atlhttp.inl(947): error C2664: 'ATL::CAtlBaseAuthObject::Init' : cannot convert parameter 1 from 'ATL::CAtlHttpClientT<TSocketClass> *const ' to 'ATL::CAtlHttpClient *'
with
[
TSocketClass=CSecureEvtSyncSocket
]


Is there a way to implement basic authentication and SSL with ATL CSoapSocketClientT ?
 
Top