I am getting started with Mule ESB. I am trying to build a SOAP proxy service that receives a SOAP request and redirects it to a SOAP service.
A simple example like this works fine -
<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>
Now I want to dump the contents of the request to a file. Which is the best way to do it? I tried to use the File connector by inserting this segment between the inbound and outbound endpoints -
<file:outbound-endpoint path="c:/temp" outputPattern="temp.txt" responseTimeout="10000" doc:name="File"/>
But that doesn't seem to work. I get an exception that says "Content must be set before entity is written". Not sure what it is, but I may be completely wrong in how I am doing. Please help....