You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Sergey Denisov <sd...@vicom.ru> on 2000/10/03 12:56:20 UTC

Proxy support (Was: Re: passing an URL to the parser)

You also can use WinInet.dll to go through any firewalls. In this case you
shouldn't use any external libraries, but it's working, of course only in
Win32. Some time ago I've written my (truly, ugly enough :-) ) own
implementation of NetAccessor using WinInet.dll to go through proxies and it
works just fine for me for any HTTP urls. The techniqueis simple: override
XMLNetAccessor to choose between protocols, urls,etc and BinInputStream  to
actually get remote data, assign your version of NetAccessor to
XMLPlatformUtils::fgNetAccessor -- that's all. Ugly but simple. BTW you even
might not know about proxy settings - WinInet has option to get all proxy
settings from your IE.

Regards,
Sergey Densiov
----- Original Message -----
From: "Joe Pruitt" <j....@f5.com>
To: <xe...@xml.apache.org>
Sent: Tuesday, October 03, 2000 10:52 AM
Subject: RE: passing an URL to the parser


> It might be worth it for you to look at the following freeware library -
cURL.  It supports HTTP(s) with authentication and proxy
> server suport.  A VERY nice and powerful package.
>
> http://curl.haxx.se/
>
> A blurb from their site:
>
> "Curl is the tool for transferring files with URL syntax, supporting FTP,
HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. Curl
> supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form
based upload, proxies, cookies, user+password
> authentication, file transfer resume and a busload of other useful
tricks."
>
>
> BTW: It took me under an hour to write a client application using this
library, so writing a netAccessor class shouldn't be that
> hard.  Keep in mind that this package as a TON of options that may be too
much overhead for your purposes.  If so, the source code
> is there to see how it's done...
>
> -Joe
>
> > -----Original Message-----
> > From: manu.heirbaut.mh@belgium.agfa.com
> > [mailto:manu.heirbaut.mh@belgium.agfa.com]
> > Sent: Tuesday, October 03, 2000 12:04 AM
> > To: - *xerces-c-dev@xml.apache.org
> > Subject: Re: passing an URL to the parser
> >
> >
> > I didn't know of this feature (must say I didn't look for it in Xerces,
since I
> > assumed it was 'just a parser/validator' and nothing more), but it sure
sounds
> > interesting. For now I did make my own low-level communication class,
that
> > delivers the XML to the parser as a MemBufInputSource. But for me to use
the
> > communication skills from xerces, it should be able to go through a
firewall.
> >
> > Does anyone know what is the problem there ? And perhaps give a hint
which
> > files I have to modify to make an authenticating firewall supported ?
Because
> > the support of a firewall shouldn't be that hard, I think (It is mostly
a case
> > of modifying and passing the right headers, i.e. a CONNECT before of a
GET,
> > maybe with an optional Proxy-Authentication field).
> >
> > I would appreciate it very much if someone can help me out here.
> > Manu.
> >
> >
> >
> >
> >
> > David_N_Bertoni@lotus.com on 10/03/2000 12:46:14 AM
> > Please respond to xerces-c-dev@xml.apache.org@INTERNET
> > To: xerces-c-dev@xml.apache.org@INTERNET
> > cc:
> >
> > Subject: Re: passing an URL to the parser
> >
> >
> > Not true -- the http protocol will work if a document is located on
another
> > host.  You may have problems if you have a firewall, etc., but if not,
> > things should work fine.
> >
> > Perhaps the doc is out-of-date.
> >
> > Dave
> >
> >
> >
> >
> >
> >                     Jerald Dawson
> >
> >                     <jdawson@mrk.        To:
<xe...@xml.apache.org>,
> > Radovan Chytracek <Ra...@cern.ch>
> >                     com>                 cc:     (bcc: David N
> > Bertoni/CAM/Lotus)
> >                                          Subject:     Re: passing an URL
to the
> > parser
> >                     10/02/2000
> >
> >                     02:19 PM
> >
> >                     Please
> >
> >                     respond to
> >
> >                     xerces-c-dev
> >
> >
> >
> >
> >
> >
> >
> >
> > Thanx for the info. However, it looks like from the docs that these
classes
> > only support either file:// or http://localhost URLS. I need to be able
to
> > reach across the net and grab something.
> >
> > thanx
> >
> > Jerald Dawson
> >
> > > From: "Radovan Chytracek" <Ra...@cern.ch>
> > > Reply-To: xerces-c-dev@xml.apache.org
> > > Date: Mon, 2 Oct 2000 23:06:13 +0200
> > > To: <xe...@xml.apache.org>
> > > Subject: RE: passing an URL to the parser
> > >
> > > HI,
> > >
> > > look at the URLInputSource and InputSource classes. Its instance can
be
> > > passed as the argument to parser's parse(..) method.
> > >
> > > Hope this helps
> > >
> > > Radovan
> > >
> > >
> > >> I'm a bit confused about how to pass an URL to the SAX parser. I've
> > looked
> > >> at the API docs and see where it says that the ability is there but
> > can't
> > >> figure out what object I need to instantiated to make it happen. Any
> > >> pointers would be appreciated.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>