Skip to Content
0
Former Member
Nov 12, 2008 at 04:42 AM

Request XML data using XSL from XI to RFC is not sent

59 Views

I have an issue with sending an XML payload from XI to a RFC program module(Z_PI_XML_INTERNAL_END_POINT)

(A) It can be sent successfully within a <![CDATA[ ... ]]> section to RFC like

=========================================

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

http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="no" standalone="no" indent="yes" />

<xsl:template match="/">

<ns1:Z_PI_XML_INTERNAL_END_POINT xmlns:ns1="urn:sap-com:document:sap:rfc:functions">

<XMLDATA_IN>

*<![CDATA[*

*<xsl:copy-of select="." />*

*]]>*

</XMLDATA_IN>

</ns1:Z_PI_XML_INTERNAL_END_POINT>

</xsl:template>

</xsl:stylesheet>

From SXMB_MONI the XML REQUEST Message looks like:

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

<ns1:Z_PI_XML_INTERNAL_END_POINT xmlns:ns1="urn:sap-com:document:sap:rfc:functions">

<XMLDATA_IN><xsl:copy-of select="*"/></XMLDATA_IN>

</ns1:Z_PI_XML_INTERNAL_END_POINT>

*and, I GET A SUCCESSFUL RESPONSE MESSAGE LIKE*

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

linde.com:xi:A_B2B_SP:xCBLIDOC">

<xmldata><xsl:copy-of select="*"/></xmldata>

</ns1:mt_PunchOut_string>

=====================================================================

*(B) BUT if the XSL is written as:*

===================================================================

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

http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="no" standalone="no" indent="yes" />

<xsl:template match="/">

<ns1:Z_PI_XML_INTERNAL_END_POINT xmlns:ns1="urn:sap-com:document:sap:rfc:functions">

<XMLDATA_IN>

*<xsl:copy-of select="." />*

</XMLDATA_IN>

</ns1:Z_PI_XML_INTERNAL_END_POINT>

</xsl:template>

</xsl:stylesheet>

===========================================================

*SXMB_MONI shows the XML REQUEST Message like:*

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

<ns1:Z_PI_XML_INTERNAL_END_POINT xmlns:ns1="urn:sap-com:document:sap:rfc:functions">

<XMLDATA_IN>

<cXML timestamp="2008-11-12T04:30:54.6150000" payloadID="2008-11-12T04:30:54.6150000Order-abccomau">

<Header>

<From>

<Credential domain="DUNS">

<Identity>750204999</Identity>

</Credential>

</Header>

<Message>

</Message>

</cXML>

*and, I GET A FAILURE RESPONSE MESSAGE LIKE*

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

<!-- Inbound Message -->

http://sap.com/xi/XI/Message/30" xmlns:SOAP=" http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">

<SAP:Category>XIAdapterFramework</SAP:Category>

<SAP:Code area="MESSAGE">GENERAL</SAP:Code>

<SAP:P1 />

<SAP:P2 />

<SAP:P3 />

<SAP:P4 />

<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$Exception: (130) JCO_ERROR_XML_PARSER: Expecting a tag to begin with '<' instead of '7', in "<Identity>750204999<"</SAP:AdditionalText>

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack />

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

Questions

a. Why is the RFC unable to read it.

b. Is the XSL coding right with RFC. Otherwise what is the correct XSL to display the XML payload

Any suggestions is greattly appreciated. Thanks in advance

David