on 06-08-2012 7:16 AM
Hi
I got this strange problem in a file to file scenario.
A customer is sending an xmlfile. I need to do content based routing on this payload in receiver determination. I have NO mapping required.
I have two target systems.
Here comes the issue:
the file the customer is sending has the xmltag <?xml-stylesheet...> on the second line of each single xml file. This causes the content based routing (using XPATH) to error (naturally).
My initial thought is to remove the second line of each single payload in the adapter via a module. Is that possible and how?
See the xml her:
really appreciate any help
Cheers
Hi Booby,
You could use an XSL-mapping for this purpose:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>
Sorry, i didn't read that you dont want a map, if you dont find the adapter solution you can use this map
I've seen this option in the module adapter, but i dont test it:
Regards
Message was edited by: Iñaki Vila
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You are right, sorry.
If you root element is AKNOWLEDGEMENT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<xsl:copy-of select="AKNOWLEDGEMENT"/>
</xsl:template>
</xsl:stylesheet>
This time i've tried the option
Regards.
Hi,
Java mapping is also an option ..but code suggested above will also work.
http://scn.sap.com/thread/3184205
Thanks
Amit Srivastava
Hi, I think it my be a bit risky to remove the second line all the time. What if the XML file comes all together in a single line or something like that?
Why don't you just create a very simple XSLT mapping to do this?
Thanks,
Pablo
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.