2 Replies Latest reply on Jan 15, 2016 7:07 AM by moritzvonh RSS
    rkrishna Explorer

    SOAP XML Parsing



    Could some one help me in parsing below soap response while calling service:


    <infasoapns:Envelope xmlns:infasoapns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:infawsdlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.informatica.com/dis/ws/">













    How can i get values or store into infotable. Any help would be appreciated.



      • Re: SOAP XML Parsing
        adrianpet Creator


             Can you show me the service that you've made in order to obtain the values from the SOAP?

             Basically you'll need to create a service in which you will set the BaseType in the Inputs/Outputs tab to be InfoTable(you may need to set a DataShape for your parameters) and the infotable Type should be Just Infotable, but first I would like to see the service that you have created for this.



        Thank you,


        • Re: SOAP XML Parsing
          moritzvonh Creator

          Hi Rajesh,

          did you see this posting: Regarding SOAP based Webservice Call and specifically the answer from Pai Chung. It points out how the XML that is returned by a SOAP call can be easily parsed with E4X. You can also use for loops with it, e.g. (based on Pai's example):


          // this is what Pai referred to:

          // var itemKey = xmlDoc.::Body.::GetTopTenPartsResponse.::GetTopTenPartsResult.::JsonRecord.::item.::key.*::string;

          // let's assume GetTopTenPartsResult has multiple JsonRecord sub-elements then your code could look like the following:


          //initialize your infotable

          var myInfoTable = ...;

          for each (var entry in xmlDoc.::Body.::GetTopTenPartsResponse.::GetTopTenPartsResult){

               var itemKey = entry.::JsonRecord.::item.::key.*::string;

               // now use this value with an object for an InfoTable row:

               var newRow = new Object();


               // ... assign other values from XML to object properties



          var result = myInfoTable;