Hello,
Can somebody share any good example regarding TargetEndPoint as "No target". As i was not able to find any. can we also return response from it ?
Solved! Go to Solution.
Dear @Anand Jayant Kadhi ,
Yes, You can able to return response from "No Target" using Assign Message Policy. Please find attached sample proxy for same.
Dear @Anand Jayant Kadhi ,
Yes, You can able to return response from "No Target" using Assign Message Policy. Please find attached sample proxy for same.
Hi @Anil Sagar
Thanks for the example, just wanted to know how in case we are using java-callout to return response from java class , how does java jar knows which url to respond to. As i was trying out the example for yahoo weather Api given in java-cookBook there is no url specified for which the java-cookbook after deployment knows to respond to, can you please tell.
Dear @Anand Jayant Kadhi ,
Regarding, "how does java jar knows which url to respond to" ?
You will attach java callout to one of the proxy request / response flows. So, Java callout will execute only when conditions are met in that particular proxy. Java callout is also a policy in Apigee Edge which you attach to proxy request / response pipelines.
Regarding, "As i was trying out the example for yahoo weather Api given in java-cookBook there is no url specified for which the java-cookbook after deployment knows to respond to"
It does actually, It's attached to proxy endpoint "/forecastrss" in the request pipeline. Check xml here. Policies are attached using Step tags.
<Flow name="forecast"> <Description>weather forecast</Description> <Condition>(proxy.pathsuffix MatchesPath "/forecastrss") and (request.verb = "GET")</Condition> <!-- for every request lookupCityName policy --> <Request> <!-- Java extension--> <Step> <Name>cityLookUp</Name> </Step> </Request> <Response/> </Flow>
Cheers,
Anil Sagar
Hi,
can we do the same thing with javascript policy. i am creating custom response in javascript policy so how to do it without hitting the target URL?