Jesse is right; XMLNetHTTPInfo is a class used when using the XMLNetAccessor directly to fetch data from the net. You should derive your own class from URLInputSource and redefine makeStream() as

BinInputStream* MyURLInputSource::makeStream() const
{
    return XMLPlatformUtils::fgNetAccessor->makeNew(fURL, http_info);
}

Alberto

At 09.00 22/08/2006 -0400, Jesse Pelton wrote:
You construct http_info but never use it.  It looks like XMLNetHTTPInfo
is not actually used by any of the stock classes.  I suspect you'll need
to create your own InputSource, possibly derived from URLInputSource.  I
think it will need some way to specify your XMLNetHTTPInfo (either in a
constructor or in a setter) and an implementation of makeStream() that
passes your XMLNetHTTPInfo to WinSockNetAccessor::makeNew().

I'm more or less making this up based on inspecting the source code.
Someone more familiar with input sources and net accessors (like
Alberto, who introduced XMLNetHTTPInfo) may have more insight and/or a
better suggestion.

Note that your URL is invalid; spaces are not allowed.  (See RFC 3986 at
http://www.faqs.org/rfcs/rfc3986.html.)

-----Original Message-----
From: Lisa Davis [mailto:[EMAIL PROTECTED]
Sent: Monday, August 21, 2006 9:30 PM
To: [email protected]
Subject: XMLNetHTTPInfo questions

  Hi,
  I need to be able to parse a file on a remote server, so I am using
the
  URLInputSource for the location of the xml file.

  My remote server sees the request but blocks the request out because
our server requires some special HTTP headers for user authentication.

  I can see that I need to use the XMLNetHTTPInfo class to pass this
data along,
  but I can't seem to get the data I load into this class across the
wire.

  What do I need to do to get this to happen?

  The code basically looks like this:


  XMLNetHTTPInfo* http_info = new XMLNetHTTPInfo();
  http_info->fHTTPMethod = XMLNetHTTPInfo::GET;
  http_info->fHeaders = "Header1: Value\r\nHeader2: Value\r\n";
  http_info->fHeadersLen = strlen(http_info->fHeaders);
  XMLCh* burl = XMLString::transcode("http://blah blah blah/blah.xml");
  XMLURL* url = new XMLURL(burl);
  URLInputSource* inputSource = new URLInputSource(*url);
  parser->parse(*inputSource);

  The only header that comes across is the HTTP Host.

  thanks

  p.s. the blah blah blah is a real location in my code.



---------------------------------
Stay in the know. Pulse on the new Yahoo.com.  Check it out.

Reply via email to