Hi Dinusha, Thanks a lot for the information.
With regard to the explanation on point 2, One-to-many mapping from one in-sequence to many back-end APIs To me, this sounds like a dynamic endpoint[1]. You can achieve this via in-sequence. You can use default endpoint, which will send the request to the endpoint in "To" header. You can create "To" header during the mediation. Following is a example scenario. Can the to header used to call multiple back-ends simultaneously? Say I have multiple back-ends. Once a user sends a request, API Manager calls the said back-ends simultaneously (sequentially or in parallel - requirement is to send call multiple back-ends in a single request) and collect responses from each back-end and compose a response to be sent. Example: A hotel chain has multiple back-ends running for multiple purposes. If a web UI requests details of a destination, say the request is sent to, 1. a back-end for analytics purposes - no response is received, 2. receive weather data of the location 3. booking back-end. Response: Booking related information of the destination including the weather data in a single response. Say the response is prepared at the out-sequence. How can such a scenario be handled? Thanks. Regards, Amitha On 11 September 2018 at 14:45, Dinusha Dissanayake <[email protected]> wrote: > Hi Amitha, > >> >> I am evaluating WSO2 API Manager in order to use it in an application. I >> encountered with the following scenarios and could not find documentation >> on those. >> >> >> 1. Caching of request information - in a scenario of not wanting to >> send all the parameters to the back-end, caching those at the in-sequence >> mediation; once the back-end response is received, out-sequence mediation >> uses the cached data to build the response. >> >> You can set the relvant properties to the message context within the > in-sequence you want to use in the outsequence. Following is an example of > setting the values. Here the scope has been set as default(synapse) which > makes this property available in both in and out sequences. > Set the property: > <property name="TestProperty" value="TestValue" > scope="default" type="STRING"> > >> >> >> Read the property > > <property name=”Read-Property-value” > expression=”get-property(‘Test-Property’)”/> > > <property name=”Read-Property-value” > expression=”$ctx:Test-Property”/> > > > >> 1. One-to-many mapping from one in-sequence to many back-end APIs >> >> To me, this sounds like a dynamic endpoint[1]. You can achieve this via > in-sequence. > You can use default endpoint, which will send the request to the endpoint > in "To" header. You can create "To" header during the mediation. Following > is a example scenario. > > <property name="service_ep" > expression="fn:concat('http://localhost:{port}/services/', > 'Test')"/> > <header name="To" expression="get-property('service_ep')"/> > <send> > <endpoint> > <default/> > </endpoint> > </send> > > [1] https://docs.wso2.com/display/AM250/Working+with+Endpoints > > > Thanks, > DinushaD > > > -- > Dinusha Dissanayake > Software Engineer > WSO2 Inc > Mobile: +94712939439 > <https://wso2.com/signature> >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
