on 2012 Feb 17 11:36 AM
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.
Try with one XSL mapping,
<xsl:output method="text"/>
<xsl:template match="/">
</xsl:template>
The output="text" prevents XML escaping
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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,
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
Another possible way is using java mapping or UDF.
You can use String class replace method to achieve this.
Example
String str
str.replace('<' , ");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
57 | |
10 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.