on 06-19-2008 3:29 PM
Hi,
I need a code to remove SOAP Envelop using XSLT mapping.
Source:
<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:enterprise.soap.sforce.com">
<soapenv:Body>
<getServerTimestampResponse>
<result>
<timestamp>2008-06-19T14:22:25.004Z</timestamp>
</result>
</getServerTimestampResponse>
</soapenv:Body>
</soapenv:Envelope>
target:
<?xml version="1.0" encoding="UTF-8" ?>
<a>
<b>
<c>2008-06-19T14:22:25.004Z<c>
</b>
</a>
Please help me in this
Thanks&Regards,
Yuga
Also try this to create the target file you mentioned:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:template match="//result">
<c>
<xsl:value-of select="timestamp"/>
</c>
</xsl:template>
</xsl:stylesheet>
Liang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
<?xml version='1.0' ?>
<xsl:stylesheet version="1.0" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="/">
<ns0:c>
<xsl:copy-of select="SOAP-ENV:Envelope/SOAP-ENV:Body"/ />
</ns0:c>
</xsl:template>
</xsl:stylesheet>
This will get your whole body...
Your root node should belong to some namesapce...i.e. getServerTimestampResponse .
Thanks,
Vijaya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijaya,
Your code works fine but I need only the value.
It shlould be like this..
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:MATMAS05 xmlns:ns0="http://wipro.com/SFDCScenario/Queries">
<ns0:IDOC>
<ns0:EDI_DC40>
<ns0:MANDT>2008-06-19T14:58:48.600Z </ns0:MANDT>
</ns0:EDI_DC40>
</ns0:IDOC>
</ns0:MATMAS05>
Instead I'm getting the output like this:
<?xml version="1.0" encoding="UTF-8" ?>
<ns0:MATMAS05 xmlns:ns0="http://wipro.com/SFDCScenario/Queries">
<ns0:IDOC>
<ns0:EDI_DC40>
<ns0:MANDT>
<soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<getServerTimestampResponse xmlns="urn:enterprise.soap.sforce.com">
<result>
<timestamp>2008-06-19T14:58:48.600Z</timestamp>
</result>
</getServerTimestampResponse>
</soapenv:Body>
</ns0:MANDT>
</ns0:EDI_DC40>
</ns0:IDOC>
</ns0:MATMAS05>
Hi,
I am not sure what is your exact question. It is doable.
Just map the Filed you want to poulate and don't map any other field. You won't get the SOAP Envelope. Can you please explain me your full scenario?
Thanks
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why do you want to remove it in mapping?
I think there is an option to remove the SOAP Envelope in the SOAP Adapter.
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.