antodomnic
Programmer
Hi,
We have a requirement in which we need to get the xml from a private url directory.
To achieve this we are using the bellow code, ( the application is running in ATL COM+ ( vc++)
------------
#ifdef _SOCKS_USED_
MSXML2::IXMLHTTPRequestPtr xmlHTTPPtr;
HRESULT hr2 = xmlHTTPPtr.CreateInstance("Msxml2.XMLHTTP");
#else
MSXML2::IServerXMLHTTPRequestPtr xmlHTTPPtr;
HRESULT hr2 = xmlHTTPPtr.CreateInstance("Msxml2.ServerXMLHTTP");
#endif
HRESULT hr = xmlHTTPPtr->open("GET", bstrUrl, false, bstrUID, bstrPWD);
where bstrUrl -> URL
bstrUID -> the user id for authorization.
bstrPWD - > password
HRESULT hr2 = xmlHTTPPtr->send();
bstrRespText = xmlHTTPPtr->GetresponseText();
---------------------
This code is always failing in send(). Anyone help me what's the issue regarding this code. Appreciate your help.
Thanks,
Anto. A.R.
We have a requirement in which we need to get the xml from a private url directory.
To achieve this we are using the bellow code, ( the application is running in ATL COM+ ( vc++)
------------
#ifdef _SOCKS_USED_
MSXML2::IXMLHTTPRequestPtr xmlHTTPPtr;
HRESULT hr2 = xmlHTTPPtr.CreateInstance("Msxml2.XMLHTTP");
#else
MSXML2::IServerXMLHTTPRequestPtr xmlHTTPPtr;
HRESULT hr2 = xmlHTTPPtr.CreateInstance("Msxml2.ServerXMLHTTP");
#endif
HRESULT hr = xmlHTTPPtr->open("GET", bstrUrl, false, bstrUID, bstrPWD);
where bstrUrl -> URL
bstrUID -> the user id for authorization.
bstrPWD - > password
HRESULT hr2 = xmlHTTPPtr->send();
bstrRespText = xmlHTTPPtr->GetresponseText();
---------------------
This code is always failing in send(). Anyone help me what's the issue regarding this code. Appreciate your help.
Thanks,
Anto. A.R.