简体   繁体   中英

In Mule, does the message flow as XML?

如果源组件正在以XDR格式发送数据并被路由到期望XDR格式消息的目标,我们是否必须引入一个转换器,以便可以在Mule流中检查/过滤消息?

Check if this can answer your question -

https://docs.mulesoft.com/mule-user-guide/v/3.9/message-state

To better understand how Mule message processors act upon messages, it is useful to examine a message before and after it is processed. When a transformer converts the content of a message payload from one data structure to another, or from one data format to another – for example, JSON to Java Object, Map to CSV, or Java Object to XML – you may wonder exactly how Mule has changed, removed or added to the contents of a message. Reviewing a message "before and after" should help you to be better able to work with the message further in the flow.

This document uses an example application and draws upon the content of the Mule Message Structure document to examine a message as it passes through a Transform Message component in a flow. Running the application in debug mode in Anypoint Studio, the screenshots illustrates the innards of a message using the Visual Debugger which facilitates "frozen-in-time" viewing of a message.

No Messages in Mule does not flow as XML . It always flows as the message format that is being received from the endpoint.

Whereas the message you receive from the endpoint is wrapped in to a "Mule Message" format. This mule message contains your message received from the endpoint and when ever you use appropriate processors or transformers the messages are extracted and used.

You need to know the following things.

1.If you pass you message to a transformer then the message is transformed.

2.If you need to send a message to another endpoint the you need to find if the message is in the correct format that then endpoint expects.

3.Some times based on the message in the Mule message the outbound endpoint will be capable of changing the message ant it here where strength of an esb lies.

4.The message remains the same as what is received unless and until you transform it in the flow except it is wrapped in Mule Message format while traveling between mule components in a flow.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM