Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Needed - XML Parser

Status
Not open for further replies.

antodomnic

Programmer
Joined
Apr 14, 2004
Messages
1
Location
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top