Service Callout issue while calling another proxy endpoint with resource name

Hi ,

I am trying to call another Proxy endpoint which is in same organization and environment using the Service Callout policy within a flow Resource.

It is working fine without using Resource but when calling Service Callout from inside the Resource (examle -/myflow), i is given error.

In our requirement, we need to call a particular Proxy API through Service Callout a particular flow (for example: /token)

when using below code , "Resource Not Found Error"

-----------------------------------------------------------------------

<LocalTargetConnection>
<APIProxy>Nissan_Identity_API</APIProxy>
<ProxyEndpoint>default</ProxyEndpoint>
<Path>/token</Path>
</LocalTargetConnection>

when using below code , "Invalid Request"

-----------------------------------------------------------------------


<!--<HTTPTargetConnection>
<Properties/>
<URL>https://api-test.nissan-europe.com/identity/v1/token</URL>
</HTTPTargetConnection>-->

0 2 404
2 REPLIES 2

When you configure the proxy-chaining with <Path> attribute, you have to specify the entire path (base path along with the resource path) For e.g. /identity/v1/token. The host is assumed to be the same as the current proxy. Can you try that?

Thanks sudheendra for quick response.

I have tested with that also but no luck.

Main problem is when I am calling from flow (/token) it is giving issue.

I don't understand the problem with flows and I have checked all the input parameters in javascript is fine.

am I missing any configuration to pass the body parameter in service callout policy?

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout async="false" continueOnError="true" enabled="true" name="SC-ThirdPartyAccessCode">
<DisplayName>ThirdPartyAccessCode</DisplayName>
<Properties/>
<Request>
<Set>
<Headers>
<!-- Retrieve the value for Header from the KVM. This is require to get the Access Token.-->
<Header name="content-type">application/x-www-form-urlencoded</Header>
<Header name="Authorization">{request.header.Authorization}</Header>
<!-- <Header name="Authorization">Basic xx</Header>-->
</Headers>
<FormParams>
<!-- <FormParam name="grant_type">{request.formparam.grant_type}</FormParam>
<FormParam name="redirect_uri">{request.formparam.redirect_uri}</FormParam> -->
<FormParam name="code">{request.formparam.code}</FormParam>
<!--<FormParam name="grant_type">authorization_code</FormParam>
<FormParam name="code">IctLVwRH</FormParam>
<FormParam name="redirect_uri">http://dinochiesa.github.io/openid-connect/callback-handler.html</FormParam>-->
</FormParams>
<Verb>POST</Verb>

<Payload/>
</Set>
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
</Request>
<Response>calloutResponse</Response>
<!-- <LocalTargetConnection>
<Path>/
/v1/token</Path>
</LocalTargetConnection> -->
<LocalTargetConnection>
<APIProxy>Customer_Identity_API</APIProxy>
<ProxyEndpoint>default</ProxyEndpoint>
<Path>/identity/v1/token</Path>
</LocalTargetConnection>

Thanks,

Kumar P.