[
https://issues.apache.org/jira/browse/CAMEL-13464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16829295#comment-16829295
]
Remco Schoen commented on CAMEL-13464:
--------------------------------------
This is how I set my header, so yes:
Map<String, String> endpointHttpHeaders = new HashMap<>()
endpointHttpHeaders.put('AUTHORIZATION', "Bearer
${oDataAuthentication.accessToken}".toString())
exchange.in.headers.put('CamelOlingo4.endpointHttpHeaders', endpointHttpHeaders)
I don't know how to create a simple test-case, I'm not familiar with any mock
odata-services.
I attached the diff how I solved in my project: [^headers_fix.diff]
> Problem with Olingo4 and authenticated metadata
> -----------------------------------------------
>
> Key: CAMEL-13464
> URL: https://issues.apache.org/jira/browse/CAMEL-13464
> Project: Camel
> Issue Type: Bug
> Components: camel-olingo4
> Affects Versions: 2.23.2
> Reporter: Remco Schoen
> Priority: Minor
> Attachments: headers_fix.diff
>
>
> I'm currently working with the Olingo4 component for linking with Microsoft
> Dynamics 365 CRM. This OData feed requires authentication to get the
> metadata. As I have to refresh the Access Token for authenticating I can not
> add it to the configuration, but I'm using the
> CamelOlingo4.endpointHttpHeaders header for this. But when the component is
> retrieving the metadata it is ignoring the header and it is not able to
> authenticate.
> If I add the headers to the get metadata request it works.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)