I think CSoapWininetClient does not support proxy authentication.
A suggestion: you could derive your own class from CSoapWininetClient,
override the ConnectToServer method and copy the old code inside atlsoap.h
for CSoapWininetClient::ConnectToServer, with the modifications highlighted
below:
You will also need to declare 2 new CStringT members, m_strProxyUserName and
m_strProxyPassword, and two new methods to set the values
HRESULT ConnectToServer()
{
if (m_hConnection != NULL)
{
return S_OK;
}
m_hInternet = InternetOpen(
ATLSOAPINET_CLIENT,
m_strProxy.GetLength() ? (INTERNET_OPEN_TYPE_PRECONFIG |
INTERNET_OPEN_TYPE_PROXY) : INTERNET_OPEN_TYPE_PRECONFIG,
m_strProxy.GetLength() ? (LPCTSTR) m_strProxy : NULL,
NULL, 0);
if (m_hInternet != NULL)
{
if (m_dwTimeout != 0)
{
InternetSetOption(m_hInternet, INTERNET_OPTION_CONNECT_TIMEOUT,
&m_dwTimeout, sizeof(m_dwTimeout));
InternetSetOption(m_hInternet, INTERNET_OPTION_RECEIVE_TIMEOUT,
&m_dwTimeout, sizeof(m_dwTimeout));
InternetSetOption(m_hInternet, INTERNET_OPTION_SEND_TIMEOUT,
&m_dwTimeout, sizeof(m_dwTimeout));
InternetSetOption(m_hInternet, INTERNET_OPTION_SEND_TIMEOUT,
&m_dwTimeout, sizeof(m_dwTimeout));
//////////////////////////////////////////////////////// Add these here:
InternetSetOption(m_hInternet, INTERNET_OPTION_PROXY_USERNAME,
m_strProxyUserName.GetBuffer(), m_strProxyUserName.GetLength());
InternetSetOption(m_hInternet, INTERNET_OPTION_PROXY_PASSWORD,
m_strProxyPassword.GetBuffer(), m_strProxyPassword.GetLength());
//////////////////////////////////////////////////////// End Extra:
}
m_hConnection = InternetConnect(m_hInternet, m_url.GetHostName(),
(INTERNET_PORT) m_url.GetPortNumber(), NULL, NULL,
INTERNET_SERVICE_HTTP, INTERNET_FLAG_NO_UI, NULL);
if (m_hConnection != NULL)
{
return S_OK;
}
}
CloseAll();
return E_FAIL;
}
Hope this helps!
--
--
--
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. It is for newsgroup
purposes only.
thanks,
bogdan