cxf使用中返回值的问题

webservice中的方法返回只是String,但是返回值是xml的格式时,如

        if (StringUtils.isBlank(password)) {
            return "<message><code>6</code><error>密码不能为空</error></message>";
        }

当返回值中的标签小于三个时,并使用soapUI进行测试时会出现问题,如

        if (StringUtils.isBlank(password)) {
            return "<message><error>密码不能为空</error></message>";
        }

问题

<return>&lt;message>&lt;error>TQ号码不能为空&lt;/error>&lt;/message></return>

转载于:https://my.oschina.net/haokevin/blog/1573898