on 10-09-2012 12:51 PM
Hi,
We had java mapping for an interface(BPM) on the server. Which will always create tags of multimapping like <Message> etc
Now we are replacing the BPM and making it plain xml-idoc scenario. But such multimapping output tags are not supported for idoc adapter.
We dont want to change the existing Java mapping as it contains complex logic.
Can any one help wit some idea to remove the multimapping tags coming up from the Java mapping output..
Some xsl code may be?
TIA
Hi Kiran,
Try this XSL:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="message|message/*">
<xsl:apply-templates select="node()"/>
</xsl:template>
</xsl:stylesheet>
With this source XML:
<?xml version="1.0" encoding="UTF-8"?>
<message>
<message1>
<tag1>e</tag1>
</message1>
<message2>
<tag2>sss</tag2>
</message2>
</message>
You could obtain this output:
<?xml version="1.0" encoding="UTF-8"?>
<tag1>e</tag1>
<tag2>sss</tag2>
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Tried it but no change.
I modified it a bit though
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="sxi:Messages|sxi:Message1/*">
<xsl:apply-templates select="node()"/>
</xsl:template>
</xsl:stylesheet>
For information
Input will be like
<?xml version="1.0" encoding="UTF-8"?>
<sxi:Messages xmlns:sxi="http://sap.com/xi/XI/SplitAndMerge">
<sxi:Message1>
<ZDetails>
.
..
.
.
</ZDetails>
</sxi:Message1>
</sxi:Messages>
I want it to be
<?xml version="1.0" encoding="UTF-8"?>
<ZDetails>
.
..
.
.
</ZDetails>
Hi Kiran,
Rather than adding a new mapping altogether, I would suggest to modify exiting java mapping. I would like to take a look in the present java mapping code to check if that can be modified. If you want to give it a try, I need the present java mapping code and an input xml for testing the results. Check if this works. In case it does notwork you always have xslt code written here to be used after java mapping. Please also mention the version of PI you atre working in as this affects the java mapping code.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
These tags are removed at runtime. The tags are only there during design time.
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
Nope. Actually the problem i am facing now is. Java mapping produces a message with output
<Message>
<Message1>
<Z********>
etc
But at call adapter i am getting an error. Tag Message1 found instead of IDoc Begin.
So i want to remove those tags.. And want my payload to start from
<Z*********>
<Idoc>
<begin>
etc
Hi,
the removal is done by Java adapters during runtime, not by ABAP adapter like idoc. Therefore the error.
Add an addtional mapping program to to operation mapping, so you avoid changing the java code. For example a xsl using expressions like <xsl:copy-of select="//IDOC"> (pseudo code)
Regards,
Udo
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.