cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

XSLT code to get SAOP_Body from the SOAP Response

0 Kudos
2,457

Hello experts,

I am working on SAP with Sales force integration a synchronous scenario . I am trying to fetch only the Body part of the soap response message, but my below xslt is not producing desired output.

Response Message structure:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sf="urn:sobject.enterprise.soap.sforce.com"> <soapenv:Header> <LimitInfoHeader> <limitInfo> <current></current> <limit></limit> <type></type> </limitInfo> </LimitInfoHeader> </soapenv:Header> <soapenv:Body> <queryResponse> <result> <done></done> <queryLocator xsi:nil="true"/> <records xsi:type="sf:Opportunity"> <sf:Id xsi:nil="true"/> <sf:Amount></sf:Amount> <sf:CloseDate></sf:CloseDate> <sf:Name></sf:Name> </records> <size></size> </result> </queryResponse> </soapenv:Body> </soapenv:Envelope>

XSLT code i tried:

<?xml version="1.0"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sf="urn:sobject.enterprise.soap.sforce.com" version="1.0"> <xsl:output version="1.0" indent="yes" encoding="UTF-8" method="xml"/> -<xsl:template match="/"> <xsl:copy-of select="SOAP:Env:Envelope/SOAP-ENV:Body/*"/> </xsl:template> </xsl:stylesheet>

I have followed different posts in scn regarding on the same requirement, but nothing was helped to resolve my issue. Please can anyone give me suggestion to resolve my issue ?

Thanks,

Siva.

View Entire Topic
0 Kudos

Hi Vila thank you so much for your prompt response. It is perfectly working now.

Thank you Amit for your answer.