none
How to append data recevie from SFAPI into a xml message received on multiple requests from SFAPI (Success Factor API). RRS feed

  • Question

  • Hello Everyone,

    In our project we are receiving response from SFAPI (Success Factor API) which consist of multiple records. the repsonse schema consists of "Any" node in which we receives data dynamically when we request data from SFAPI (Success Factor API). we have to map these data with our destination schema but the problem is we are requesting data from SFAPI (Success Factor API) multiple times  so how should we map these data in our destination schema so that all the data which we receive on multiple request from  SFAPI (Success Factor API) get mapped into the schema at one time. 

    How we should append the data into a XML message of all the records we receive from SFAPI on multiple requests.

    Please Advice.

    Thanks

    Tuesday, December 20, 2016 2:07 PM

Answers

  • HI,

    Depends upon the scenario, how many time is the api being hit??

    Easiest way would be to construct a response string that confirms to the final output which you wish your app to emit. Put the call to the api in a loop and then start appending the response of each call in the string, once the loop is exited, finish the string by appending the xml message end part and then load this string into an xldoc and assign it to the message.

    Regards


    Mandar Dharmadhikari

    Tuesday, December 20, 2016 2:20 PM
    Moderator

All replies

  • HI,

    Depends upon the scenario, how many time is the api being hit??

    Easiest way would be to construct a response string that confirms to the final output which you wish your app to emit. Put the call to the api in a loop and then start appending the response of each call in the string, once the loop is exited, finish the string by appending the xml message end part and then load this string into an xldoc and assign it to the message.

    Regards


    Mandar Dharmadhikari

    Tuesday, December 20, 2016 2:20 PM
    Moderator
  • You can append the responses in one msg output.

    You basically will be calling the API for responses and loop it for the times you intend to, then start aggregating the responses 

    This article will be helpful if you have large batches to be aggregated. You can even aggregate in-memory and construct final message if the batches are less and size is small.


    Pi_xel_xar

    Blog: My Blog

    BizTalkApplicationDeploymentTool: BizTalk Application Deployment Tool/

    Tuesday, December 20, 2016 2:30 PM
    Answerer