Skip to Content
0

How To remove tag in HCI

Sep 22, 2017 at 11:16 AM

257

avatar image

Dear All,

i need to remove <?xmlversion="1.0" encoding="UTF-8"?> tag from my payload in HCI.

input Payload.

<?xml version="1.0" encoding="UTF-8"?>
<ns0:transfer xmlns:ns0="http://www.quantiguous.com/services">
	<ns0:version>2</ns0:version>
	<ns0:uniqueRequestNo>20170000000666777888</ns0:uniqueRequestNo>
	<ns0:appID>28283</ns0:appID>
	<ns0:customerID>28283</ns0:customerID>
	<ns0:debitAccountNo>22222</ns0:debitAccountNo>
	<ns0:beneficiary>
		<ns0:beneficiaryDetail>
			<ns0:beneficiaryName>
				<ns0:fullName>RAJNIKANTH INDIA PVT.LTD</ns0:fullName>
			</ns0:beneficiaryName>
			<ns0:beneficiaryAddress>
				<ns0:address1>ANJANEYA OPP: HIRANANDANI FOUND. SC</ns0:address1>
				<ns0:country>IN</ns0:country>
			</ns0:beneficiaryAddress>
			<ns0:beneficiaryContact>
				<ns0:mobileNo>+910000000000</ns0:mobileNo>
				<ns0:emailID>yes.singh@abc.com</ns0:emailID>
			</ns0:beneficiaryContact>
			<ns0:beneficiaryAccountNo>222222</ns0:beneficiaryAccountNo>
			<ns0:beneficiaryIFSC>HDFC0000000</ns0:beneficiaryIFSC>
			<ns0:beneficiaryMobileNo>+910000000000</ns0:beneficiaryMobileNo>
			<ns0:beneficiaryMMID>28283</ns0:beneficiaryMMID>
		</ns0:beneficiaryDetail>
	</ns0:beneficiary>
	<ns0:transferType>NEFT</ns0:transferType>
	<ns0:transferCurrencyCode>INR</ns0:transferCurrencyCode>
	<ns0:transferAmount>10000.00</ns0:transferAmount>
	<ns0:remitterToBeneficiaryInfo>00000006667778882017ASPL</ns0:remitterToBeneficiaryInfo>
</ns0:transfer>

Expected Payload.

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ns0="http://www.quantiguous.com/services">
	<soap:Header/>
	<soap:Body>
		<ns0:transfer xmlns:ns0="http://www.quantiguous.com/services">
			<ns0:version>2</ns0:version>
			<ns0:uniqueRequestNo>20170000000666777888</ns0:uniqueRequestNo>
			<ns0:appID>28283</ns0:appID>
			<ns0:customerID>28283</ns0:customerID>
			<ns0:debitAccountNo>22222</ns0:debitAccountNo>
			<ns0:beneficiary>
				<ns0:beneficiaryDetail>
					<ns0:beneficiaryName>
						<ns0:fullName>RAJNIKANTH INDIA PVT.LTD</ns0:fullName>
					</ns0:beneficiaryName>
					<ns0:beneficiaryAddress>
						<ns0:address1>ANJANEYA OPP: HIRANANDANI FOUND. SC</ns0:address1>
						<ns0:country>IN</ns0:country>
					</ns0:beneficiaryAddress>
					<ns0:beneficiaryContact>
						<ns0:mobileNo>+910000000000</ns0:mobileNo>
						<ns0:emailID>yes.singh@abc.com</ns0:emailID>
					</ns0:beneficiaryContact>
					<ns0:beneficiaryAccountNo>222222</ns0:beneficiaryAccountNo>
					<ns0:beneficiaryIFSC>HDFC0000000</ns0:beneficiaryIFSC>
					<ns0:beneficiaryMobileNo>+910000000000</ns0:beneficiaryMobileNo>
					<ns0:beneficiaryMMID>28283</ns0:beneficiaryMMID>
				</ns0:beneficiaryDetail>
			</ns0:beneficiary>
			<ns0:transferType>NEFT</ns0:transferType>
			<ns0:transferCurrencyCode>INR</ns0:transferCurrencyCode>
			<ns0:transferAmount>10000.00</ns0:transferAmount>
			<ns0:remitterToBeneficiaryInfo>00000006667778882017ASPL</ns0:remitterToBeneficiaryInfo>
		</ns0:transfer>
	</soap:Body>
</soap:Envelope>


so, to get the expected payload i've used content modifier

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:ns0="http://www.quantiguous.com/services">
   <soap:Header/>
   <soap:Body>
${in.body}
  </soap:Body>
</soap:Envelope>


 

i can see <?xml version="1.0" encoding="UTF-8"?> incoming payload and ${in.body} also taking along with that, but i don't want to pass this to target side..

please do suggest,

Thanks in Advance

Reagrds

Ramesh

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Sriprasad Shivaram Bhat
Sep 25, 2017 at 05:19 AM
1

Hello Ramesh,

You can do it by using below XSLT before adding SOAP:Envelope to your message.

<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

Share
10 |10000 characters needed characters left characters exceeded
K Ramesh Sep 25, 2017 at 06:51 AM
0

thanks a lot, it's working fine.

can you please help me out for my query which i've raised, https://answers.sap.com/questions/314810/connecting-pi-channel-from-hci-using-ssl-connectio.html

please do needful.

Share
10 |10000 characters needed characters left characters exceeded