cancel
Showing results for 
Search instead for 
Did you mean: 

using XSL to map and recieve an error in sxmb

Former Member
0 Kudos

hello

I have XSL mapping, and I recieve this error in the sxmb. any suggestions?

error message:

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

- <!-- Call Adapter

-->

- <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 '2', in "Agent><ID>237cb1f3-1"</SAP:AdditionalText>

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack />

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

</SAP:Error>

xsl mapping:

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

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://Migdal.co.il/CRM/SAP-CRM/ProposalDeatailsService" targetNamespace="http://Migdal.co.il/CRM/SAP-CRM/ProposalDeatailsService" xmlns:a="TargetNamespace" xmlns:b="SourceNamespace">

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

<xsl:template match="/">

<a:ZRFC_IY_NTR>

<a:IV_UNDERWRITINGSTATUSENUM>

<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>

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

<xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>

<xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>

</a:IV_UNDERWRITINGSTATUSENUM>

</a:ZRFC_IY_NTR>

</xsl:template>

</xsl:stylesheet>

Accepted Solutions (0)

Answers (9)

Answers (9)

Former Member
0 Kudos

still has a problem that couldnt find the problem.

Former Member
0 Kudos

Nicolas

what do you mean the construction of the CDATA?

I will explain again the scenario. it is WS 2 RFC, and I am trying to insert the all XML to a specific element in the RFC. I rap it with CDATA in order to have the string in it. the thing is that I recieve the error that I wrote before, and the SAP does not get it.

according to what you suggested, it doesnt return anything (return empty), while the way that I sent it I get the full xml as a string rapped with CDATA.

any suggestions?

is there a way to return the full string with out the CDATA?

Kfir

Former Member
0 Kudos

Why don't you just do:

...
<IV_UNDERWRITINGSTATUSENUM>
<xsl:text disable-output-escaping="yes"><xsl:copy-of select="."/></xsl:text>
</IV_UNDERWRITINGSTATUSENUM>
...

The construction of your CDATA fields is incorrect. What are they used for?

Former Member
0 Kudos

Patreek

can you be more specified - how exactly should I write it in order to fix it?

Tjanks

Kfir

Former Member
0 Kudos

Prateek

I am not familiar with what you wrote.

I miss copy the corect XSL. the one that I am using is:

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

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://Migdal.co.il/CRM/SAP-CRM/ProposalDeatailsService">

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

<xsl:template match="/">

<ZRFC_IY_NTR>

<IV_UNDERWRITINGSTATUSENUM>

<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>

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

<xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>

<xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>

</IV_UNDERWRITINGSTATUSENUM>

</ZRFC_IY_NTR>

</xsl:template>

</xsl:stylesheet>

which has xmIns.

I am not familiar with what you added. where do I add it, and how exactly I should write it?

Kfir

Former Member
0 Kudos

I tried a few things, and now my code look like this

<?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" version="1.0" encoding="UTF-8" indent="no"/>

<xsl:template match="/">

<ZRFC_IY_NTR>

<IV_UNDERWRITINGSTATUSENUM>

<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>

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

<xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>

<xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>

</IV_UNDERWRITINGSTATUSENUM>

</ZRFC_IY_NTR>

</xsl:template>

</xsl:stylesheet>

and the error is:

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

- <!-- Call Adapter

-->

- <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: functiontemplate from repository was <null></SAP:AdditionalText>

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack />

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

</SAP:Error>

I looked at the SDN and didnt see any thing. does any one know how to fix this?

Thanks

Kfir

prateek
Active Contributor
0 Kudos

You have not specifoed the value of "xmlns" in the header. As your receiver is RFC, the namespace should be urn:sap-com:document:sap:rfc:functions.

Regards,

Prateek

Former Member
0 Kudos

Ibraim

the code example that you gave, is not valid xsl file.

0 Kudos

Hi,

You are right, I forgot to put code markup. Try it again with this please:


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://Migdal.co.il/CRM/SAP-CRM/ProposalDeatailsService" 
targetNamespace="http://Migdal.co.il/CRM/SAP-CRM/ProposalDeatailsService" xmlns:a="TargetNamespace" xmlns:b="SourceNamespace">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
<xsl:template match="/">
<a:ZRFC_IY_NTR>
<a:IV_UNDERWRITINGSTATUSENUM>
<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[

]]
>




]]>

Former Member
0 Kudos

what do you mean?

my source is an XML file and the target is RFC element.

I would like to insert the all xml file as a string to the RFC element

Kfir

former_member187563
Contributor
0 Kudos

hi,

Since this is an JCO Exception..this is an internal exception and you can restart the server since all the services might not be running fine.

For assistance in your scenario you can refer to :

regards,

ujjwal kumar

0 Kudos

Try this:

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

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://Migdal.co.il/CRM/SAP-CRM/ProposalDeatailsService"

targetNamespace="http://Migdal.co.il/CRM/SAP-CRM/ProposalDeatailsService" xmlns:a="TargetNamespace" xmlns:b="SourceNamespace">

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

<xsl:template match="/">

<a:ZRFC_IY_NTR>

<a:IV_UNDERWRITINGSTATUSENUM>

<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>

<xsl:copy-of select="b:/"/>

<xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>

<xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>

</a:IV_UNDERWRITINGSTATUSENUM>

</a:ZRFC_IY_NTR>

</xsl:template>

</xsl:stylesheet>

0 Kudos

Hi Kfir,

CDATA sections in your XSL look strange. What is your source and target XMLs?

Ibrahim