How to make SoapUI json request work with german umlauts?

二次信任 提交于 2020-01-13 05:22:11

问题


We use SoapUI for many interfaces in our team project. We came across a problem with german special signs, called umlauts. When sending a POST request with Json body and a german umlaut, the we get com.fasterxml.jackson.databind.JsonMappingException. It cannot be parsed with com.fasterxml.jackson.databind.ObjectMapper.

But when sending the same request using POSTMAN, then it works like a charm.

We use @Consumes({MediaType.APPLICATION_JSON + "; charset=utf-8"}) annotations and Content-Type: application/json; charset=utf-8 header. But still no effect. Has anyone ever came across such a problem or know how to solve it? We cannot change the testing tool.


回答1:


In SoapUI there is an additional property for setting the encoding of your request.

It is available under the tab Request Properties. Property: Encoding, Value: UTF-8.

Setting it as above solved our problem.



来源:https://stackoverflow.com/questions/36151644/how-to-make-soapui-json-request-work-with-german-umlauts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!