title: How to Invoke API in WSO2_AM from WSO2_ESB Proxy Service
body: <p>I have published an API in <code>WSO2AM</code> and the url shown in store is <code>https://{ip}:8243/phoneverify/1.0.0</code></p>
  
  <p>Now what I'm trying to do is call this from ESB Proxy service (which will later be invoked by a scheduler) as follows,</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;proxy xmlns="http://ws.apache.org/ns/synapse"
         name="a"
         transports="https,http"
         statistics="disable"
         trace="disable"
         startOnLoad="true"&gt;
     &lt;target&gt;
        &lt;inSequence&gt;
           &lt;log level="full"/&gt;
           &lt;send&gt;
              &lt;endpoint&gt;
                 &lt;http method="get"
                       uri-template="https://{ip}:8243/phoneverify/1.0.0/CheckPhoneNumber"&gt;
                    &lt;timeout&gt;
                       &lt;duration&gt;30000&lt;/duration&gt;
                       &lt;responseAction&gt;fault&lt;/responseAction&gt;
                    &lt;/timeout&gt;
                 &lt;/http&gt;
                 &lt;property name="Authorization"
                           value="Bearer aaa4663b5851e06f2f1bc6e871fd20b7"
                           scope="axis2"/&gt;
              &lt;/endpoint&gt;
           &lt;/send&gt;
        &lt;/inSequence&gt;
        &lt;outSequence&gt;
           &lt;log level="full"/&gt;
        &lt;/outSequence&gt;
     &lt;/target&gt;
     &lt;description/&gt;
  &lt;/proxy&gt;
  </code></pre>
  
  <p>But when I try this it gives <code>org.apache.axis2.AxisFault: Read timed out</code> and in the server </p>
  
  <pre><code>[2015-03-20 08:50:48,481]  INFO - LogMediator To: /services/a.aHttpSoap12Endpoint, WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: urn:uuid:ce224d0e-f158-458c-b0be-ffeb09198e47, Direction: request, Envelope: &lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"&gt;&lt;soapenv:Body&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;
  [2015-03-20 08:50:48,500]  INFO - TimeoutHandler This engine will expire all callbacks after : 120 seconds, irrespective of the timeout action, after the specified or optional timeout
  
  
  [2015-03-20 08:50:49,289] ERROR - TargetHandler I/O error: Host name verification failed for host : {ip}
  javax.net.ssl.SSLException: Host name verification failed for host : 52.74.66.119
          at org.apache.synapse.transport.http.conn.ClientSSLSetupHandler.verify(ClientSSLSetupHandler.java:152)
          at org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake(SSLIOSession.java:285)
          at org.apache.http.nio.reactor.ssl.SSLIOSession.isAppInputReady(SSLIOSession.java:380)
          at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:118)
          at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:160)
          at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:342)
          at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:320)
          at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:280)
          at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106)
          at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:604)
          at java.lang.Thread.run(Unknown Source)
  [2015-03-20 08:50:49,320]  WARN - EndpointContext Endpoint : AnonymousEndpoint will be marked SUSPENDED as it failed
  [2015-03-20 08:50:49,320]  WARN - EndpointContext Suspending endpoint : AnonymousEndpoint - current suspend duration is : 30000ms - Next retry after : Fri Mar 20 08:51:19 UTC 2015
  </code></pre>
  
  <p>I could invoke the API using <code>Chrome Advanced Rest Client</code>. Therefore what am I doing wrong in, invoking this through the proxy service?</p>