cancel
Showing results for 
Search instead for 
Did you mean: 

Send xml document through PI

Former Member
0 Kudos

Hi,

we have an xml document in ERP which we want to send to an external provider using the Plain HTTP Adapter.

We are using a proxy to send this xml document in a String field to the integration server.

Then the integration server is to take this String a resend it as is to the external provider using the plain http adapter.

This however doesn't work because the message sent to the external provider is already an xml document.. so the message sent to the provider looks like this

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

<ns0:request_DT xmlns:ns0="um:ournamespace">

<data>

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

the xml document data

</data>

</ns0:request_DT>

Is there a way to just take the String that is send to the integration server and use it as is as the payload for the message sent to the provider.

Any ideas ?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos

Check the use of replace function in your XSLT to remove the xml tag....i tried replying to a similar question in this thread...check if the response helps you too:

Regards,

Abhishek.

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

You have to remove the XML header and additional tags with Java mapping or XSLT.

With Java mapping you have to de-escape the < and >, as the ABAP proxy change this to & notation.

Former Member
0 Kudos

Hi Stephen,

I've got this simple XSLT transform from a blog which almost does the whole job....

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

<xsl:template match="ns0:myDT">

<xsl:value-of select="commandData" disable-output-escaping="yes" />

</xsl:template>

</xsl:stylesheet>

The problem however is that the commandData element contains

<?xml version="1.0" encoding="UTF-8" ?> so after the mapping , I have that string 2 times since PI also adds it during the mapping.

Is there a way to remove the one of them in the xsl ???

Might be simple for you... ?

Thank you.