cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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"?>

<xsl:stylesheet xmlns:xsl="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" ?>

<ns1:mt_PunchOut_string xmlns:ns1="urn: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"?>

<xsl:stylesheet xmlns:xsl="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 -->

<SAP:Error xmlns:SAP="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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi David,

Please check your input XML message format to make sure it's valid. From what you posted it looks like the <From> node is missing the closing </From> tag. Two other closing tags are missing from your example </XMLDATA_IN> </ns1:Z_PI_XML_INTERNAL_END_POINT>, but I assume those are there given the XSL you posted.

Thanks,

-Russ

Former Member
0 Kudos

Russ, my apologies, your assertion is correct. I did a bad job trying to 'cut and paste' the request message and changing the identities (for privacy) but failed miserably. Your discovery is very helpful. Thanks

Here is the REQUEST (for B) but with adulteration to the identities.

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

SXMB_MONI shows the XML REQUEST Message like:

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

<XMLDATA_IN>

<cXML timestamp="2008-11-12T15:44:32.6520000" payloadID="2008-11-12T15:44:32.6520000PunchOutOrderabcomau">

<Header>

<From>

<Credential domain="DUNS">

<Identity>750204999</Identity>

</Credential>

</From>

<To>

<Credential domain="DUNS">

<Identity>751110999</Identity>

</Credential>

<Correspondent>

<Contact addressID="ANY">

<Name xml:lang="en">Test</Name>

</Contact>

<Extrinsic name="OCI">ANY</Extrinsic>

</Correspondent>

</To>

<Sender>

<Credential domain="DUNS">

<Identity>750204999</Identity>

</Credential>

<UserAgent>Supplier ABC</UserAgent>

</Sender>

</Header>

<Message>

<PunchOutOrderMessage>

<BuyerCookie>1234567890</BuyerCookie>

<PunchOutOrderMessageHeader operationAllowed="create">

<Total>

<Money currency="AUD">2,090.26</Money>

</Total>

</PunchOutOrderMessageHeader>

<ItemIn quantity="1">

<ItemID>

<SupplierPartID>453833ABC</SupplierPartID>

</ItemID>

<ItemDetail>

<UnitPrice>

<Money currency="AUD">2090.26</Money>

</UnitPrice>

<Description xml:lang="en">HELMET LIFT FRONT C/W FILTER SHADE 11</Description>

<UnitOfMeasure>EA</UnitOfMeasure>

<Classification domain="ISOABC">07-05-05</Classification>

<ManufacturerPartID />

<ManufacturerName xml:lang="en">ABC</ManufacturerName>

<LeadTime />

</ItemDetail>

</ItemIn>

</PunchOutOrderMessage>

</Message>

</cXML>

</XMLDATA_IN>

</ns1:Z_PI_XML_INTERNAL_END_POINT>

Edited by: Da Lim on Nov 12, 2008 10:25 PM

Answers (1)

Answers (1)

Former Member
0 Kudos

is there an answer to the problem?

I encounter the same problem

Kfir