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

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"/>
主站蜘蛛池模板: 龙井市| 西乌| 进贤县| 梅河口市| 石泉县| 宁津县| 九龙城区| 太谷县| 芜湖县| 永仁县| 榆树市| 即墨市| 苏尼特左旗| 古浪县| 壶关县| 尼玛县| 广汉市| 措勤县| 公安县| 于田县| 平江县| 荆州市| 宜都市| 平陆县| 房山区| 仲巴县| 文山县| 曲周县| 平昌县| 郧西县| 育儿| 岑溪市| 鄂尔多斯市| 正宁县| 祁连县| 宁远县| 安塞县| 芜湖县| 自贡市| 蒙山县| 车险|