Cxf full contact (5)-all of which are caused by XML security 1.4

Source: Internet
Author: User

First look at the previous example: http://blog.csdn.net/kunshan_shenbin/archive/2009/01/17/3813000.aspx

This example can run normally, even if you use Chinese characters, for example:

Modify the test code: sayhiservicetest. Java

Package COM. service. test; </P> <p> Import static Org. JUnit. assert. *; <br/> Import Org. JUnit. beforeclass; <br/> Import Org. JUnit. test; <br/> Import Org. springframework. context. applicationcontext; <br/> Import Org. springframework. context. support. classpathxmlapplicationcontext; </P> <p> Import COM. cecltd. service. sayhisrvc; </P> <p> public class sayhiservicetest {</P> <p> Private Static sayhisrvc; </P> <p> @ Be Foreclass <br/> Public static void setup () {</P> <p> applicationcontext context = new classpathxmlapplicationcontext (New String [] {"applicationcontext. XML "}); <br/> sayhisrvc = (sayhisrvc) context. getbean ("sayhisrvc"); <br/>}</P> <p> @ test <br/> Public void testsayhi () {</P> <p> assertequals ("Hi, shenbin! ", Sayhisrvc. sayhi (" shenbin "); <br/> assertequals (" Hi, China! ", Sayhisrvc. sayhi (" China "); <br/>}< br/>}

A red light is displayed after running:

It can be seen that when JUnit is used for testing through ws encryption and decryption, some Chinese characters (some Chinese characters can be passed well during the actual test) cannot be returned normally.

Of course, we can see from the texture at the beginning of this article that there is no problem with client access.

After some research, found that as long as the xmlsec-1.4.0.jar to replace the xmlsec-1.3.0.jar can solve this problem, does this is a bug in the work?

XML security official home: http://santuario.apache.org/

 

2009.03.09 append ---->

Practice has proved that the xmlsec-1.4.1.jar version is also normal, let's look at the differences between these three versions of a source file:

Version 1.3.0:

Version 1.4.0:

Version 1.4.1:

There may be bugs in version 1.4.0!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.