You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Bruno Negrao (JIRA)" <ji...@apache.org> on 2006/11/01 15:50:54 UTC

[jira] Created: (AXIS2-1575) Axis2 does not decodes SOAP responses using the character encoding set on the response's XML declaration. Problem converting from iso-8859-1 to utf-8.

Axis2 does not decodes SOAP responses using the character encoding set on the response's XML declaration. Problem converting from iso-8859-1 to utf-8.
------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: AXIS2-1575
                 URL: http://issues.apache.org/jira/browse/AXIS2-1575
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Improvement
    Affects Versions: 1.0
         Environment: Windows XP + java 1.5 + axis2 1.0. I'm using client-side axis2 code. no server-side axis is involved.
            Reporter: Bruno Negrao
            Priority: Blocker


My SOAP server (it isn't axis2 based) sends SOAP responses like this one shown at the end of this message.

The soap server does not set the 'Content-type' http header as was expected so it's not possible to get the charset used in the response body from that.

But the server defines the character encoding  on the response's XML declaration, example: 
<?xml version="1.0" encoding="iso-8859-1"?>

Axis2 is ignoring the character enconding defining on the XML declaration and is decoding all the strings sent as if they were UTF-8.

The result is I cannot display the words correctly here on the client-side. The OMElement.getText() method returns crazy utf-8 characters instead of my latin characters (like á ó ç ã ê, etc).

I proved that axis2 uses utf-8 to decode the network inputstream when I ran the following method on the OMElement returned as response:

        response.getXMLStreamReader().getCharacterEncodingScheme()

It returns 'utf-8'  and it should return 'iso-8859-1'. Not only it returns utf-8 but it is indeed using utf-8 to decode the inputstream, what is wrong for this situation.

The improvement I'm asking here is update axis2 so it obey to the encoding definition on the response's XML declaration.

thank you,

bruno.

****************************************************************************************
AN EXAMPLE OF A SOAP RESPONSE SENT FROM MY SOAP SERVER:
****************************************************************************************

HTTP/1.0 200 OK
Content-length: 1269

<?xml version="1.0" encoding="iso-8859-1"?>
   <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">   
      <soap:Body>       
         <AgendaPesquisa>           
            <status>0</status>           
            <ListaContatosPesquisa>               
               <tipo>C</tipo>               
               <dono>lucia</dono>               
               <posicao>177</posicao>               
               <nome>Abricó Gimarães</nome>
               <email></email>           
            </ListaContatosPesquisa>       
         </AgendaPesquisa>   
      </soap:Body>
   </soap:Envelope>

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-1575) Axis2 does not decodes SOAP responses using the character encoding set on the response's XML declaration. Problem converting from iso-8859-1 to utf-8.

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-1575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12507551 ] 

Davanum Srinivas commented on AXIS2-1575:
-----------------------------------------

Fixed in svn revision 549996

-- dims

> Axis2 does not decodes SOAP responses using the character encoding set on the response's XML declaration. Problem converting from iso-8859-1 to utf-8.
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1575
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1575
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.0
>         Environment: Windows XP + java 1.5 + axis2 1.0. I'm using client-side axis2 code. no server-side axis is involved.
>            Reporter: Bruno Negrao
>            Assignee: Deepal Jayasinghe
>            Priority: Blocker
>
> My SOAP server (it isn't axis2 based) sends SOAP responses like this one shown at the end of this message.
> The soap server does not set the 'Content-type' http header as was expected so it's not possible to get the charset used in the response body from that.
> But the server defines the character encoding  on the response's XML declaration, example: 
> <?xml version="1.0" encoding="iso-8859-1"?>
> Axis2 is ignoring the character enconding defining on the XML declaration and is decoding all the strings sent as if they were UTF-8.
> The result is I cannot display the words correctly here on the client-side. The OMElement.getText() method returns crazy utf-8 characters instead of my latin characters (like á ó ç ã ê, etc).
> I proved that axis2 uses utf-8 to decode the network inputstream when I ran the following method on the OMElement returned as response:
>         response.getXMLStreamReader().getCharacterEncodingScheme()
> It returns 'utf-8'  and it should return 'iso-8859-1'. Not only it returns utf-8 but it is indeed using utf-8 to decode the inputstream, what is wrong for this situation.
> The improvement I'm asking here is update axis2 so it obey to the encoding definition on the response's XML declaration.
> thank you,
> bruno.
> ****************************************************************************************
> AN EXAMPLE OF A SOAP RESPONSE SENT FROM MY SOAP SERVER:
> ****************************************************************************************
> HTTP/1.0 200 OK
> Content-length: 1269
> <?xml version="1.0" encoding="iso-8859-1"?>
>    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">   
>       <soap:Body>       
>          <AgendaPesquisa>           
>             <status>0</status>           
>             <ListaContatosPesquisa>               
>                <tipo>C</tipo>               
>                <dono>lucia</dono>               
>                <posicao>177</posicao>               
>                <nome>Abricó Gimarães</nome>
>                <email></email>           
>             </ListaContatosPesquisa>       
>          </AgendaPesquisa>   
>       </soap:Body>
>    </soap:Envelope>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-1575) Axis2 does not decodes SOAP responses using the character encoding set on the response's XML declaration. Problem converting from iso-8859-1 to utf-8.

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas updated AXIS2-1575:
------------------------------------

    Assignee: Deepal Jayasinghe

> Axis2 does not decodes SOAP responses using the character encoding set on the response's XML declaration. Problem converting from iso-8859-1 to utf-8.
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1575
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1575
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.0
>         Environment: Windows XP + java 1.5 + axis2 1.0. I'm using client-side axis2 code. no server-side axis is involved.
>            Reporter: Bruno Negrao
>         Assigned To: Deepal Jayasinghe
>
> My SOAP server (it isn't axis2 based) sends SOAP responses like this one shown at the end of this message.
> The soap server does not set the 'Content-type' http header as was expected so it's not possible to get the charset used in the response body from that.
> But the server defines the character encoding  on the response's XML declaration, example: 
> <?xml version="1.0" encoding="iso-8859-1"?>
> Axis2 is ignoring the character enconding defining on the XML declaration and is decoding all the strings sent as if they were UTF-8.
> The result is I cannot display the words correctly here on the client-side. The OMElement.getText() method returns crazy utf-8 characters instead of my latin characters (like á ó ç ã ê, etc).
> I proved that axis2 uses utf-8 to decode the network inputstream when I ran the following method on the OMElement returned as response:
>         response.getXMLStreamReader().getCharacterEncodingScheme()
> It returns 'utf-8'  and it should return 'iso-8859-1'. Not only it returns utf-8 but it is indeed using utf-8 to decode the inputstream, what is wrong for this situation.
> The improvement I'm asking here is update axis2 so it obey to the encoding definition on the response's XML declaration.
> thank you,
> bruno.
> ****************************************************************************************
> AN EXAMPLE OF A SOAP RESPONSE SENT FROM MY SOAP SERVER:
> ****************************************************************************************
> HTTP/1.0 200 OK
> Content-length: 1269
> <?xml version="1.0" encoding="iso-8859-1"?>
>    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">   
>       <soap:Body>       
>          <AgendaPesquisa>           
>             <status>0</status>           
>             <ListaContatosPesquisa>               
>                <tipo>C</tipo>               
>                <dono>lucia</dono>               
>                <posicao>177</posicao>               
>                <nome>Abricó Gimarães</nome>
>                <email></email>           
>             </ListaContatosPesquisa>       
>          </AgendaPesquisa>   
>       </soap:Body>
>    </soap:Envelope>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (AXIS2-1575) Axis2 does not decodes SOAP responses using the character encoding set on the response's XML declaration. Problem converting from iso-8859-1 to utf-8.

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-1575?page=all ]

Davanum Srinivas updated AXIS2-1575:
------------------------------------

    Priority: Major  (was: Blocker)

> Axis2 does not decodes SOAP responses using the character encoding set on the response's XML declaration. Problem converting from iso-8859-1 to utf-8.
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1575
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1575
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.0
>         Environment: Windows XP + java 1.5 + axis2 1.0. I'm using client-side axis2 code. no server-side axis is involved.
>            Reporter: Bruno Negrao
>
> My SOAP server (it isn't axis2 based) sends SOAP responses like this one shown at the end of this message.
> The soap server does not set the 'Content-type' http header as was expected so it's not possible to get the charset used in the response body from that.
> But the server defines the character encoding  on the response's XML declaration, example: 
> <?xml version="1.0" encoding="iso-8859-1"?>
> Axis2 is ignoring the character enconding defining on the XML declaration and is decoding all the strings sent as if they were UTF-8.
> The result is I cannot display the words correctly here on the client-side. The OMElement.getText() method returns crazy utf-8 characters instead of my latin characters (like á ó ç ã ê, etc).
> I proved that axis2 uses utf-8 to decode the network inputstream when I ran the following method on the OMElement returned as response:
>         response.getXMLStreamReader().getCharacterEncodingScheme()
> It returns 'utf-8'  and it should return 'iso-8859-1'. Not only it returns utf-8 but it is indeed using utf-8 to decode the inputstream, what is wrong for this situation.
> The improvement I'm asking here is update axis2 so it obey to the encoding definition on the response's XML declaration.
> thank you,
> bruno.
> ****************************************************************************************
> AN EXAMPLE OF A SOAP RESPONSE SENT FROM MY SOAP SERVER:
> ****************************************************************************************
> HTTP/1.0 200 OK
> Content-length: 1269
> <?xml version="1.0" encoding="iso-8859-1"?>
>    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">   
>       <soap:Body>       
>          <AgendaPesquisa>           
>             <status>0</status>           
>             <ListaContatosPesquisa>               
>                <tipo>C</tipo>               
>                <dono>lucia</dono>               
>                <posicao>177</posicao>               
>                <nome>Abricó Gimarães</nome>
>                <email></email>           
>             </ListaContatosPesquisa>       
>          </AgendaPesquisa>   
>       </soap:Body>
>    </soap:Envelope>

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-1575) Axis2 does not decodes SOAP responses using the character encoding set on the response's XML declaration. Problem converting from iso-8859-1 to utf-8.

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas resolved AXIS2-1575.
-------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.3)

> Axis2 does not decodes SOAP responses using the character encoding set on the response's XML declaration. Problem converting from iso-8859-1 to utf-8.
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1575
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1575
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.0
>         Environment: Windows XP + java 1.5 + axis2 1.0. I'm using client-side axis2 code. no server-side axis is involved.
>            Reporter: Bruno Negrao
>            Assignee: Deepal Jayasinghe
>            Priority: Blocker
>
> My SOAP server (it isn't axis2 based) sends SOAP responses like this one shown at the end of this message.
> The soap server does not set the 'Content-type' http header as was expected so it's not possible to get the charset used in the response body from that.
> But the server defines the character encoding  on the response's XML declaration, example: 
> <?xml version="1.0" encoding="iso-8859-1"?>
> Axis2 is ignoring the character enconding defining on the XML declaration and is decoding all the strings sent as if they were UTF-8.
> The result is I cannot display the words correctly here on the client-side. The OMElement.getText() method returns crazy utf-8 characters instead of my latin characters (like á ó ç ã ê, etc).
> I proved that axis2 uses utf-8 to decode the network inputstream when I ran the following method on the OMElement returned as response:
>         response.getXMLStreamReader().getCharacterEncodingScheme()
> It returns 'utf-8'  and it should return 'iso-8859-1'. Not only it returns utf-8 but it is indeed using utf-8 to decode the inputstream, what is wrong for this situation.
> The improvement I'm asking here is update axis2 so it obey to the encoding definition on the response's XML declaration.
> thank you,
> bruno.
> ****************************************************************************************
> AN EXAMPLE OF A SOAP RESPONSE SENT FROM MY SOAP SERVER:
> ****************************************************************************************
> HTTP/1.0 200 OK
> Content-length: 1269
> <?xml version="1.0" encoding="iso-8859-1"?>
>    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">   
>       <soap:Body>       
>          <AgendaPesquisa>           
>             <status>0</status>           
>             <ListaContatosPesquisa>               
>                <tipo>C</tipo>               
>                <dono>lucia</dono>               
>                <posicao>177</posicao>               
>                <nome>Abricó Gimarães</nome>
>                <email></email>           
>             </ListaContatosPesquisa>       
>          </AgendaPesquisa>   
>       </soap:Body>
>    </soap:Envelope>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (AXIS2-1575) Axis2 does not decodes SOAP responses using the character encoding set on the response's XML declaration. Problem converting from iso-8859-1 to utf-8.

Posted by "Brennan Spies (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-1575?page=comments#action_12446957 ] 
            
Brennan Spies commented on AXIS2-1575:
--------------------------------------

http://www.ws-i.org/Profiles/SimpleSoapBindingProfile-1.0.html#Character_Encodings

> Axis2 does not decodes SOAP responses using the character encoding set on the response's XML declaration. Problem converting from iso-8859-1 to utf-8.
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1575
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1575
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.0
>         Environment: Windows XP + java 1.5 + axis2 1.0. I'm using client-side axis2 code. no server-side axis is involved.
>            Reporter: Bruno Negrao
>
> My SOAP server (it isn't axis2 based) sends SOAP responses like this one shown at the end of this message.
> The soap server does not set the 'Content-type' http header as was expected so it's not possible to get the charset used in the response body from that.
> But the server defines the character encoding  on the response's XML declaration, example: 
> <?xml version="1.0" encoding="iso-8859-1"?>
> Axis2 is ignoring the character enconding defining on the XML declaration and is decoding all the strings sent as if they were UTF-8.
> The result is I cannot display the words correctly here on the client-side. The OMElement.getText() method returns crazy utf-8 characters instead of my latin characters (like á ó ç ã ê, etc).
> I proved that axis2 uses utf-8 to decode the network inputstream when I ran the following method on the OMElement returned as response:
>         response.getXMLStreamReader().getCharacterEncodingScheme()
> It returns 'utf-8'  and it should return 'iso-8859-1'. Not only it returns utf-8 but it is indeed using utf-8 to decode the inputstream, what is wrong for this situation.
> The improvement I'm asking here is update axis2 so it obey to the encoding definition on the response's XML declaration.
> thank you,
> bruno.
> ****************************************************************************************
> AN EXAMPLE OF A SOAP RESPONSE SENT FROM MY SOAP SERVER:
> ****************************************************************************************
> HTTP/1.0 200 OK
> Content-length: 1269
> <?xml version="1.0" encoding="iso-8859-1"?>
>    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">   
>       <soap:Body>       
>          <AgendaPesquisa>           
>             <status>0</status>           
>             <ListaContatosPesquisa>               
>                <tipo>C</tipo>               
>                <dono>lucia</dono>               
>                <posicao>177</posicao>               
>                <nome>Abricó Gimarães</nome>
>                <email></email>           
>             </ListaContatosPesquisa>       
>          </AgendaPesquisa>   
>       </soap:Body>
>    </soap:Envelope>

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-1575) Axis2 does not decodes SOAP responses using the character encoding set on the response's XML declaration. Problem converting from iso-8859-1 to utf-8.

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-1575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe updated AXIS2-1575:
-------------------------------------

    Priority: Blocker  (was: Major)

> Axis2 does not decodes SOAP responses using the character encoding set on the response's XML declaration. Problem converting from iso-8859-1 to utf-8.
> ------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1575
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1575
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>    Affects Versions: 1.0
>         Environment: Windows XP + java 1.5 + axis2 1.0. I'm using client-side axis2 code. no server-side axis is involved.
>            Reporter: Bruno Negrao
>            Assignee: Deepal Jayasinghe
>            Priority: Blocker
>
> My SOAP server (it isn't axis2 based) sends SOAP responses like this one shown at the end of this message.
> The soap server does not set the 'Content-type' http header as was expected so it's not possible to get the charset used in the response body from that.
> But the server defines the character encoding  on the response's XML declaration, example: 
> <?xml version="1.0" encoding="iso-8859-1"?>
> Axis2 is ignoring the character enconding defining on the XML declaration and is decoding all the strings sent as if they were UTF-8.
> The result is I cannot display the words correctly here on the client-side. The OMElement.getText() method returns crazy utf-8 characters instead of my latin characters (like á ó ç ã ê, etc).
> I proved that axis2 uses utf-8 to decode the network inputstream when I ran the following method on the OMElement returned as response:
>         response.getXMLStreamReader().getCharacterEncodingScheme()
> It returns 'utf-8'  and it should return 'iso-8859-1'. Not only it returns utf-8 but it is indeed using utf-8 to decode the inputstream, what is wrong for this situation.
> The improvement I'm asking here is update axis2 so it obey to the encoding definition on the response's XML declaration.
> thank you,
> bruno.
> ****************************************************************************************
> AN EXAMPLE OF A SOAP RESPONSE SENT FROM MY SOAP SERVER:
> ****************************************************************************************
> HTTP/1.0 200 OK
> Content-length: 1269
> <?xml version="1.0" encoding="iso-8859-1"?>
>    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">   
>       <soap:Body>       
>          <AgendaPesquisa>           
>             <status>0</status>           
>             <ListaContatosPesquisa>               
>                <tipo>C</tipo>               
>                <dono>lucia</dono>               
>                <posicao>177</posicao>               
>                <nome>Abricó Gimarães</nome>
>                <email></email>           
>             </ListaContatosPesquisa>       
>          </AgendaPesquisa>   
>       </soap:Body>
>    </soap:Envelope>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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