I am trying to call an integration in a process model that return a result body response in XML format. The thing right now is that the result body response has too many values which I don't need (see body response below). In summary I just need to get the value of "ESTATUS" : "2" in this case "2" from the body response and set it to a process variable within my process model. How can I do this using the integration Smart service? I have also attached below some images of how I have set up the data output tab of the Integration Smart Service.
Result body response:
body: "<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="">schemas.xmlsoap.org/.../" xmlns:xsi="">www.w3.org/.../XMLSchema-instance" xmlns:xsd="">www.w3.org/.../XMLSchema"><soap:Body><GetContribuyentesResponse xmlns=""RGE_RUC":"00117824979","RGE_NOMBRE":"JUAN">dgii.gov.do/"><GetContribuyentesResult>{"RGE_RUC":"00117824979","RGE_NOMBRE":"JUAN CARLOS PEREZ SALCEDO","NOMBRE_COMERCIAL":"XOLUTECH DEV","CATEGORIA":"0","REGIMEN_PAGOS":"2","ESTATUS":"2"}</GetContribuyentesResult></GetContribuyentesResponse></soap:Body></soap:Envelope>"
Data Output tab of the Integration Smart Service:
Discussion posts and replies are publicly visible
A couple of things...
Thanks for your response. I am not sure how to use fn!xpathsnippet() in the the Integration Smart Service. Where should I implement the function in order to extract the value from the xml?
You would use the Integration Smart Service to return the full response from the Service. Store the returned value in a process variable and then call a separate rule where you'd use fn!xpathsnippet() to drill into the data to return the value(s) you're looking for. Since the latter is encapsulated in its own rule you can build and test this completely independently of the process model and once you know it's working you can then implement the call to it as described.
To help work out the XPATH you need to use in the function there are any number of on-line tools that can help e.g. http://www.xpathtester.com/xpath