Skip to Content
0
Former Member
Jun 10, 2008 at 11:48 AM

XSLT problem

78 Views

Hi all,

I want to copy the field content using the value-of statement and changing the namespace, the schema location. I donu2019t know how to do it, I googled and I tried some ideas but w/o success.

Input XML

<?xml version="1.0" encoding="UTF-8"?>
<ns1:MT_RFCbusquedaDun xmlns:ns1="http://xxxx.com/fscm/ea">
<Agencia>DNB</Agencia>
<requestType>
  <NombreEmpresa>Ricardo</NombreEmpresa>
  u2026 

Here is the xsl I am working on:

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
  <xsl:strip-space elements="*"/>
  <xsl:template match="/">
    <ns1:Z_FSCM_BUSQUEDA_DUN xmlns:ns1="http://cepsa.com/fscm/ea">
      <E_XML>
        <xsl:value-of select="ns1:BusquedaIdProductosResponse"/>
      </E_XML>
    </ns1:Z_FSCM_BUSQUEDA_DUN>
  </xsl:template>
</xsl:transform>

Output XML

<?xml version="1.0" encoding="utf-8" ?> 
<ns1:Z_FSCM_BUSQUEDA_DUN xmlns:ns1="http://cepsa.com/fscm/ea">
  <E_XML>text </E_XML>

If you see the mapping is retrieving the source namespace and the objective is to create a new one.

Guys, the idea behind this is to put working a sync interface SOAP -> RFC with an XSL mapping and to call properly this RFC I believe that this namespace should be replaced by urn:sap-com:document:sap:rfc:functions. With the above namespace I can do the mapping of course and at sxi_monitor everything looks fine, but at AE Iu2019m getting the following error: Error in processing caused by: com.sap.aii.af.rfc.core.server.RfcServerException: got unexpected document type:DOC_TYPE_UNKNOWN, and I believe that is due to wrong namespace.

Anyone knows how to change the namespace in a XSL mapping or any other idea to fix this problem with RFC call.

Thanks in advance,

Ricardo.