Closed i036207 closed 2 months ago
Hi @i036207,
As you don't have an incoming HTTP request, I would suggest you to populate CAP's Request Context based on the information available in the DwcHeaderContainer
.
Populating CAP's Request Context will also enable com.sap.cloud.sdk.cloudplatform.connectivity.DwcHeaderProvider
to work out of the box.
@dimamost, I also see that there is a util-cap
artifact available, which enables CAP support in DwC, would adding this dependency help in populating CAP's Request Context from DwcHeaderContainer
automatically?
Regards, Kavitha
While I think this essentially remains a valid feature request, I'd close this item, because if the integration is improved it would be an improvement on the util-cap
package, at least for CAP users. If more input from the Cloud SDK is needed please feel free to ping me (e.g. in this thread) 😉
Issue Description
we will call other service without http request, e.g. when the application just started ,
Important information:
Your code
the
DwcHeaderProvider
is in packagecom.sap.cloud.sdk.cloudplatform.connectivity
Expected outcome We want that
DwcHeaderProvider
can return theDwcHeader
,Actual outcome As the the provider is read the header from request header, as in our case we have no request, so with the error
Unable to pass on DwC headers to outgoing requests: Did not find any DwC headers in the set of request headers
. We have usedwcContextWrapper.withDwcContextForTenantById
, in theDwcHeaderContainer
all Dwc header is ready, but this can not be pass to theDwcHeaderProvider
. I found that there iscom.sap.dwc.util.cds.DestinationConfiguration.DwcHeaderProvider
, will this Provider work?Thank you very much
SDK Version:
<cloud-sdk.version>5.11.0</cloud-sdk.version>
Link to GitHub repo: repo
Project type, for example:
Platform:
Checklist