Mule - File and https endpoint conflict -


i'm encountering following problem in mule. flow definition:

<flow name="httpstestconnection" processingstrategy="synchronous">     <servlet:inbound-endpoint path="/httpstestconnection" responsetimeout="10000" />     <file:outbound-endpoint path="${hip.home.dir}/online/requests" responsetimeout="10000"/>     <https:outbound-endpoint exchange-pattern="request-response" address="${test.connection.service.url}" http:contenttype="text/xml" http:method="post" connector-ref="httpsclientconnector"/>     <object-to-string-transformer />     <file:outbound-endpoint path="${hip.home.dir}/online/responses" responsetimeout="10000"/> </flow> 

i read request on url, want log message requests folder on file system. send message https endpoint using 2-way ssl. afterwards response , log responses folder on file system.

everything works fine if remove following line:

<file:outbound-endpoint path="${hip.home.dir}/online/requests" responsetimeout="10000"/> 

then payload used send https outbound endpoint.

when file outbound-endpoint component specified, request file logged, in logs encounter following exception:

caused by: java.lang.illegalstateexception: content must set before entity written @ org.apache.commons.httpclient.methods.inputstreamrequestentity.writerequest(inputstreamrequestentity.java:177) @ org.apache.commons.httpclient.methods.entityenclosingmethod.writerequestbody(entityenclosingmethod.java:499) @ org.apache.commons.httpclient.httpmethodbase.writerequest(httpmethodbase.java:2114) 

is there way make possible? use file:outbound-endpoint , https:outbound-endpoint together?

i believe issue comes fact file:outbound-endpoint consumes input produced servlet:inbound-endpoint, preventing https:outbound-endpoint read stream.

add:

<object-to-string-transformer /> 

right after servlet:inbound-endpoint deserialize inputstream string message payload can used both file , http outbound endpoints.


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -