Oh, boy. I had to go through the same hassle, when I needed to write a C++
DLL, which would act as a client of a Web Service. I wrote it using
Microsoft recommendations and it worked fine until I used SSL. I did some
digging and found some explaining how to implement SSL in C++ Web Service
client, which - to my surprise - did not come by default. There is an MSDN
sample which does this. The problem with this sample is that it does not
work with authentication (i.e. when a Web Service requires Basic or
Integrated Windows authentication). It is amazing: there is one class you
can use as a parent of a Web service client proxy which solves the
authentication problem, and there is another, which solves the SSL problem,
but they cannot be combined (if I remember it correctly one is HTTP-based,
while the other is TCP-based). At lease I did not have time to combine them,
so I could not think of a better (easier and faster) option than writing a
C# class responsible for invoking Web Service methods, which my C++ DLL
called via COM interop. In C#, SSL does not require any programming, and
authentication can be implemented in just few lines of code. If you do not
care about authentication, you can try Microsoft's sample (don't have it at
hand, but if you need it, let me know, and I will try to find it).
Otherwise, I recommend, my approach. In fact, a friend of mine who works in
another team had to do the same at a different time, and - as I found out
later - he chose the same path. So I assume that this is not an unreasonable
approach. What bothers me, though, is that nowhere does MSDN mention that
C++ Web Service clients cannot support SSL and authentication at the same
time. I would write it in huge bold letters.
Alek