JBoss ESB 4.11
Hello!
I work with the JBoss ESB 4.11, we are create webservice proxy and we need transform the payload message with xslt transformation. But I can find any functional example to use.
This is a example of the original message
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cim:ESRGERAL xmlns:cim="http://iec.ch/TC57/2007/profile#">
<cim:Terminal>
<cim:mRID>_012345_term</cim:mRID>
<cim:aliasName>term01</cim:aliasName>
<cim:name>term01</cim:name>
and this is the xslt file
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="xml" encoding="utf-8" indent="yes"/>
<xsl:template match="*">
<ESRGERAL xmlns:cim="http://iec.ch/TC57/2007/profile#">
<xsl:for-each select="//cim:Terminal">
<Terminal>
<mRID>
<xsl:value-of select="cim:mRID"/>
</mRID>
<name>
<xsl:value-of select="cim:aliasName"/>
</name>
</Terminal>
</xsl:for-each>
</cim:ESRGERAL>
</xsl:template>
</xsl:stylesheet>
I need to help to create the correct configuration in jboss-esb.xml, this two files work fine when I use a java implementation, but I can make the same in jboss esb.
If you want to use XSLT for transforming XML-payloads then I believe the XsltAction is what you are looking for:
Not sure that this fully answers your question but in any case, your use case seems very straight forward so I believe JBoss ESB will support it right out of the box without the need for custom code.
One caveat is if you really need to use XSLT 2.0 and not XSLT 1.0 (like in your example), then you will need to do something to make it load your 2.0 XSLT library instead of the standard.