<bdo id='5eyNs'></bdo><ul id='5eyNs'></ul>

<small id='5eyNs'></small><noframes id='5eyNs'>

<tfoot id='5eyNs'></tfoot>
    <i id='5eyNs'><tr id='5eyNs'><dt id='5eyNs'><q id='5eyNs'><span id='5eyNs'><b id='5eyNs'><form id='5eyNs'><ins id='5eyNs'></ins><ul id='5eyNs'></ul><sub id='5eyNs'></sub></form><legend id='5eyNs'></legend><bdo id='5eyNs'><pre id='5eyNs'><center id='5eyNs'></center></pre></bdo></b><th id='5eyNs'></th></span></q></dt></tr></i><div id='5eyNs'><tfoot id='5eyNs'></tfoot><dl id='5eyNs'><fieldset id='5eyNs'></fieldset></dl></div>
    <legend id='5eyNs'><style id='5eyNs'><dir id='5eyNs'><q id='5eyNs'></q></dir></style></legend>

        WSO2 ESB 无法将完整的 JSON 数据转换为 XML

        时间:2024-05-10
      1. <tfoot id='Dy2OE'></tfoot>

        <i id='Dy2OE'><tr id='Dy2OE'><dt id='Dy2OE'><q id='Dy2OE'><span id='Dy2OE'><b id='Dy2OE'><form id='Dy2OE'><ins id='Dy2OE'></ins><ul id='Dy2OE'></ul><sub id='Dy2OE'></sub></form><legend id='Dy2OE'></legend><bdo id='Dy2OE'><pre id='Dy2OE'><center id='Dy2OE'></center></pre></bdo></b><th id='Dy2OE'></th></span></q></dt></tr></i><div id='Dy2OE'><tfoot id='Dy2OE'></tfoot><dl id='Dy2OE'><fieldset id='Dy2OE'></fieldset></dl></div>
          <legend id='Dy2OE'><style id='Dy2OE'><dir id='Dy2OE'><q id='Dy2OE'></q></dir></style></legend>
          • <bdo id='Dy2OE'></bdo><ul id='Dy2OE'></ul>

                  <small id='Dy2OE'></small><noframes id='Dy2OE'>

                    <tbody id='Dy2OE'></tbody>
                  本文介绍了WSO2 ESB 无法将完整的 JSON 数据转换为 XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在构建 POC.我为 Google Plus 创建了一个直通代理服务.在不使用任何代理服务的情况下,我得到了这是我的输出:

                  I am constructing a POC. And I created a pass through proxy service for Google Plus. Without using any proxy service I get this is my output :

                   {
                     "kind":"plus#person",
                     "etag":""ExituU7aUpmkkfyD52VulzptThw/4J1clegrhxYC2fsJOu2XWCs1Ewg"",
                     "id":"117488614303967062311",
                     "displayName":"Abhi NeoN",
                     "name":{
                        "familyName":"NeoN",
                        "givenName":"Abhi"
                     },
                     "tagline":"hey guys ! ssup!! check out ma recnt videos... uploaded",
                     "gender":"male",
                     "aboutMe":"u003cbu003ehie, abhishek - ma full name u003c/bu003eu003cdivu003eu003cbu003em a DANCER ,u003c/bu003eu003c/divu003eu003cdivu003eu003cbu003ei luv ma dancing .u003c/bu003eu003c/divu003eu003cdivu003eu003cbu003ei care ma dancing ,u003c/bu003eu003c/divu003eu003cdivu003eu003cbu003ei jus hv a gr8 thng in me dats ma dancing.u003c/bu003eu003c/divu003e",
                     "relationshipStatus":"single",
                     "url":"https://plus.google.com/117488614303967062311",
                     "image":{
                        "url":"https://lh6.googleusercontent.com/-tF-ip0tUxD4/AAAAAAAAAAI/AAAAAAAAAAA/WKI3USUh_DA/photo.jpg?sz=50"
                     },
                     "urls":[
                        {
                           "value":"https://plus.google.com/117488614303967062311",
                           "type":"profile"
                        },
                        {
                           "value":"https://www.googleapis.com/plus/v1/people/117488614303967062311",
                           "type":"json"
                        }
                     ],
                     "organizations":[
                        {
                           "name":"our lady of nazareth high school",
                           "title":"science",
                           "type":"school"
                        },
                        {
                           "name":"",
                           "title":"BLUEBYTES",
                           "type":"work"
                        }
                     ]
                  }
                  

                  但是当我尝试使用简单的直通服务来做同样的事情时,我只得到:

                  But when I try to do the same using a simple pass through service I get only :

                  {
                     "kind":"plus#person"
                  }
                  

                  我在 wso2esb 网站上读到他们有一个错误,解决错误的解释是收到的 json 数据格式不正确.但是现在我该如何解决这个问题.我的意思是他们可以在 esb 将其转换为 json 数据之前以任何方式操作 json 数据.

                  I read on the wso2esb site that they had a bug and the explanation given to resolve the bug was that json data received was not in the proper format. But now how do I resolve the problem. I mean is their any way I can manipulate the json data before the esb converts it into json data.

                  推荐答案

                  我们已经在最新版本的 ESB(版本 4.5.0)中解决了这个问题.默认情况下,它带有 JSONMessageFormatter/JSONBuilder,可以处理带有多个键的 JSON 有效负载.

                  We have solved this issue in the latest release of ESB (version 4.5.0). By default it comes with JSONMessageFormatter/JSONBuilder that can handle JSON payloads with multiple keys.

                  我们还提出了另一种解决方案,用于处理涉及不同类型的 JSON <--> XML(或 JSON <--> JSON)转换的消息流.JSONStreamBuilderJSONStreamFormatter 可用于通过脚本"中介实现此类场景.查看 ESB 4.5.0 中的示例 #441.

                  We also came up with another solution for handling message flows that involve different types of JSON <--> XML (or JSON <--> JSON) conversions. JSONStreamBuilder and JSONStreamFormatter can be used to implement such scenarios with the 'script' mediator. Have a look at sample #441 in ESB 4.5.0.

                  运行示例 #441;

                  • 添加 JSONStreamBuilderJSONStreamFormatter 作为构建器和repository/conf/axis2/axis2.xml 文件中 JSON 的格式化程序
                  • 部署 SimpleStockQuoteService
                  • 启动示例axis2server
                  • 使用 'ant newjsonclient' 运行 JSON 客户端
                  • Add JSONStreamBuilder and JSONStreamFormatter as the builder and formatter for JSON in repository/conf/axis2/axis2.xml file
                  • Deploy SimpleStockQuoteService
                  • Start the sample axis2server
                  • Run the JSON client with 'ant newjsonclient'

                  这篇关于WSO2 ESB 无法将完整的 JSON 数据转换为 XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Sonarqube 后台任务永远运行 下一篇:错误 - ListenerManager 无法初始化 httpstransport 侦听器 - WSO2

                  相关文章

                      <tfoot id='5TEAD'></tfoot>

                      <i id='5TEAD'><tr id='5TEAD'><dt id='5TEAD'><q id='5TEAD'><span id='5TEAD'><b id='5TEAD'><form id='5TEAD'><ins id='5TEAD'></ins><ul id='5TEAD'></ul><sub id='5TEAD'></sub></form><legend id='5TEAD'></legend><bdo id='5TEAD'><pre id='5TEAD'><center id='5TEAD'></center></pre></bdo></b><th id='5TEAD'></th></span></q></dt></tr></i><div id='5TEAD'><tfoot id='5TEAD'></tfoot><dl id='5TEAD'><fieldset id='5TEAD'></fieldset></dl></div>
                    1. <legend id='5TEAD'><style id='5TEAD'><dir id='5TEAD'><q id='5TEAD'></q></dir></style></legend>

                      <small id='5TEAD'></small><noframes id='5TEAD'>

                        <bdo id='5TEAD'></bdo><ul id='5TEAD'></ul>