I am trying to create a RESTful service within Mule using a File connector as an inbound endpoint, when a file is present this should then be pushed to an HTTPS endpoint. Using the question below as a starting point I have tried to follow this method. There are no exceptions returned and the file does not transfer.
How to upload multiple files via REST over HTTP using Mule?
Within this question there was a comment regarding the content type not being set, i had the same issue but for the purposes of my testing i have tried to push a text file through.
<file:connector name="File" autoDelete="false" streaming="true" validateConnections="true" doc:name="File"/>
<https:connector name="HTTP_HTTPS" cookieSpec="netscape" validateConnections="true" sendBufferSize="0" receiveBufferSize="0" receiveBacklog="0" clientSoTimeout="10000" serverSoTimeout="10000" socketSoLinger="0" doc:name="HTTP-HTTPS">
<https:tls-key-store path="keystore.jks" keyPassword="PASS" storePassword="PASS"/>
<https:tls-server path="nr_up_truststore.ts" storePassword="PASS"/>
</https:connector>
<flow name="Flow1" doc:name="Flow1">
<file:inbound-endpoint path="Path" responseTimeout="10000" doc:name="File" connector-ref="File" disableTransportTransformer="true">
<file:filename-regex-filter pattern="file(.*).txt" caseSensitive="false"/>
</file:inbound-endpoint>
<object-to-byte-array-transformer encoding="ISO-8859-5" doc:name="Object to Byte Array"/>
<https:outbound-endpoint exchange-pattern="request-response" host="host" port="443" method="POST" doc:name="HTTP" connector-ref="HTTP_HTTPS" path="PATH" mimeType="text/plain" password="PASS" user="USER"/>
</flow>
With following exception stack
Exception stack is: 1. No trusted certificate found (sun.security.validator.ValidatorException) sun.security.validator.SimpleValidator:-1 (null) 2. sun.security.validator.ValidatorException: No trusted certificate found (javax.net.ssl.SSLHandshakeException) sun.security.ssl.Alerts:-1 (http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/net/ssl/SSLHandshakeException.html) 3. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=https://:@URL, connector-HttpsConnector