on 07-08-2020 1:27 PM
Hi,
I tried solution provided by sriprasadshivaramabhat posted in https://answers.sap.com/questions/13088128/soap-response-not-returning-key-field-sent.html
I put this in content modifier after message mapping -
<ReturnInfoSet> ${in.body} <EmpId>${property.EmpId}</EmpId> </ReturnInfoSet>
But the issue is after message mapping, below output is coming -
<?xml version="1.0" encoding="UTF-8"?><ReturnInfo><Status>01</Status></ReturnInfo>
And If I restructure data using content modifier ,output is as below -
<ReturnInfoSet>
<?xml version="1.0" encoding="UTF-8"?><ReturnInfo><Status>01</Status></ReturnInfo>
<EmpId>123</EmpId>
</ReturnInfoSet>
But I expect output as -
<ReturnInfoSet>
<ReturnInfo>
<Status>01</Status>
<EmpId>123</EmpId>
</ReturnInfo>
</ReturnInfoSet>
How to achieve this output. where EmpId (The property which I set) is under ReturnInfo.
Thanks.
Hello Vijay,
You need to create message mapping to convert from the structure you have received to the one you are looking for.
Regards,
Sriprasad Shivaram Bat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
But the issue is after message mapping, below output is coming -
<?xml version="1.0" encoding="UTF-8"?><ReturnInfo><Status>01</Status></ReturnInfo>
and If use content modifer ,it adds root element ReturnInfoSet,but <?xml version="1.0" encoding="UTF-8"?> remains in message in between.. How to remove this to use property in content modifier.
<ReturnInfoSet>
<?xml version="1.0" encoding="UTF-8"?><ReturnInfo><Status>01</Status></ReturnInfo>
<EmpId>123</EmpId>
</ReturnInfoSet>
Regards
Hello Vijay,
Use this XSLT to remove extra XML declaration.
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="yes" />
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.