Soap Mule ESB如何将POST负载转储到文件

Soap Mule ESB如何将POST负载转储到文件,soap,mule,esb,Soap,Mule,Esb,我开始使用Mule ESB。我正在尝试构建一个SOAP代理服务,该服务接收SOAP请求并将其重定向到SOAP服务 像这样一个简单的例子很好- <flow name="http_redirectFlow1" doc:name="http_redirectFlow1"> <http:inbound-endpoint exchange-pattern="request-response" address="http://localhost:8092/HelloProxySer

我开始使用Mule ESB。我正在尝试构建一个SOAP代理服务,该服务接收SOAP请求并将其重定向到SOAP服务

像这样一个简单的例子很好-

<flow name="http_redirectFlow1" doc:name="http_redirectFlow1">
    <http:inbound-endpoint exchange-pattern="request-response" address="http://localhost:8092/HelloProxyService" doc:name="HTTP"/>
    <http:outbound-endpoint exchange-pattern="request-response" method="POST" address="http://localhost:8080/soapsvc/hello" contentType="text/xml" doc:name="HTTP"/>
</flow>

现在我想将请求的内容转储到一个文件中。哪种方法最好?我试图通过在入站和出站端点之间插入此段来使用文件连接器-

    <file:outbound-endpoint path="c:/temp" outputPattern="temp.txt" responseTimeout="10000" doc:name="File"/>


但这似乎不起作用。我得到一个异常,它说“在编写实体之前必须设置内容”。不确定是什么,但我可能完全错了。请帮帮我……

我自己弄明白了。我必须使用DOM到XML转换器将DOM转换为XML。XML转储的操作如下:-

<mulexml:dom-to-xml-transformer returnClass="java.lang.String"></mulexml:dom-to-xml-transformer>
<file:outbound-endpoint path="c:/temp" outputPattern="Dump_Rcvd.txt" responseTimeout="10000" doc:name="File" />


谢谢

或者,您可以在
文件:出站端点
之前使用
,该端点将有效负载设置为字符串格式,并且可以轻松写入文件

使用文件连接器和涉及Bytearray的转换器。

接受答案,这样论坛未回答问题的百分比将降低。