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.


   
       
           
               FIX.4.0
               136
               3
               8
               EXEC
               20080618-08:41:56
               SYNAPSE
           
           
               12.3
               0
               12.3
               100
               2
               100                         GOOG
           
           
               041
           
       
   


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 .




_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
<!--
	~  Licensed to the Apache Software Foundation (ASF) under one
	~  or more contributor license agreements.  See the NOTICE file
	~  distributed with this work for additional information
	~  regarding copyright ownership.  The ASF licenses this file
	~  to you under the Apache License, Version 2.0 (the
	~  "License"); you may not use this file except in compliance
	~  with the License.  You may obtain a copy of the License at
	~
	~   http://www.apache.org/licenses/LICENSE-2.0
	~
	~  Unless required by applicable law or agreed to in writing,
	~  software distributed under the License is distributed on an
	~   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
	~  KIND, either express or implied.  See the License for the
	~  specific language governing permissions and limitations
	~  under the License.
-->

<!-- FIX -> SOAP conversion using XSLT mediator  -->

<definitions xmlns="http://ws.apache.org/ns/synapse";>
	<localEntry key="xslt-key-req"
		src="file:repository/conf/sample/resources/transform/fixtransform.xslt" />
	<proxy name="FIXProxy" transports="fix">
		<target>
			<endpoint>
				<address
					uri="http://localhost:9000/soap/SimpleStockQuoteService"; />
			</endpoint>
			<inSequence>
				<log level="full" />
				<xslt key="xslt-key-req" />
				<log level="full" />
			</inSequence>
			<outSequence>
				<log level="full" />
				<send />
			</outSequence>
		</target>

		<parameter name="transport.fix.AcceptorConfigURL">
			file:repository/conf/fix-synapse.cfg
		</parameter>
		<parameter name="transport.fix.AcceptorMessageStore">
			/home/asankaa/var/data/store
		</parameter>
		<parameter name="transport.fix.InitiatorConfigURL">
			file:repository/conf/synapse-sender.cfg
		</parameter>
		<parameter name="transport.fix.InitiatorMessageStore">
			/home/asankaa/var/data/store
		</parameter>
	</proxy>

</definitions>

Attachment: fixtransform.xslt
Description: XML document

Reply via email to