apigee - I have a requirement to make calls to two different end points in a sequence on a given call -
apigee - I have a requirement to make calls to two different end points in a sequence on a given call -
i trying accomplish functionality have phone call 2 different backends / target endpoints have different interface in sequence. output of 1 phone call becomes input sec 1 upon error status first call.
i know how implement this. new apigee details help me.
it sounds need servicecallout in request flow.
set target whatever sec server need talk in normal flow. create policy callout first target:
<servicecallout name="mypolicy"> <request clearpayload="false" variable="myrequest"/> <response>myresponse</response> <httptargetconnection> <properties/> <url>http://example.com</url> </httptargetconnection> </servicecallout>
note response block puts headers , payload response object can extract variables using "myresponse" <source> in extractvariables policy.
then can build new request target variables set in extractvariables using assignmessage policy
service callout http://apigee.com/docs/api-services/content/call-services-or-apis-using-servicecallout
extractvariables http://apigee.com/docs/api-services/content/extract-message-content-using-extractvariables
assignmessage http://apigee.com/docs/api-services/content/generate-or-modify-messages-using-assignmessage
apigee
Comments
Post a Comment