0
votes

Trying to deploy an API which can gather response from multiple services (endpoints) in DSS (Application Server) and combine the responses in ESB.

Consider API as "Person" it has a GET method "getperson" "getperson" -- accepts personID as the parameter (query filter).

RESPONSE:

<person>
    <id\>
    <name\>
    <type\>
    <address>
        <street\>
        <apt\>
        <city\>
        <state\>
        <zipcode\>
    </address>
    <image>
        <id\>
        <description\>
        <title\>
    </image>
<person>

services in DSS are as follows ::

  1. person_service

RESPONSE:

<person>
    <id\>
    <name\>
    <type\>
    <addressid\>
    <imageid\>
</person>

2. address_service

RESPONSE:

 <address>
        <street\>
        <apt\>
        <city\>
        <state\>
        <zipcode\>
    </address>

3. image_service

RESPONSE:

 <image>
    <id>
    <description>
    <title>
</image>

I was able to create services successfully in DSS. But unable deploy an API using all the 3 service endpoints into one API GET method call.

I was following the sample given in the documentation for service chaining http://docs.wso2.org/display/ESB460/Service+Chaining

But, in that sample it was done using proxy service. I am not sure how to connect that to API's

ESB version: 4.6.0 DSS version: 4.0.1

Thank you

1

1 Answers

0
votes

You can do the same service chaining logic in API. If you look at API configuration, where you can define mediation logic as InSequence and OutSequence like you do for proxy service.

At the same time, you can define a proxy service with same logic, and provide that proxy service as your endpoint for your API.