Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MessageUtil XML解析出现异常 #16

Open
hesling opened this issue Jun 23, 2016 · 4 comments
Open

MessageUtil XML解析出现异常 #16

hesling opened this issue Jun 23, 2016 · 4 comments

Comments

@hesling
Copy link

hesling commented Jun 23, 2016

v1.3.11
加密模式

@sd4324530
Copy link
Owner

能把错误发出来看看吗?

@hesling
Copy link
Author

hesling commented Jun 24, 2016

image

@hesling
Copy link
Author

hesling commented Jun 24, 2016

已解决
问题根源:以上问题主要是在传输文本或者xml过程中出现特殊字符,但是javax下的xml解析器不能解析一下特殊字符,比如&,¥,{},<>等或者是编码问题,使用统一编码格式传递参数。
http://blog.csdn.net/luozhuang/article/details/51322065

@yuzhiping
Copy link

建议作者在下一版本上进行修复特殊字符导致的xml解析异常的问题:把MessageUtil.java中的
inputStream = new ByteArrayInputStream(message.getBytes());
改成
inputStream = new ByteArrayInputStream(message.getBytes("utf-8"));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants