<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Getting CORS Error while calling Northwind Service in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/getting-cors-error-while-calling-northwind-service/qaa-p/13792566#M4841293</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;1- direct url wont work here, and also if you use&amp;nbsp;&lt;STRONG&gt;http:&lt;/STRONG&gt;//services.odata.org in your destination then also it will give CORS issue.&lt;/P&gt;&lt;P&gt;2- this is fine just you need to remove destination name from the &lt;STRONG&gt;uri&lt;/STRONG&gt; in manifest file, it should be like below,&lt;/P&gt;&lt;LI-CODE lang="abap"&gt;"dataSources": {
    "mainService": {
        "uri": "/V2/Northwind/Northwind.svc/",
        "type": "OData",
        "settings": {
            "annotations": [],
            "localUri": "localService/metadata.xml",
            "odataVersion": "2.0"
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;hope this helps.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Aug 2024 06:44:48 GMT</pubDate>
    <dc:creator>Akhilesh_u</dc:creator>
    <dc:date>2024-08-13T06:44:48Z</dc:date>
    <item>
      <title>Getting CORS Error while calling Northwind Service</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-cors-error-while-calling-northwind-service/qaq-p/13791188</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;I am facing problem of getting CORS error while calling Northwind oData Service to show data in my SAPUI5 Application created in BAS.&lt;BR /&gt;I am using 2 approaches here:&lt;BR /&gt;1. By Using the Rest API&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Yash_Sharma_0-1723451923091.png"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/150223i2121ADFD93C9FE03/image-size/medium?v=v2&amp;amp;px=400" alt="Yash_Sharma_0-1723451923091.png" title="Yash_Sharma_0-1723451923091.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; By directly calling the Service URL through ODataModel, I am getting CORS error on this but while disabling the browser security I am getting the data perfectly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. By Configuring the&amp;nbsp; Northwind Service to the Destination in BTP and try using the destination.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Yash_Sharma_1-1723452117813.png"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/150226iC498FCFC012BE8F4/image-size/medium?v=v2&amp;amp;px=400" alt="Yash_Sharma_1-1723452117813.png" title="Yash_Sharma_1-1723452117813.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;manifest.json&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Yash_Sharma_2-1723452215683.png"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/150229i0AE15843682D5DA3/image-size/medium?v=v2&amp;amp;px=400" alt="Yash_Sharma_2-1723452215683.png" title="Yash_Sharma_2-1723452215683.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Yash_Sharma_3-1723452294301.png"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/150232i0D059EA9244E1965/image-size/medium?v=v2&amp;amp;px=400" alt="Yash_Sharma_3-1723452294301.png" title="Yash_Sharma_3-1723452294301.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;xs-app.json&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Yash_Sharma_4-1723452347331.png"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/150235i87CCB0E2EE0C90D6/image-size/medium?v=v2&amp;amp;px=400" alt="Yash_Sharma_4-1723452347331.png" title="Yash_Sharma_4-1723452347331.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;since the preload is true, the destination is loading first to fetch the metadata,&lt;/P&gt;&lt;P&gt;I am getting this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Yash_Sharma_5-1723452451833.png"&gt;&lt;img src="https://community.sap.com/t5/image/serverpage/image-id/150239i8371915A422F5788/image-size/medium?v=v2&amp;amp;px=400" alt="Yash_Sharma_5-1723452451833.png" title="Yash_Sharma_5-1723452451833.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help me with this.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 08:51:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-cors-error-while-calling-northwind-service/qaq-p/13791188</guid>
      <dc:creator>Yash_Sharma</dc:creator>
      <dc:date>2024-08-12T08:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Getting CORS Error while calling Northwind Service</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-cors-error-while-calling-northwind-service/qaa-p/13792566#M4841293</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;1- direct url wont work here, and also if you use&amp;nbsp;&lt;STRONG&gt;http:&lt;/STRONG&gt;//services.odata.org in your destination then also it will give CORS issue.&lt;/P&gt;&lt;P&gt;2- this is fine just you need to remove destination name from the &lt;STRONG&gt;uri&lt;/STRONG&gt; in manifest file, it should be like below,&lt;/P&gt;&lt;LI-CODE lang="abap"&gt;"dataSources": {
    "mainService": {
        "uri": "/V2/Northwind/Northwind.svc/",
        "type": "OData",
        "settings": {
            "annotations": [],
            "localUri": "localService/metadata.xml",
            "odataVersion": "2.0"
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2024 06:44:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-cors-error-while-calling-northwind-service/qaa-p/13792566#M4841293</guid>
      <dc:creator>Akhilesh_u</dc:creator>
      <dc:date>2024-08-13T06:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Getting CORS Error while calling Northwind Service</title>
      <link>https://community.sap.com/t5/technology-q-a/getting-cors-error-while-calling-northwind-service/qaa-p/13803067#M4842584</link>
      <description>Thanks &lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1417064"&gt;@Akhilesh_u&lt;/a&gt;, worked for me</description>
      <pubDate>Thu, 22 Aug 2024 05:16:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/getting-cors-error-while-calling-northwind-service/qaa-p/13803067#M4842584</guid>
      <dc:creator>Yash_Sharma</dc:creator>
      <dc:date>2024-08-22T05:16:38Z</dc:date>
    </item>
  </channel>
</rss>

