title: Unable to consume OData in my SAPUI5 app - initial loading of metadata failed
body: <p>I am facing an issue while trying to consume OData and binding (aggregation binding) it with list item in my demo app.</p>
  <p>The webpage is showing &quot;No Data&quot;.. I referred other threads, but not similar to my issue. Even posted the thread in SAP QA forum.. no help.</p>
  <p><em>ODATA SERVICE METADATA:</em></p>
  <p><a href="https://sapes5.sapdevcenter.com/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/$metadata" rel="nofollow noreferrer">https://sapes5.sapdevcenter.com/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/$metadata</a></p>
  <p>The destination ES5 has been configured in the backend (SAP HANA CLOUD PLATFORM COCKPIT) also. Tried with no authentication and basic authentication. Still no data is displayed.</p>
  <p>Connection testing was successful with message &quot;Connection to &quot;ES5&quot; established. Response returned: 307: Temporary Redirect&quot;<a href="https://i.stack.imgur.com/7Aol8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7Aol8.png" alt="Destination configuration in SAP Cloud platform cockpit" /></a></p>
  <p>Error:</p>
  <blockquote>
  <p>[ODataMetadata] initial loading of metadata failed</p>
  <p>Error: HTTP request failed</p>
  </blockquote>
  <p>Code:</p>
  <p>VIEW:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;IconTabFilter text=&quot;Data Binding&quot; key=&quot;db&quot;&gt;
    &lt;content&gt;
       &lt;List headerText=&quot;Products&quot; items=&quot;{/ProductSet}&quot;&gt;
          &lt;items&gt;
             &lt;ObjectListItem title=&quot;{Name}&quot; number=&quot;{Price}&quot; intro=&quot;{ProductID}&quot;/&gt;
          &lt;/items&gt;
       &lt;/List&gt;
     &lt;/content&gt;
   &lt;/IconTabFilter&gt;
  </code></pre>
  <p>Manifest.json:</p>
  <pre class="lang-json prettyprint-override"><code>&quot;sap.app&quot;: {
   ......
    &quot;dataSources&quot;: {
      &quot;ES5&quot;: {
         &quot;uri&quot;: &quot;/destinations/ES5/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/&quot;,
         &quot;type&quot;: &quot;OData&quot;,
         &quot;settings&quot;: {
            &quot;odataVersion&quot;: &quot;2.0&quot;
          }
       }
     }
  },
  ....
  &quot;sap.ui5&quot;: {
    &quot;models&quot;: {
      .......other models
      &quot;&quot; : {
        &quot;dataSource&quot;: &quot;ES5&quot;
      }
    }
  }
  </code></pre>
  <p>Neoapp.json</p>
  <pre class="lang-json prettyprint-override"><code>{
     &quot;path&quot;: &quot;/destinations/ES5&quot;,
     &quot;target&quot;: {
        &quot;type&quot;: &quot;destination&quot;,
        &quot;name&quot;: &quot;ES5&quot;
      },
      &quot;description&quot;: &quot;ES5 Demo Service&quot;
  }
  </code></pre>