Skip to Content
0
Dec 17, 2012 at 02:02 PM

XML to String Java Mapping

530 Views

Hi Guys, I'm working on an RFC to SOAP scenario in PI 7.1 and I want to transform an input XML to a output string.

I want to use Java Mapping, but could not find any code.

The source XML and target String are:

INPUT XML:

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

<ns0:ZDM_RFC_REPLICA_CONVENIOS_PI xmlns:ns0="urn:sap-com:document:sap:rfc:functions">

<I_CONVENIO>

<CANAL_ID/>

<CANAL_CODIGO/>

<CANAL_SISTEMA/>

<ORIGEN_PETICION/>

</I_CONVENIO>

</ns0:ZDM_RFC_REPLICA_CONVENIOS_PI>

OUTPUT String:

<CABECERA><CANAL_ID></CANAL_ID><CANAL_CODIGO></CANAL_CODIGO><CANAL_SISTEMA></CANAL_SISTEMA><ORIGEN_PETICION></ORIGEN_PETICION></CABECERA>

Regards!