emacarron / mybatis

Automatically exported from code.google.com/p/mybatis
0 stars 0 forks source link

mybatis3.0.3 bug in WebService ?? #189

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I use WebService(cxf2.3 jax-ws) query database by remote call for method ,
use mybatis3.0.3   mybatis-spring-1.0.0-RC3 when execute sql,
the chinese word in sqlMap.xml is lousy code showing in the log.

But when use ibatis2.3.4 or call for the method in the local,the question has 
not 

happened.
By the way,I use encoding="UTF-8" anywhere when need encoding in my project.

For example
when I just call for method testString() from WebService,the word 
'中文测试' will

change to lousy code.

My sqlMap file is as the follow:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cares.test" >
  <select id="testString" resultType="String">
    SELECT '中文测试' FROM dual
  </select>
</mapper> 
-------------------------------------------------------------------------------
However, when I use ibatis2.3.4 or call the method in the local,
the word '中文测试' can right to display.
my sqlMap file is as the follow:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" 

"http://ibatis.apache.org/dtd/sql-map-2.dtd" >
<sqlMap namespace="com.cares.test" >
   <select id="test" resultClass="String">
        SELECT '中文测试' FROM  dual
   </select>
</sqlMap>

I think it maybe a mybatis bug,please fix it.

Original issue reported on code.google.com by wjk...@163.com on 29 Nov 2010 at 4:17

GoogleCodeExporter commented 9 years ago
when I change the xml encoding="GBK",the Chinese Word can right to display by 
remote call for method from WebService,but call it from local it will be lousy 
code.

Original comment by wjk...@163.com on 29 Nov 2010 at 9:11

GoogleCodeExporter commented 9 years ago

Original comment by eduardo.macarron on 31 Dec 2010 at 2:45