title: Mule ESB: Connect to https service
body: <p>Can someone show me a small example of how to create a mule flow to send requests to a https service? I tried to do it, but I get the following errors:</p>
  
  <pre><code>INFO 2012-09-21 21:40:40,980 [[myapp_kareo].connector.http.mule.default.receiver.02] org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest: Content-Type not set on outgoing request, defaulting to: text/plain
  WARN 2012-09-21 21:40:41,081 [[myapp_kareo].connector.http.mule.default.receiver.02] org.mule.transformer.simple.ObjectToString: Could not close stream
  java.io.IOException: Stream closed
  at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:145)
  at java.io.BufferedInputStream.read(BufferedInputStream.java:308) at org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:170)
  </code></pre>
  
  <p>etc... </p>
  
  <p>I see at least 2 strange things:</p>
  
  <ul>
  <li><code>org.mule.transport.http.transformers.ObjectToHttpClientMethodRequest</code>: Content-Type not set on outgoing request, defaulting to: text/plain - I don't know from where I get this, the content type is set on all endpoints to text/xml.</li>
  <li><code>org.mule.transformer.simple.ObjectToString</code>: Could not close stream - I cannot explain where this comes from...</li>
  </ul>
  
  <p>My xml configuration:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;https:connector name="HTTP_HTTPS" cookieSpec="netscape" validateConnections="true" sendBufferSize="0" receiveBufferSize="0" receiveBacklog="0" clientSoTimeout="10000" serverSoTimeout="10000" socketSoLinger="0" proxyHostname="localhost" proxyPort="80" doc:name="HTTP\HTTPS"&gt;
      &lt;https:tls-key-store path="/src/main/app/keystore/javakeystore.jks" storePassword="somepassword"/&gt;
  &lt;/https:connector&gt;
  &lt;flow name="KareoFlow1" doc:name="KareoFlow1"&gt;
      &lt;http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="kareo" contentType="text/xml" doc:name="SomeApp"/&gt;
      &lt;https:outbound-endpoint exchange-pattern="request-response" host="webservice.kareo.com/" port="443" path="services/soap/2.1/KareoServices.svc" connector-ref="HTTP_HTTPS" contentType="text/xml" doc:name="Kareo"/&gt;
      &lt;echo-component doc:name="Echo"/&gt;
  &lt;/flow&gt;
  </code></pre>
  
  <p></p>
  
  <p>Thank you very much!</p>