am working on implantation that requires a dynamic configuration of the local target proxy path in <LocalTargetConnection> element. All approaches of the dynamic assignment of URL that I found for ServiceCallout focus on HTTPTargetConnection element, of which I m trying to avoid due to its overheads and the delay it might cause calling the proxy via target.url. When I try to set the path in:
<LocalTargetConnection>
<Path>{newReq.myProxy.path}</Path>
</LocalTargetConnection>
I get an deployment error " messaging.adaptors.http.configuration.MalformedTargetUrl".
Note: I can't use the pair <APIProxy> and <ProxyEndpoint> because I have everytime to hit different proxy and different flow within the proxy.
Try the solution given by Dino here .
I have not seen the solution provided by Dino.
But using Service callout policy in a No target proxy is an Anti-Pattern
Using service callouts to invoke a backend service in an API proxy with no routes to a target endpoint is technically feasible, but results in the loss of analytics data about the performance of the external service.
https://docs.apigee.com/api-platform/antipatterns/service-callout-no-target
@Siddharth Barahalikar the solution is introduced in here:
https://community.apigee.com/questions/24408/how-can-i-dynamically-set-the-url-for-a-servicecal.html