Hi James,
At 15.00 29/10/2004 -0700, James Berry wrote:
Hey Alberto,
Does Xerces actually enforce this restriction, or is it up to the netaccessor? I think the netaccessor on the Mac would actually support some of the other url types (like ftp and https) if they were passed in. Just a wild question. It would be interesting, too, I believe, to write a netaccessor based on libcurl, which would give us access to a broad variety of url types.
It's the NetAccessor; libWWW, WinSock and Socket only test for XMLUrl::HTTP as protocol:
BinInputStream* WinSockNetAccessor::makeNew(const XMLURL& urlSource, const XMLNetHTTPInfo* httpInfo /*=0*/)
{
XMLURL::Protocols protocol = urlSource.getProtocol();
switch(protocol)
{
case XMLURL::HTTP:
{
BinHTTPURLInputStream* retStrm =
new (urlSource.getMemoryManager()) BinHTTPURLInputStream(urlSource, httpInfo);
return retStrm;
break;
}
//
// These are the only protocols we support now. So throw and
// unsupported protocol exception for the others.
//
default :
ThrowXMLwithMemMgr(MalformedURLException, XMLExcepts::URL_UnsupportedProto, urlSource.getMemoryManager());
break;
}
return 0;
}
The Mac-specific ones instead don't do this test and simply pass the URL to the OS APIs.
There is already a bug that I would like to tackle soon, that asks for a WinInet-based NetAccessor for Windows that would support a lot more protocols, including http, https, ftp. The downside is that WinInet is considered a desktop technology, not really suitable for creating services; a better API would be WinHTTP.
BTW, what is libcurl?
Alberto
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]