cancel
Showing results for 
Search instead for 
Did you mean: 

RFC -> PI -> SOAP - escape characters

Former Member
0 Kudos

I'm trying to send following payload in an RFC to PI and then onword to SOAP (sharepoint webservice)

<Method ID="1" Cmd="New"><Field Name="Title">Added item</Field>

However PI replaces "<" into "& # 60 ;" and ">" into "& # 62 ;" (placed spaces in the characters else they are repalced)

how can i avoid the charaters "<" & ">" from being replaced

and post a well fromed xml to Microsoft sharepoint.

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Try with one XSL mapping,

<xsl:output method="text"/>
 <xsl:template match="/">
 </xsl:template>

The output="text" prevents XML escaping

Regards.

Former Member
0 Kudos

Mentioning output as text didn't work,

however i changed the scenario and instead of sending the complete foramtted xml as paylod, i'm now sending individual elements value and then formulating the target xml through XSLT,

SOURCE schema

<?xml version="1.0" encoding="UTF-8"?>
<ns0:ZBK_CALL_SHAREPOINT xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
   <ID>123</ID>
   <METHOD>1</METHOD>
</ns0:ZBK_CALL_SHAREPOINT>

and this is the transformation used.

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />
<xsl:template match ="*">
<ns1:UpdateListItems xmlns:ns1="http://schemas.microsoft.com/sharepoint/soap/">
<ns1:listName>test</ns1:listName>
<ns1:updates>
<Batch>
<Method ID="1" Cmd="New">
<Field Name="Title">
<xsl:value-of select="string(ID)"/>
</Field>
</Method>
</Batch>
</ns1:updates>
</ns1:UpdateListItems>
</xsl:template>
</xsl:stylesheet>

When i test it in operation mapping i get the value of ID in Field Element, but this deos not happen in the actual run, in XMB_MONI this field is empty,

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

When i test it in operation mapping i get the value of ID in Field Element, but this deos not happen in the actual run, in XMB_MONI this field is empty,

It is probable that your input payload is not being sent at runtime. What you can do is:

1.) To refresh the rfc metadata by starting/stopping the RFC Sender CC

2.) To check the unicode settings of your RFC Sender CC (should be on)

3.) To check if your changes activated successfully (esr -> environment -> cache status overview)

Hope this helps,

Mark

Former Member
0 Kudos
To check the unicode settings of your RFC Sender CC (should be on

This resolved the problem of runtime.

Thanks alot.

Bilal

Answers (1)

Answers (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Another possible way is using java mapping or UDF.

You can use String class replace method to achieve this.

Example

String str

str.replace('<' , ");