2 Replies Latest reply on Jan 28, 2021 11:50 PM by kunal pandit

    How to parse rest service response (payload json)

    Claus Peter New Member

      hi all


      I am working on rest service integration in an ActiveVOS BPEL flow. So far we get the response of the service. It looks like that:


      <rest:RESTResponse xmlns:rest="http://schemas.activebpel.org/REST/2007/12/01/aeREST.xsd"



            <rest:header name="x-corr-id" value="972631e2-0a31-11eb-91e4-4ead98d21567"/>

            <rest:header name="Strict-Transport-Security" value="max-age=15724800;includeSubDomains"/>

            <rest:header name="Content-Security-Policy" value="default-src 'self'"/>

            <rest:header name="Connection" value="keep-alive"/>

            <rest:header name="X-Content-Security-Policy" value="default-src 'self'"/>

            <rest:header name="Content-Length" value="208"/>

            <rest:header name="Date" value="Fri,09 Oct 2020 13:16:07 GMT"/>

            <rest:header name="Content-Type" value="application/json"/>

            <rest:header name="X-WebKit-CSP" value="default-src 'self'"/>


         <rest:payload contentType="application/json">{"messages":[],"vnkeyResult":{"contractID":"06166159",

         "modified":"2000-07-16T22:00:00.000+0000","userId":"P91605  ","vnKey":"347034247001"}}</rest:payload>                                                                   "}}</rest:payload>



      Now I should parse the Json string (part of the payload) for the value of the attribute "vnKey".

      Could anybody give me some support for this requirement. Is there any string function or method to provide this ?

      At the end I like to have maybe a variable like VNKEY = 347034247001.