AnsweredAssumed Answered

How to map and aggregate responses from Web service connector results

Question asked by cbeaudette606890 on May 18, 2016
Latest reply on Jun 7, 2016 by cbeaudette606890

I'm new to Boomi and am in the process of setting up a new Process that needs to do the following:

1.  Make a request to a Web Services SOAP Client (#1) (it will be via a REST endpoint in a Web Service API, though that's probably irrelevant to this discussion)

2.  From the response, parse out a data set of several items.  (See below for sample response).

Question: How to parse out only the elements I want from the result and split it into individual items.

3.  For each item in the response data set, make a request to another Web Services SOAP Client (#2, probably in a sub-process)

4.  For each response from SOAP Client #2, aggregate the results into a JSON object in the parent process to be returned to the initial REST client.

Question:  How to aggregate the responses into a single object

 

 

Any help would be greatly appreciated.  Thanks in advance.

 

 

The full response from Web Services SOAP Client #1 looks like this, with the NewDataSet to be parsed in bold red:

 

 

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <soap:Body>

      <LocateCustomerByNameResponse xmlns="http://tempuri.org/">

         <LocateCustomerByNameResult>

            <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">

               <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">

                  <xs:complexType>

                     <xs:choice minOccurs="0" maxOccurs="unbounded">

                        <xs:element name="Table">

                           <xs:complexType>

                              <xs:sequence>

                                 <xs:element name="C_CUSTOMER" type="xs:string" minOccurs="0"/>

                                 <xs:element name="C_ACCOUNT" type="xs:string" minOccurs="0"/>

                              </xs:sequence>

                           </xs:complexType>

                        </xs:element>

                     </xs:choice>

                  </xs:complexType>

               </xs:element>

            </xs:schema>

            <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">

               <NewDataSet xmlns="">

                  <Table diffgr:id="Table1" msdata:rowOrder="0">

                     <C_CUSTOMER>00059021</C_CUSTOMER>

                     <C_ACCOUNT>30393001</C_ACCOUNT>

                  </Table>

                  <Table diffgr:id="Table2" msdata:rowOrder="1">

                     <C_CUSTOMER>00099264</C_CUSTOMER>

                     <C_ACCOUNT>25742001</C_ACCOUNT>

                  </Table>

                  <Table diffgr:id="Table3" msdata:rowOrder="2">

                     <C_CUSTOMER>00127944</C_CUSTOMER>

                     <C_ACCOUNT>43120007</C_ACCOUNT>

                  </Table>

               </NewDataSet>

            </diffgr:diffgram>

         </LocateCustomerByNameResult>

      </LocateCustomerByNameResponse>

   </soap:Body>

</soap:Envelope>

Outcomes