官术网_书友最值得收藏!

  • WSO2 Developer’s Guide
  • Fidel Prieto Estrada Ramón Garrido Lázaro
  • 175字
  • 2021-07-08 10:05:54

Configuring message formatters and message builders

Message formatters and Message builders are the components that allow us to send and receive different types of messages according to the content type specified in the request. It is important to enable the content type used in the messages exchanged because if the content type received is not configured in the system, the message will not be understood.

Message builders are used to process incoming messages, and Message formatters are used to build the outgoing messages.

We can enable the Message formatters and builders in the file located in <EI_HOME>/conf/axis2/axis2.xml. Message formatters are under the same name in XML tag, and so are Message builders. Most values that messages content type can be received are already configured, but they are commented. We just have to find the one we need and uncomment it for Message formatters and/or message builders, depending on the case.

For example, to enable us to send and receive JSON messages, we have to enable that content type for input and output messages in axis2.xml:

<messageFormattercontentType="application/json" class="org.wso2.carbon.integrator.core.json.JsonStreamFormatter"/>

<messageBuildercontentType="application/json" class="org.wso2.carbon.integrator.core.json.JsonStreamBuilder"/>
主站蜘蛛池模板: 太原市| 大洼县| 抚顺县| 大丰市| 囊谦县| 阿勒泰市| 天门市| 衢州市| 江达县| 宝坻区| 灵川县| 永靖县| 襄垣县| 温州市| 静宁县| 绩溪县| 云浮市| 榆树市| 井冈山市| 兴仁县| 台江县| 嘉荫县| 凌海市| 玛纳斯县| 武穴市| 宜兴市| 平定县| 平邑县| 濉溪县| 营口市| 滁州市| 辽阳县| 高清| 宣化县| 红安县| 清水河县| 循化| 永昌县| 缙云县| 剑河县| 钦州市|