Repeating elements/groups in the SOAP response

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi all,
<span style="font-family:verdana,arial,sans-serif; font-size:11px; line-height:normal; text-align:left We have repeating elements/groups in the SOAP response so We want to filter out the duplicates.How should We
filter them?Plz find attached Source.xml which has current SOAPMessage.We want to filter them as Destination.xml.
<span style="font-family:verdana,arial,sans-serif; font-size:11px; line-height:normal; text-align:left
<span style="font-family:verdana,arial,sans-serif; font-size:11px; line-height:normal; text-align:left Source.xml:
<?xml version="1.0" encoding="UTF-8"?><br/>
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dp="http://www.datapower.com/extensions" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://Test/v1/ <br/>
<soapenv:Header/><br/>
<soapenv:Body><br/>
<v1:GetTestWSResponse> <br/>
<v1:CardNumber>12345</v1:CardNumber><br/>
<v1:ProgramInfoList><br/>
<v1:ProgramInfo><br/>
<v1:PartnerInformationGrp><br/>
<v1:PartnerId>H</v1:PartnerId><br/>
<v1:ProgId>H00002</v1:ProgId> <br/>
</v1:PartnerInformationGrp><br/>
<v1:AmtInformationGrp> <br/>
<v1:HighAmt>19999.00</v1:HighAmt><br/>
<v1:LowAmt>0.00</v1:LowAmt><br/>
</v1:AmtInformationGrp><br/>
</v1:ProgramInfo><br/>
<v1:ProgramInfo><br/>
<v1:PartnerInformationGrp><br/>
<v1:PartnerId>H</v1:PartnerId><br/>
<v1:ProgId>H00001</v1:ProgId> <br/>
</v1:PartnerInformationGrp><br/>
<v1:AmtInformationGrp> <br/>
<v1:HighAmt>24.00</v1:HighAmt><br/>
<v1:LowAmt>2.00</v1:LowAmt><br/>
</v1:AmtInformationGrp><br/>
</v1:ProgramInfo><br/>
<v1:ProgramInfo><br/>
<v1:PartnerInformationGrp><br/>
<v1:PartnerId>H</v1:PartnerId><br/>
<v1:ProgId>H00002</v1:ProgId> <br/>
</v1:PartnerInformationGrp><br/>
<v1:AmtInformationGrp> <br/>
<v1:HighAmt>19.00</v1:HighAmt><br/>
<v1:LowAmt>12.00</v1:LowAmt><br/>
</v1:AmtInformationGrp><br/>
</v1:ProgramInfo><br/>
<v1:ProgramInfo><br/>
<v1:PartnerInformationGrp><br/>
<v1:PartnerId>H</v1:PartnerId><br/>
<v1:ProgId>H00001</v1:ProgId> <br/>
</v1:PartnerInformationGrp><br/>
<v1:AmtInformationGrp> <br/>
<v1:HighAmt>1744.00</v1:HighAmt><br/>
<v1:LowAmt>99.00</v1:LowAmt><br/>
</v1:AmtInformationGrp><br/>
</v1:ProgramInfo><br/>
<v1:ProgramInfo><br/>
<v1:PartnerInformationGrp><br/>
<v1:PartnerId>H</v1:PartnerId><br/>
<v1:ProgId>H00002</v1:ProgId> <br/>
</v1:PartnerInformationGrp><br/>
<v1:AmtInformationGrp> <br/>
<v1:HighAmt>147.00</v1:HighAmt><br/>
<v1:LowAmt>72.00</v1:LowAmt><br/>
</v1:AmtInformationGrp><br/>
</v1:ProgramInfo><br/>
</v1:ProgramInfoList><br/>
</v1:GetTestWSResponse><br/>
</soapenv:Body><br/>
</soapenv:Envelope><br/>
<p style="text-align:left <span style=" <span style="font-size:11px; line-height:normal
<p style="text-align:left <span style=" <span style="font-size:11px; line-height:normal Destintion.xml: This type of output we are expecting.
<?xml version="1.0" encoding="UTF-8"?><br/>
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dp="http://www.datapower.com/extensions" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://Test/v1/ <br/>
<soapenv:Header/><br/>
<soapenv:Body><br/>
<v1:GetTestWSResponse> <br/>
<v1:CardNumber>12345</v1:CardNumber><br/>
<v1:ProgramInfoList><br/>
<v1:ProgramInfo><br/>
<v1:PartnerInformationGrp><br/>
<v1:PartnerId>H</v1:PartnerId><br/>
<v1:ProgId>H00002</v1:ProgId> <br/>
</v1:PartnerInformationGrp><br/>
<v1:AmtInformationGrp> <br/>
<v1:HighAmt>19999.00</v1:HighAmt><br/>
<v1:LowAmt>0.00</v1:LowAmt><br/>
</v1:AmtInformationGrp><br/>
<v1:AmtInformationGrp> <br/>
<v1:HighAmt>19.00</v1:HighAmt><br/>
<v1:LowAmt>12.00</v1:LowAmt><br/>
</v1:AmtInformationGrp><br/>
<v1:AmtInformationGrp> <br/>
<v1:HighAmt>147.00</v1:HighAmt><br/>
<v1:LowAmt>72.00</v1:LowAmt><br/>
</v1:AmtInformationGrp><br/>
</v1:ProgramInfo><br/>
<v1:ProgramInfo><br/>
<v1:PartnerInformationGrp><br/>
<v1:PartnerId>H</v1:PartnerId><br/>
<v1:ProgId>H00001</v1:ProgId> <br/>
</v1:PartnerInformationGrp><br/>
<v1:AmtInformationGrp> <br/>
<v1:HighAmt>24.00</v1:HighAmt><br/>
<v1:LowAmt>2.00</v1:LowAmt><br/>
</v1:AmtInformationGrp><br/>
<v1:AmtInformationGrp> <br/>
<v1:HighAmt>1744.00</v1:HighAmt><br/>
<v1:LowAmt>99.00</v1:LowAmt><br/>
</v1:AmtInformationGrp><br/>
</v1:ProgramInfo> <br/>
</v1:ProgramInfoList><br/>
</v1:GetTestWSResponse><br/>
</soapenv:Body><br/>
</soapenv:Envelope><br/>
<p style="text-align:left <span style=" <span style="font-size:11px; line-height:normal
<p style="text-align:left <span style=" <span style="font-size:11px; line-height:normal
<p style="text-align:left <span style=" <span style="font-size:11px; line-height:normal Thanks
<p style="text-align:left <span style=" <span style="font-size:11px; line-height:normal
<p style="text-align:left <span style=" <span style="font-size:11px; line-height:normal <br/>


View the full article
 
Back
Top