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 "Deepak Dinasi (JIRA)" <xe...@xml.apache.org> on 2004/10/29 21:52:33 UTC

[jira] Created: (XERCESC-1296) Trying to parse XML document which has https in its url

Trying to parse XML document which has https in its url
-------------------------------------------------------

         Key: XERCESC-1296
         URL: http://issues.apache.org/jira/browse/XERCESC-1296
     Project: Xerces-C++
        Type: Bug
  Components: Utilities  
    Versions: 1.4    
 Environment: Windows 2000 OS
    Reporter: Deepak Dinasi
    Priority: Critical


I have Portal running on SSL on my box. Our application uses xerces-c dll to publish reports to the Portal. Portal is running on SSL and it is listening on port 8443 only (understands https protocol only). Through wininet functions we make the request and get a valid response back from portal. But since the response from Portal contains https in its URL, the parser does not like it and its throwing MalformedURLException. Below is my XML response. Is there a way that I can make a connection back to Portal to get the dtd?

<!DOCTYPE RESPONSE SYSTEM "https://mccly03test:8443/servlet/media/xml/api/response.dtd">
<RESPONSE TransId="NewAuthReq" Auth="true">
 <SESSIONID Value="F6x6Y7xLnZxqeRG8"/>
 <REFQUERY RefId="NewAuthReqRef">
 <PARAM Name="ObjectKey" Value="2"/>
</REFQUERY>
</RESPONSE>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


RE: [jira] Resolved: (XERCESC-1296) Trying to parse XML document which has https in its url

Posted by Scott Cantor <ca...@osu.edu>.
> I think libcurl would make a great netaccessor base, at least for 
> unixes and Mac OX X, where libcurl is apt to be present anyway. It 
> might make sense for Windows, through we'd then has an external 
> dependency to resolve.

+1. I use it extensively.

-- Scott


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: [jira] Resolved: (XERCESC-1296) Trying to parse XML document which has https in its url

Posted by James Berry <ja...@jberry.us>.
On Oct 29, 2004, at 3:15 PM, Alberto Massari wrote:

> BTW, what is libcurl?

libcurl is the library that underlies the ubiquitous curl command line 
tool commonly used on unixes but which compiles on other platforms as 
well, including Windows.

curl (http://curl.haxx.se/) supports all kinds of protocols, and is 
distributed under a very liberal free software license that doesn't put 
any restrictions on use, apart from maintaining their copyright.

I think libcurl would make a great netaccessor base, at least for 
unixes and Mac OX X, where libcurl is apt to be present anyway. It 
might make sense for Windows, through we'd then has an external 
dependency to resolve.

-jdb


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: [jira] Resolved: (XERCESC-1296) Trying to parse XML document which has https in its url

Posted by Alberto Massari <am...@progress.com>.
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: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: [jira] Resolved: (XERCESC-1296) Trying to parse XML document which has https in its url

Posted by James Berry <ja...@jberry.us>.
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.

-jdb

On Oct 29, 2004, at 2:53 PM, Alberto Massari (JIRA) wrote:

>      [ http://issues.apache.org/jira/browse/XERCESC-1296?page=history ]
>
> Alberto Massari resolved XERCESC-1296:
> --------------------------------------
>
>     Resolution: Invalid
>
> Xerces has built-in support only for the HTTP protocol; if you need to 
> read data from a different source (FTP or HTTPS) you need to install 
> an EntityResolver object that reads the data and builds a 
> MemBufInputSource object on top of that (have a look to the Redirect 
> sample).
>
> Alberto
>
>> Trying to parse XML document which has https in its url
>> -------------------------------------------------------
>>
>>          Key: XERCESC-1296
>>          URL: http://issues.apache.org/jira/browse/XERCESC-1296
>>      Project: Xerces-C++
>>         Type: Bug
>>   Components: Utilities
>>     Versions: 1.4
>>  Environment: Windows 2000 OS
>>     Reporter: Deepak Dinasi
>>     Priority: Critical
>
>>
>> I have Portal running on SSL on my box. Our application uses xerces-c 
>> dll to publish reports to the Portal. Portal is running on SSL and it 
>> is listening on port 8443 only (understands https protocol only). 
>> Through wininet functions we make the request and get a valid 
>> response back from portal. But since the response from Portal 
>> contains https in its URL, the parser does not like it and its 
>> throwing MalformedURLException. Below is my XML response. Is there a 
>> way that I can make a connection back to Portal to get the dtd?
>> <!DOCTYPE RESPONSE SYSTEM 
>> "https://mccly03test:8443/servlet/media/xml/api/response.dtd">
>> <RESPONSE TransId="NewAuthReq" Auth="true">
>>  <SESSIONID Value="F6x6Y7xLnZxqeRG8"/>
>>  <REFQUERY RefId="NewAuthReqRef">
>>  <PARAM Name="ObjectKey" Value="2"/>
>> </REFQUERY>
>> </RESPONSE>
>
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>    http://issues.apache.org/jira/secure/Administrators.jspa
> -
> If you want more information on JIRA, or have a bug to report see:
>    http://www.atlassian.com/software/jira
>
>
> ---------------------------------------------------------------------
> 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


[jira] Resolved: (XERCESC-1296) Trying to parse XML document which has https in its url

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1296?page=history ]
     
Alberto Massari resolved XERCESC-1296:
--------------------------------------

    Resolution: Invalid

Xerces has built-in support only for the HTTP protocol; if you need to read data from a different source (FTP or HTTPS) you need to install an EntityResolver object that reads the data and builds a MemBufInputSource object on top of that (have a look to the Redirect sample).

Alberto

> Trying to parse XML document which has https in its url
> -------------------------------------------------------
>
>          Key: XERCESC-1296
>          URL: http://issues.apache.org/jira/browse/XERCESC-1296
>      Project: Xerces-C++
>         Type: Bug
>   Components: Utilities
>     Versions: 1.4
>  Environment: Windows 2000 OS
>     Reporter: Deepak Dinasi
>     Priority: Critical

>
> I have Portal running on SSL on my box. Our application uses xerces-c dll to publish reports to the Portal. Portal is running on SSL and it is listening on port 8443 only (understands https protocol only). Through wininet functions we make the request and get a valid response back from portal. But since the response from Portal contains https in its URL, the parser does not like it and its throwing MalformedURLException. Below is my XML response. Is there a way that I can make a connection back to Portal to get the dtd?
> <!DOCTYPE RESPONSE SYSTEM "https://mccly03test:8443/servlet/media/xml/api/response.dtd">
> <RESPONSE TransId="NewAuthReq" Auth="true">
>  <SESSIONID Value="F6x6Y7xLnZxqeRG8"/>
>  <REFQUERY RefId="NewAuthReqRef">
>  <PARAM Name="ObjectKey" Value="2"/>
> </REFQUERY>
> </RESPONSE>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org