WSO2 EI 在线路日志中显示 JSON 有效负载

佩德罗·伊沃·丹塔斯

我正在使用 WSO2 EI 6.2。我正在尝试调试使用 JSON 有效负载的 API。我已经激活了电线日志。然而,有效载荷是不可理解的。关于如何解决这个问题的任何想法?

为了说明,这是我的代码的一部分:

                        <payloadFactory media-type="json">
                            <format>
                                {
                                  "parameters": [
                                    {
                                      "name": "Device.WiFi.Radio.10000.Channel",
                                      "value": "$1"
                                    }
                                  ]
                                }
                            </format>
                            <args>
                                <arg expression="$ctx:channel"/>
                            </args>
                        </payloadFactory>
                        <log level="full">
                            <property name="step" value="ANTES CALL"/>
                            <property name="mac" expression="$ctx:uri.var.macAddress"></property>
                        </log>
                        <!-- set the authorization header -->
                        <header expression="$ctx:authorizationHeader" name="Authorization" scope="transport"/>
                        <call>
                            <endpoint key="gov:ClientEquipments/endpoints/WACS/wacs_update_parameters.endpoint.xml"/>
                        </call>
                        <log level="full">
                            <property name="step" value="DEPOIS CALL"/>
                        </log>

然后日志显示:

[2020-04-10 10:32:14,703] [EI-Core]  INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:2bf02b1c-ab7e-48bb-a766-260bfdc65c57, Direction: request, step = ANTES CALL, mac = 840B7C183370, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><jsonObject><parameters><name>Device.WiFi.Radio.10000.Channel</name><value>1</value></parameters></jsonObject></soapenv:Body></soapenv:Envelope>
[2020-04-10 10:32:14,707] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "POST /wacs/cpe_gm/v1/MACAddress=840B7C183370/parameters HTTP/1.1[\r][\n]"
[2020-04-10 10:32:14,707] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "Authorization: Bearer ded82872-a4a8-367b-96bb-eda7c11f4120[\r][\n]"
[2020-04-10 10:32:14,707] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "Access-Control-Allow-Origin: *[\r][\n]"
[2020-04-10 10:32:14,707] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "Access-Control-Allow-Methods: GET[\r][\n]"
[2020-04-10 10:32:14,707] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "Content-Encoding: gzip[\r][\n]"
[2020-04-10 10:32:14,707] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "Vary: Accept-Encoding[\r][\n]"
[2020-04-10 10:32:14,707] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "Access-Control-Allow-Headers: authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,St2-Api-Key,lastModifiedTime,x-log,ApimAuthToken[\r][\n]"
[2020-04-10 10:32:14,707] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "X-NAME-Manifest-Endpoint: /manifest[\r][\n]"
[2020-04-10 10:32:14,707] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "Request-Context: appId=[\r][\n]"
[2020-04-10 10:32:14,707] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "Content-Type: application/json[\r][\n]"
[2020-04-10 10:32:14,707] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "Transfer-Encoding: chunked[\r][\n]"
[2020-04-10 10:32:14,707] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "Host: 10.217.49.9:8280[\r][\n]"
[2020-04-10 10:32:14,708] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "Connection: Keep-Alive[\r][\n]"
[2020-04-10 10:32:14,708] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"
[2020-04-10 10:32:14,708] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "[\r][\n]"
[2020-04-10 10:32:14,708] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "6a[\r][\n]"
[2020-04-10 10:32:14,708] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "[0x1f][0x8b][0x8][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0xab][0xe6][0xe2][0x84][0x1][0x5][0x5][0xa5][0x82][0xc4][0xa2][0xc4][0xdc][0xd4][0x92][0xd4][0xa2]b%+[0x85]hd)[0x5][0x85]jT.Pu[0x1e]P-P[0x9d][0x92]KjYfr[0xaa]^x[0xa6][[0xa6]^PbJf[0xbe][0x9e][0xa1][0x1][0x10][0xe8]9g$[0xe6][0xe5][0xa5][0xe6]([0xe9]`[0xe8],K[0xcc])[0x5]k5TB[0x95][0xab]E[0xe6][0xc6]"8[0xb5][0x0][0x81][0xf5][0xe][0x7][0xa8][0x0][0x0][0x0][\r][\n]"
[2020-04-10 10:32:14,708] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "0[\r][\n]"
[2020-04-10 10:32:14,708] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 << "[\r][\n]"
[2020-04-10 10:32:14,749] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 >> "HTTP/1.1 500 Internal Server Error[\r][\n]"
[2020-04-10 10:32:14,749] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 >> "Access-Control-Allow-Origin: *[\r][\n]"
[2020-04-10 10:32:14,749] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 >> "Access-Control-Allow-Methods: POST[\r][\n]"
[2020-04-10 10:32:14,749] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 >> "Access-Control-Allow-Headers: authorization,Access-Control-Allow-Origin,Content-Type,SOAPAction,St2-Api-Key,lastModifiedTime,x-log,ApimAuthToken[\r][\n]"
[2020-04-10 10:32:14,749] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 >> "Request-Context: appId=[\r][\n]"
[2020-04-10 10:32:14,749] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 >> "Date: Fri, 10 Apr 2020 09:32:15 GMT[\r][\n]"
[2020-04-10 10:32:14,749] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 >> "Transfer-Encoding: chunked[\r][\n]"
[2020-04-10 10:32:14,749] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 >> "Connection: Keep-Alive[\r][\n]"
[2020-04-10 10:32:14,749] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 >> "[\r][\n]"
[2020-04-10 10:32:14,749] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 >> "0[\r][\n]"
[2020-04-10 10:32:14,749] [EI-Core] DEBUG - wire HTTP-Sender I/O dispatcher-5 >> "[\r][\n]"
[2020-04-10 10:32:14,751] [EI-Core]  INFO - LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:df03495c-99fd-4c9a-84fd-5320af502a40, Direction: request, step = DEPOIS CALL, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><ns:binary xmlns:ns="http://ws.apache.org/commons/ns/payload"></ns:binary></soapenv:Body></soapenv:Envelope> 

正如您所看到的,调用中有一些混乱的东西,我需要弄清楚是什么,并且能够分析有效负载将有助于解决这个问题。

谢谢你的帮助。

阿鲁南·苏古纳库玛

我看到您发送的有效负载带有值为 gzip 的“Content-Encoding”标头。请使用以下内容并尝试在通过端点发送之前删除内容编码。

<header action="remove" name="Content-Encoding" scope="transport"/>

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

通过使用丰富介体在WSO2 EI中向JSON有效负载动态添加新元素

WSO2 EI使用Json有效负载构造XML请求

WSO2 EI/ESB:将有效负载从有效负载工厂附加到后端调用中的路径参数

WSO2 ESB:将原始XML正文包含到JSON有效负载中

WSO2 EI,遍历JSON数组

如何在WSO2 EI 6.1.1中从肥皂有效载荷中检索元素

在WSO2 ESB / WSO2 EI中,是否有解决方案可以从gmail下载附件?

从wso2中的有效负载创建一个新文件

WSO2 API管理器中的有效负载字段验证

WSO2 APIM-在JWT有效负载中添加用户角色

带有 RabbitMQ 的 WSO2 EI - 如何拒绝消息?

WSO2 ESB - 从后端通过层时发送不需要的空 JSON 有效负载

WSO2 EI 6.2中的并行处理

WSO2 EI / ESB中的顺序后端调用

Json 负载无法传递到 wso2 中的端点

在 WSO2 APIM 3.2.0 中修改/删除 wso2 类中介或 xml 序列中的请求有效负载内容

WSO2 AM 1.9-将CDATA保留在有效负载工厂中

WSO2 EI,如何从定制类介体获取有效载荷作为字符串

WSO2更改有效负载合计

来自属性的WSO2 ESB有效负载

POST之前GoLang中的GZip JSON有效负载

JSON Web令牌-有效负载中的密码?

在 Dataweave 中合并 JSON 有效负载的问题

如何在JSON有效负载中插入变量?

WSO2 EI:如何在使用 vfs 选择 csv 文件时处理 WSO2 中的瑞典字符

计算JSON有效负载的大小(以字节为单位),包括在PHP的JSON有效负载中

如何将text / xml响应转换为application / json wso2 EI

通过HTTP使用InfluxDB和WSO2流处理器在有效负载中插入双引号

WSO2 APIM 和 EI 是否支持 API 删除现有租户?