cancel
Showing results for 
Search instead for 
Did you mean: 

Remove XML tags - Post XML HTTP adapter

Former Member
0 Kudos

Hello friends

I need to remove the XML tags that the PI puts the message to perform an http post to a particular URL.

How do I edit the XML tags added by PI?

Thanks friends.

Accepted Solutions (1)

Accepted Solutions (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

There is two ways to resolve your issue

1) Write simple Java map to remove name space.

2)Instead of creating Data type ,create as External Definition for receiver .

Regards,

Raj

Former Member
0 Kudos

Hi Raj

Could provide more details?

Thank you

rajasekhar_reddy14
Active Contributor
0 Kudos

Here is one example how to remove name space

My incoming message structure like this

InputStructure:

<?xml version="1.0" encoding="utf-8" ?>

<ns:MT_RQRajFile_out xmlns:ns="urn:SCP:O01:NRQ:EnterpriseNetReq">

<Records>

<Record>

<Field>RAJASEKHAR123456</Field>

</Record>

</Records>

</ns:MT_RAJFile_out>

I want out put as

RAJASEKHAR123456

WITHOUT NAME SPACE, for this i have written simple XSLT code to remove name space

XSLT Code:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="text"/>

<xsl:template match="/*">

<xsl:value-of select="Filed"/>

</xsl:template>

</xsl:stylesheet>

Regards,

Raj

Raj

Former Member
0 Kudos

My message is this: <Itau_Req_PgtoForn> H4sIAAAAAAAAAH1SXWvCMBT9K9J3m7QojBIjnXQfsO1BO99jGjXQ5HZJqv78XWc7tIghkOTcc +85

B8LmJ1OPDsp5DXYWJTGNRspKqLTdzaLv8mX8FM0502GXGWW92CmzqLWyQY2w0foMK7NoH0LjM0KO

x + kk1kG0sQQTbxwZ9EScSbFRUtR7wKEVYnqrpajAdQye9IuRu3VWiSDewIml + mm1xyLwlNLJmE7H

aVImaUYpbkbu8G4VP2 +9 cYprqDrksKAbWEGtJaY8jzx3DDFGrkJKcA0ewQnrjfZeQO7Q0AGufQmz

ucwvi1VZMPL/Zo2Dqg2okzLS35m4TOBsC84IRBZf + XM6wdA98OezE + LL4nWdL9/zdfFxMdsX0ByK

tBWU6oRNnfgtiGZ6NnkcgnRRyZ3Pwn8BXE1wMGgCAAA = </ Itau_Req_PgtoForn>

I need to delete the "<Itau_Req_PgtoForn>" and "</ Itau_Req_PgtoForn>" and keep only "H4sIAAAAAAAAAH1SXWvCMBT9K9J3m7QojBIjnXQfsO1BO99jGjXQ5HZJqv78XWc7tIghkOTcc +85

B8LmJ1OPDsp5DXYWJTGNRspKqLTdzaLv8mX8FM0502GXGWW92CmzqLWyQY2w0foMK7NoH0LjM0KO

x + kk1kG0sQQTbxwZ9EScSbFRUtR7wKEVYnqrpajAdQye9IuRu3VWiSDewIml + mm1xyLwlNLJmE7H

aVImaUYpbkbu8G4VP2 +9 cYprqDrksKAbWEGtJaY8jzx3DDFGrkJKcA0ewQnrjfZeQO7Q0AGufQmz

ucwvi1VZMPL/Zo2Dqg2okzLS35m4TOBsC84IRBZf + XM6wdA98OezE + LL4nWdL9/zdfFxMdsX0ByK

tBWU6oRNnfgtiGZ6NnkcgnRRyZ3Pwn8BXE1wMGgCAAA = "

Is it possible?

When I run the above XSLT, I do not return any results. = /

Thank you.

Former Member
0 Kudos

Hi,

Try with this:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="text"/>

<xsl:template match="/*">

<xsl:value-of select="Itau_Req_PgtoForn"/>

</xsl:template>

</xsl:stylesheet>

Regards

Ivan

Former Member
0 Kudos

Hi Ivan,

I need to do anything else besides adding the XSLT to Operation Mapping?

Thank you.

Former Member
0 Kudos

HI basoprani ,

You do not need anything else, but I supposed that XSLT mapping is the only mapping program you are using. Pls, let me know If you have any issue.

Regards

Ivan

Former Member
0 Kudos

Hi Ivan,

When I test the XSLT mapping that you passed in the OM, he did not return any result, it is empty.

You know what might be happening?

Regards,

Bruno

Former Member
0 Kudos

HI,

That occurs because of the result is not a valid xml. In runtime it must work fine. However you can see the result clicking in "Source text view" button It is a content view.

Regards

Ivan

Former Member
0 Kudos

Unfortunately when I go into "Source text view" to display also appears blank.

I do not know what may be happening.

Got any ideas?

Former Member
0 Kudos

Hi,

Sorry It was my fault

Try with this:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="text"/>

<xsl:template match="/">

<xsl:value-of select="Itau_Req_PgtoForn"/>

</xsl:template>

</xsl:stylesheet>

If you see, you should use "<xsl:template match="/">" instead of "<xsl:template match="/*">".

Regards

Ivan

Former Member
0 Kudos

Ivan

you saved my life. hahaha ..

Thank you for your help, worked perfectly.

Regards.

Bruno Atilio Soprani

Former Member
0 Kudos

Hi Raj,

I tried as u mentioned exactly. But still get the empty output. Any other changes i have to do

-Keerthi

Former Member
0 Kudos

Hi Rajasekhar,

The current scenario needs the same requirement.

I've made the XSLT and how will be the target structure looks like for capturing the outcoming text?

Regards,

Raghu.

Answers (0)