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

  • 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"/>
主站蜘蛛池模板: 全南县| 嘉义县| 察雅县| 汝州市| 班戈县| 和平县| 萍乡市| 辽宁省| 讷河市| 桐柏县| 建昌县| 密云县| 泽库县| 台山市| 抚远县| 安岳县| 绥化市| 正阳县| 佛学| 岳阳市| 桃园县| 固镇县| 茶陵县| 斗六市| 东丰县| 浠水县| 泸溪县| 东莞市| 驻马店市| 武汉市| 阳城县| 新绛县| 香港| 新郑市| 屏山县| 永登县| 泰来县| 舟曲县| 洪江市| 馆陶县| 巴南区|