<?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: Consuming External Service Through CAP Java in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/consuming-external-service-through-cap-java/qaa-p/12749868#M4785629</link>
    <description>&lt;P&gt;here are the error log and yes i have added the required maven dependencies&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2229609-image.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2229610-image.png" /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Nov 2023 12:54:22 GMT</pubDate>
    <dc:creator>surajg12</dc:creator>
    <dc:date>2023-11-10T12:54:22Z</dc:date>
    <item>
      <title>Consuming External Service Through CAP Java</title>
      <link>https://community.sap.com/t5/technology-q-a/consuming-external-service-through-cap-java/qaq-p/12749864</link>
      <description>&lt;P&gt;I have been trying to consume NorthWind External service in my project and getting the following error&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2229589-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;my handler code is bellow&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2229590-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;My .cds file is bellow&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2229591-image.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 07:22:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/consuming-external-service-through-cap-java/qaq-p/12749864</guid>
      <dc:creator>surajg12</dc:creator>
      <dc:date>2023-11-10T07:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming External Service Through CAP Java</title>
      <link>https://community.sap.com/t5/technology-q-a/consuming-external-service-through-cap-java/qaa-p/12749865#M4785626</link>
      <description>&lt;P&gt;The error from the OData endpoint is not providing much inner details, in your application logs you should find a detailed exception that points to the root cause of the error.&lt;/P&gt;&lt;P&gt;Looking at your code it looks like you are creating an infinite recursion, as your event handler is registered on CatalogService, but you are also delegating your Select query to CatalogService again, effectively calling your own method.&lt;/P&gt;&lt;P&gt;I think the  @Qualifier annotation on the external service should not be CatalogService, but the name of the remote service NorthWind.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 08:04:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/consuming-external-service-through-cap-java/qaa-p/12749865#M4785626</guid>
      <dc:creator>marcbecker</dc:creator>
      <dc:date>2023-11-10T08:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming External Service Through CAP Java</title>
      <link>https://community.sap.com/t5/technology-q-a/consuming-external-service-through-cap-java/qaa-p/12749866#M4785627</link>
      <description>&lt;P&gt;Hi  &lt;SPAN class="mention-scrubbed"&gt;marcbecker&lt;/SPAN&gt; thanks for your response&lt;/P&gt;&lt;P&gt;i replaced CatalogService with NorthWind and now i am getting error message as&lt;/P&gt;&lt;P&gt;{"error": {"code": "500","message": "Error executing the statement"}}&lt;/P&gt;@Autowired    @Qualifier("NorthWind")    private CqnService external;&lt;BR /&gt;    @On(event = CqnService.EVENT_READ, entity = "CatalogService.Products")    public void onRead(CdsReadEventContext context) {        CqnSelect select = Select.from("CatalogService.Products");        Result result = external.run(select);        context.setResult(result);&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;i am new to cap java pls help &lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 08:51:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/consuming-external-service-through-cap-java/qaa-p/12749866#M4785627</guid>
      <dc:creator>surajg12</dc:creator>
      <dc:date>2023-11-10T08:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming External Service Through CAP Java</title>
      <link>https://community.sap.com/t5/technology-q-a/consuming-external-service-through-cap-java/qaa-p/12749867#M4785628</link>
      <description>&lt;P&gt;Again, please provide the error message that you see in the application logs rather. It contains more information.&lt;/P&gt;&lt;P&gt;Most likely you didn't configure the NorthWind as a remote service correctly, please take a look at the documentation here: &lt;A href="https://cap.cloud.sap/docs/java/remote-services" target="test_blank"&gt;https://cap.cloud.sap/docs/java/remote-services&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please also make sure that the dependency to cds-feature-remote-odata is present in your Maven dependencies.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 10:32:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/consuming-external-service-through-cap-java/qaa-p/12749867#M4785628</guid>
      <dc:creator>marcbecker</dc:creator>
      <dc:date>2023-11-10T10:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming External Service Through CAP Java</title>
      <link>https://community.sap.com/t5/technology-q-a/consuming-external-service-through-cap-java/qaa-p/12749868#M4785629</link>
      <description>&lt;P&gt;here are the error log and yes i have added the required maven dependencies&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2229609-image.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2229610-image.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 12:54:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/consuming-external-service-through-cap-java/qaa-p/12749868#M4785629</guid>
      <dc:creator>surajg12</dc:creator>
      <dc:date>2023-11-10T12:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Consuming External Service Through CAP Java</title>
      <link>https://community.sap.com/t5/technology-q-a/consuming-external-service-through-cap-java/qaa-p/12749869#M4785630</link>
      <description>&lt;P&gt;Please check that you have configured the NorthWind service as a RemoteService in the configuration, as described here: &lt;A href="https://cap.cloud.sap/docs/java/remote-services" target="test_blank"&gt;https://cap.cloud.sap/docs/java/remote-services&lt;/A&gt;. The query is delegated to the database (CAPs default behaviour, if no configuration is present) and not the remote OData API.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 15:37:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/consuming-external-service-through-cap-java/qaa-p/12749869#M4785630</guid>
      <dc:creator>marcbecker</dc:creator>
      <dc:date>2023-11-10T15:37:25Z</dc:date>
    </item>
  </channel>
</rss>

