on 06-10-2008 12:48 PM
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.
Hi all,
I fixed the problem like this, more or less like you said Emiliano.
1 step) soap request --> XSL --> RFC
2 step) a new data Type (a mirror of my RFC, but with the same soap response namespace) --> Graph.Mapping --> RFC
At the end of graphical mapping I get the right namespace to call an RFC in the backend system. It's working guys
Thank you all for your great ideas.
Regards,
Ricardo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Uups
I made a mistake on the above XSL transformation.
Try this:
IMPUT:
Chorry, Raú
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hellou there!!
Try with this one:
Regards, Raú
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
have you tried to do a double mapping?
I mean the first mapping with xslt, then the result of XSLT, to another new graphical mapping.
The interfaces involved are:
1 step) soap request --> XSL --> soap request
2 step) soap request --> Graph.Mapping --> RFC parameters.
In the second step the XML that will call the RFC, will have automatically the exact namespace "urn:sap-com:document:sap:rfc:functions" .
Regards
Emiliano
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Emiliano,
Thanks for the tip, but I tried this beforehand; this is a sync call and I think it is not possible to do what you said, just have a look:
1 step) soap request --> XSL --> soap request
2 step) soap request --> Graph.Mapping --> RFC parameters.
..as this is a sync call, the same structure(RFC) that is used to call the web service should be the same at time that receives the response, like this:
1 step) RFC --> XSL --> soap request
2 step) soap request --> Graph.Mapping --> RFC parameters
and it doesn't work with this approach!
@Kumar - the same apply for your great tip, the change must be done at sender RFC adapter and with XMLAnonymizerBean Iu2019m not able to change only the namespace at response as I wish. With this I change the request and response and I donu2019t want to change the namespace at request because it fails at web service call.
Any ideas?
Thanks,
Ricardo
Edited by: Ricardo Quintino on Jun 10, 2008 3:44 PM
hi,
For changing the namespace you have to simply add one module in your communication channel
that is XMLAnonymizerBean
you can refer below for help:
/people/stefan.grube/blog/2007/02/02/remove-namespace-prefix-or-change-xml-encoding-with-the-xmlanonymizerbean
http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm
hope it helps.
reward point 4 useful ans.
regards,
ujjwal kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.