Question

whenever I make a call to getperson(id) from ESB with id as the query parameter; I should get the following response

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

I have 3 services in DSS services in DSS:

  1. person_service

Response:

    <person>
        <id\>
        <name\>
        <type\>
        <addressid\>
        <imageid\>
    </person>
  1. address_service

Response:

            <address>
        <street\>
        <apt\>
        <city\>
        <state\>
        <zipcode\>
    </address>
  1. image_service

Response:

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

I am trying to add a resource in ESB. how can I group the response of multiple DSS services into one XML as show in the above.

ESB version: 4.6.0 DSS version: 4.0.1

Thank you

Was it helpful?

Solution

Yes you can achieve this using service chaining and aggregator mediator. First make request to person_service and get response, then use service chaining mechanism to send a request to address_service and so on. Then use aggregator mediator to combine the responses.

For service chaining refer http://docs.wso2.org/display/ESB460/Service+Chaining and for aggregator mediator refer http://docs.wso2.org/display/IntegrationPatterns/Aggregator

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top