xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Jain" <ra...@jtcsv.com>
Subject Re: WinSockNetAccessor
Date Fri, 07 Jul 2000 16:23:28 GMT
Sorry for the delay in this response. I was tied up with a different
task.

The current implementation uses a very straightforward / simplistic
exchange to retrieve a file from a WebServer. I tested it only against
the Apache server. All that is involved is to make a socket connection
to the specified / default port. Once connection is established, it
writes to the following to the socket:
    "GET http://localhost/xerces.xml\n\n"
After that its just a matter of reading bytes from the socket.

Try this with the IIS server:
    telnet localhost 80
You should see a new blank telnet window screen. Next type exactly
the above quote command to get the file. If that does not
work, then you know that, IIS is expecting some additional information
for the GET command to work.

Any changes are welcome. Please send them to the xerces-c-dev@xml.apache.org
mailing list.

rahul




----- Original Message ----- 
From: "Fritchman, Barry L" <Barry.Fritchman@unisys.com>
To: <rahul@jtcsv.com>
Sent: Thursday, July 06, 2000 12:52 AM
Subject: WinSockNetAccessor


> Rahul,
> 
> I posted the following item to the xerces c++ mailing list about a week ago,
> but no one seemed to know much about it.  As I understand it, you are the
> author of the WinSockNetAccessor class, so I thought maybe you would have
> some ideas about this.  Since my original post, I have tried it with a
> couple of additional web servers, and I have found that it works ok with
> Jigsaw, but fails with Microsoft Personal WebServer and JavaServer Web
> Development Kit.  I'm trying to find someone who has IIS to test it with
> that, but haven't been able to yet.  What I'm trying to do is extract XML
> from a SQLServer 2000 database (which requires use of one of the MS web
> servers) directly into the SAX parser via a URLInputSource.
> 
> Thanks,
> Barry
> 
> 
> I'm trying to do a nonvalidating parse using SAXParser and a URLInputSource.
> I can parse an XML file as a LocalFileInputSource, and everything is fine
> there.  But when I use a URLInputSource to specify the exact same document,
> I get the message "Fatal Error: Invalid document structure.".  Relevant
> details are given below.  One thing I noticed is that if I give an incorrect
> URL, e.g., pointing to a file that doesn't exist, I get the same message.
> However, I know the URL is correct as given below, because I used it in my
> browser and got the file back.
> 
>     .
>     .
>     .
>     // The following file path and URL reference the same file.
>     //
>     const wchar_t* const XML_DOCUMENT =
> L"c:\\javalibs\\jswdk-1.0.1\\webpages\\xerces.xml";
>     const wchar_t* const XML_URL_STRING = L"http://localhost/xerces.xml";
> 
>     // This parse is successful.
>     //
>     LocalFileInputSource fileInputSource(XML_DOCUMENT);
>     parser.parse(fileInputSource);
> 
>     // This parse of the same document via a URL fails with "Fatal Error:
> Invalid document structure.".
>     //
>     XMLURL url(XML_URL_STRING);
>     URLInputSource urlInputSource(url);
>     parser.parse(urlInputSource);
> 
> 
> Xerces release:  1.2.0
> OS:                   Windows NT 4.0, SP5
> Compiler:           MS VC++ 6.0 (used only to compile my app, using original
> xerces binaries)
> 
> 
> The XML document I used is:
> 
> <?xml version='1.0' encoding='ascii'?>
> <!DOCTYPE company [
> <!ELEMENT company     (product,category,developedAt)>
> <!ELEMENT product     (#PCDATA)>
> <!ELEMENT category    (#PCDATA)>
> <!ATTLIST category idea CDATA #IMPLIED>
> <!ELEMENT developedAt (#PCDATA)>
> ]>
> <company>
>     <product>XML4C</product>
>     <category idea='great'>XML Parsing Tools</category>
>     <developedAt>
>       IBM Center for Java Technology, Silicon Valley, Cupertino, CA
>     </developedAt>
> </company>
> 
> 
> 
> 


Mime
View raw message