You shouldnt write some SOAP API from the scratch. It will be very problematic, especially the error handling. It will begin like in this article
SOAP client for C++, but there will be a lot of work to do to get it running.
This
SOAP client library looks fine.
If I google for
GSoap tutorial I find some topics.
Addtional tip: SOAP is better supported in C#