gpt4 book ai didi

wso2 - 从 DSS 服务器 : "Error while writing to the output stream using JsonWriter" ,"detail" :"" 获取 json 响应时出错

转载 作者:行者123 更新时间:2023-12-05 01:17:24 26 4
gpt4 key购买 nike

从我的 dss 服务请求 json 响应时出现以下错误。

{"Fault":{"faultcode":"soapenv:Server","faultstring":"Error while writing to the output stream using JsonWriter","detail":""}}

我传递的 curl 请求是

curl -X GET -H "Accept:application/json" -H "Content-Type:application/json" http://localhost:9764/services/userdetails/test

如果我删除接受 header ,我将获得正确的 xml 响应。

奇怪的是,如果我从我同事的笔记本电脑上运行相同的 dss 服务,我会通过上面的 curl 命令获得正确的 json 响应。由于我在我的电脑中收到此错误,我的电脑中的某些配置已更改。

我无法在我的电脑中找到更改的内容,因此出现此错误。

最佳答案

我最近也遇到了同样的情况。我希望调试并找到原因,但还没有机会。

但是,更改 respository/conf/axis2/axis2.xml 中的 application/json 格式化程序和发送器实现解决了这个问题。为此,您可以取消注释/注释掉以下内容。

<messageFormatter contentType="application/json"
class="org.apache.axis2.json.JSONMessageFormatter"/>
<!--messageFormatter contentType="application/json"
class="org.apache.axis2.json.gson.JsonFormatter" /-->


<messageBuilder contentType="application/json"
class="org.apache.axis2.json.JSONOMBuilder"/>
<!--messageBuilder contentType="application/json"
class="org.apache.axis2.json.gson.JsonBuilder" /-->

希望这会有所帮助。

关于wso2 - 从 DSS 服务器 : "Error while writing to the output stream using JsonWriter" ,"detail" :"" 获取 json 响应时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24367280/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com