Hi Asanka,
Sorry for the delay in responding.
I think you have done a small mistake in the XSLT where you have used an
closing tag for the stylesheet declaration which is wrong.
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
xmlns:m0="http://services.samples/xsd"*/>*
Correct the above element as follows
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fn="http://www.w3.org/2005/02/xpath-functions"
xmlns:m0="http://services.samples/xsd">
Thanks,
Ruwan
Asanka Abeysinghe wrote:
Hi,
My requirement is to transform a SOAP message that stores FIX
information in the payload to another structure using a XSLT
mediator. Original message structure looks like following, which
contains repeating groups, CDATA and it got siblings for the first
child element after the SOAP body.
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<message inSession="FIX.4.0:SYNAPSE->EXEC" counter="2">
<header>
<field id="8"><![CDATA[FIX.4.0]]></field>
<field id="9"><![CDATA[136]]></field>
<field id="34"><![CDATA[3]]></field>
<field id="35"><![CDATA[8]]></field>
<field id="49"><![CDATA[EXEC]]></field>
<field id="52"><![CDATA[20080618-08:41:56]]></field>
<field id="56"><![CDATA[SYNAPSE]]></field>
</header>
<body>
<field id="6"><![CDATA[12.3]]></field>
<field id="20"><![CDATA[0]]></field>
<field id="31"><![CDATA[12.3]]></field>
<field id="32"><![CDATA[100]]></field>
<field id="37"><![CDATA[2]]></field>
<field id="38"><![CDATA[100]]></field>
<field id="55"><![CDATA[GOOG]]></field>
</body>
<trailer>
<field id="10"><![CDATA[041]]></field>
</trailer>
</message>
</soapenv:Body>
</soapenv:Envelope>
Configuration file and the xslt file used is attached. When the input
message comes, application throws the following exception before doing
any transformation.
2008-06-19 23:20:44,105 [127.0.1.1-asankaa-laptop] [fix-Worker-1]
DEBUG XSLTMediator Using byte array serialization for transformation
2008-06-19 23:20:44,449 [127.0.1.1-asankaa-laptop] [fix-Worker-1]
ERROR XSLTMediator Unable to perform XSLT transformation using :
xslt-key-req against source XPath : s11:Body/child::*[position()=1] |
s12:Body/child::*[position()=1]
java.lang.NullPointerException
at java.lang.System.arraycopy(Native Method)
at
org.apache.xml.utils.FastStringBuffer.append(FastStringBuffer.java:663)
at
org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.characters(SAX2DTM.java:2082)
at
org.springframework.xml.stream.StaxStreamXmlReader.handleCharacters(StaxStreamXmlReader.java:121)
at
org.springframework.xml.stream.StaxStreamXmlReader.parseInternal(StaxStreamXmlReader.java:89)
at
org.springframework.xml.stream.AbstractStaxXmlReader.parse(AbstractStaxXmlReader.java:68)
Appreciate your comments to solve this problem.
Asanka A .
------------------------------------------------------------------------
_______________________________________________
Esb-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
_______________________________________________
Esb-java-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev