You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by "Jochen Schwarze (JIRA)" <xm...@ws.apache.org> on 2006/06/27 14:23:30 UTC

[jira] Created: (XMLRPC-91) MinML does not handle XML encoding properly

MinML does not handle XML encoding properly
-------------------------------------------

         Key: XMLRPC-91
         URL: http://issues.apache.org/jira/browse/XMLRPC-91
     Project: XML-RPC
        Type: Bug

    Versions: 2.0    
    Reporter: Jochen Schwarze


When you implement your own XML-RPC transport layer and call

XmlRpcServer.execute(InputStream in, XmlRpcContext context);

the following happens: 

First, XmlRpc.parse(InputStream is) calls MinML.parse(new InputSource(is). 

Then, MinML.parse(...) calls parse(new InputStreamReader(source.getByteStream()));

which is wrong: this parses the stream with the platform default encoding, regardless of the actual encoding used in the XML stream, destroying, eg, UTF-8 encoded characters on Windows.

Together with #XMLRPC-90, XmlRpc could be changed to use the Java 1.4 oder 1.5 platform XML parser which respect handle streams correctly and use any encoding declaration embedded in the XML stream.

Workaround: Use XmlRpc.setDriver("xerces") and add xercesImpl.jar to the classpath.


-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org


[jira] Commented: (XMLRPC-91) MinML does not handle XML encoding properly

Posted by "Jochen Wiedmann (JIRA)" <xm...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/XMLRPC-91?page=comments#action_12418023 ] 

Jochen Wiedmann commented on XMLRPC-91:
---------------------------------------

Another workaround might be to ensure that the server doesn't use Non-ASCII characters by using the ASCII encoding when sending the documents.

Given the fact that MinML is practically obsolete with version 3, I'd like to close this issue with WONTFIX. I'll leave the request open for some weeks in case some other developer steps forward and volunteers to create a patch.


> MinML does not handle XML encoding properly
> -------------------------------------------
>
>          Key: XMLRPC-91
>          URL: http://issues.apache.org/jira/browse/XMLRPC-91
>      Project: XML-RPC
>         Type: Bug

>     Versions: 2.0
>     Reporter: Jochen Schwarze

>
> When you implement your own XML-RPC transport layer and call
> XmlRpcServer.execute(InputStream in, XmlRpcContext context);
> the following happens: 
> First, XmlRpc.parse(InputStream is) calls MinML.parse(new InputSource(is). 
> Then, MinML.parse(...) calls parse(new InputStreamReader(source.getByteStream()));
> which is wrong: this parses the stream with the platform default encoding, regardless of the actual encoding used in the XML stream, destroying, eg, UTF-8 encoded characters on Windows.
> Together with #XMLRPC-90, XmlRpc could be changed to use the Java 1.4 oder 1.5 platform XML parser which respect handle streams correctly and use any encoding declaration embedded in the XML stream.
> Workaround: Use XmlRpc.setDriver("xerces") and add xercesImpl.jar to the classpath.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org


[jira] Commented: (XMLRPC-91) MinML does not handle XML encoding properly

Posted by "Jochen Schwarze (JIRA)" <xm...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/XMLRPC-91?page=comments#action_12418426 ] 

Jochen Schwarze commented on XMLRPC-91:
---------------------------------------

You cannot normally influence the XML encoding that a client uses to conact your server, so that's no workaround IMO.

But here's another workaround, this time without Xerces in the classpath:

XmlRpc.setDriver(org.xml.sax.helpers.XMLReaderAdapter.class);

No need for a patch to MinML on my side.

Jochen


> MinML does not handle XML encoding properly
> -------------------------------------------
>
>          Key: XMLRPC-91
>          URL: http://issues.apache.org/jira/browse/XMLRPC-91
>      Project: XML-RPC
>         Type: Bug

>     Versions: 2.0
>     Reporter: Jochen Schwarze

>
> When you implement your own XML-RPC transport layer and call
> XmlRpcServer.execute(InputStream in, XmlRpcContext context);
> the following happens: 
> First, XmlRpc.parse(InputStream is) calls MinML.parse(new InputSource(is). 
> Then, MinML.parse(...) calls parse(new InputStreamReader(source.getByteStream()));
> which is wrong: this parses the stream with the platform default encoding, regardless of the actual encoding used in the XML stream, destroying, eg, UTF-8 encoded characters on Windows.
> Together with #XMLRPC-90, XmlRpc could be changed to use the Java 1.4 oder 1.5 platform XML parser which respect handle streams correctly and use any encoding declaration embedded in the XML stream.
> Workaround: Use XmlRpc.setDriver("xerces") and add xercesImpl.jar to the classpath.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org


[jira] Closed: (XMLRPC-91) MinML does not handle XML encoding properly

Posted by "Jochen Wiedmann (JIRA)" <xm...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/XMLRPC-91?page=all ]
     
Jochen Wiedmann closed XMLRPC-91:
---------------------------------

    Resolution: Won't Fix

As indicated by the user, there is no need to change this.


> MinML does not handle XML encoding properly
> -------------------------------------------
>
>          Key: XMLRPC-91
>          URL: http://issues.apache.org/jira/browse/XMLRPC-91
>      Project: XML-RPC
>         Type: Bug

>     Versions: 2.0
>     Reporter: Jochen Schwarze

>
> When you implement your own XML-RPC transport layer and call
> XmlRpcServer.execute(InputStream in, XmlRpcContext context);
> the following happens: 
> First, XmlRpc.parse(InputStream is) calls MinML.parse(new InputSource(is). 
> Then, MinML.parse(...) calls parse(new InputStreamReader(source.getByteStream()));
> which is wrong: this parses the stream with the platform default encoding, regardless of the actual encoding used in the XML stream, destroying, eg, UTF-8 encoded characters on Windows.
> Together with #XMLRPC-90, XmlRpc could be changed to use the Java 1.4 oder 1.5 platform XML parser which respect handle streams correctly and use any encoding declaration embedded in the XML stream.
> Workaround: Use XmlRpc.setDriver("xerces") and add xercesImpl.jar to the classpath.

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org