turnrob
Oct 6th, 2009, 07:52 AM
Hello,
I am coding a POC for the Spring Integration project.
I am calling a WS with XML payload (String and Document tried) on my server which is implementing a simpleGateway
<ws:inbound-gateway id="simpleGateway"
request-channel="inputChannel"/>
Then I am trying to use the simpleRouter to route the messages into channels
<si-xml:xpath-router id="aRouter" input-channel="inputChannel" multi-channel="false">
<si-xml:xpath-expression expression="/aRequest/someVal/anotherVal"/>
</si-xml:xpath-router>
this is producing the following error :
DEBUG: org.springframework.integration.xml.router.XPathSi ngleChannelRouter - org.springframework.integration.xml.router.XPathSi ngleChannelRouter@e2b9e5 received message: [Payload=javax.xml.transform.dom.DOMSource@1386751][Headers={springintegration_id=8c6c39e8-3ff5-4759-9499-41fee0a9b67d, springintegration_timestamp=1254832382109, springintegration_replyChannel=org.springframework .integration.channel.MessageChannelTemplate$Tempor aryReplyChannel@72edc, springintegration_errorChannel=org.springframework .integration.channel.MessageChannelTemplate$Tempor aryReplyChannel@72edc}]
DEBUG: org.springframework.ws.soap.server.SoapMessageDisp atcher - Endpoint invocation resulted in exception - responding with Fault
org.springframework.integration.core.MessagingExce ption: unsupported payload type [javax.xml.transform.dom.DOMSource]
at org.springframework.integration.xml.DefaultXmlPayl oadConverter.convertToDocument(DefaultXmlPayloadCo nverter.java:66)
at org.springframework.integration.xml.DefaultXmlPayl oadConverter.convertToNode(DefaultXmlPayloadConver ter.java:73)
at org.springframework.integration.xml.router.XPathSi ngleChannelRouter.getChannelIndicatorList(XPathSin gleChannelRouter.java:81)
at org.springframework.integration.router.AbstractCha nnelNameResolvingMessageRouter.determineTargetChan nels(AbstractChannelNameResolvingMessageRouter.jav a:110)
at org.springframework.integration.router.AbstractMes sageRouter.handleMessageInternal(AbstractMessageRo uter.java:72)
at org.springframework.integration.handler.AbstractMe ssageHandler.handleMessage(AbstractMessageHandler. java:59)
at org.springframework.integration.dispatcher.Unicast ingDispatcher.doDispatch(UnicastingDispatcher.java :103)
at org.springframework.integration.dispatcher.Unicast ingDispatcher.dispatch(UnicastingDispatcher.java:9 0)
at org.springframework.integration.channel.AbstractSu bscribableChannel.doSend(AbstractSubscribableChann el.java:43)
I believe the DOMSource should be used and the getNode() method called to get the Node object. Is this a bug? or am I missing a step.
thanks
Rob
I am coding a POC for the Spring Integration project.
I am calling a WS with XML payload (String and Document tried) on my server which is implementing a simpleGateway
<ws:inbound-gateway id="simpleGateway"
request-channel="inputChannel"/>
Then I am trying to use the simpleRouter to route the messages into channels
<si-xml:xpath-router id="aRouter" input-channel="inputChannel" multi-channel="false">
<si-xml:xpath-expression expression="/aRequest/someVal/anotherVal"/>
</si-xml:xpath-router>
this is producing the following error :
DEBUG: org.springframework.integration.xml.router.XPathSi ngleChannelRouter - org.springframework.integration.xml.router.XPathSi ngleChannelRouter@e2b9e5 received message: [Payload=javax.xml.transform.dom.DOMSource@1386751][Headers={springintegration_id=8c6c39e8-3ff5-4759-9499-41fee0a9b67d, springintegration_timestamp=1254832382109, springintegration_replyChannel=org.springframework .integration.channel.MessageChannelTemplate$Tempor aryReplyChannel@72edc, springintegration_errorChannel=org.springframework .integration.channel.MessageChannelTemplate$Tempor aryReplyChannel@72edc}]
DEBUG: org.springframework.ws.soap.server.SoapMessageDisp atcher - Endpoint invocation resulted in exception - responding with Fault
org.springframework.integration.core.MessagingExce ption: unsupported payload type [javax.xml.transform.dom.DOMSource]
at org.springframework.integration.xml.DefaultXmlPayl oadConverter.convertToDocument(DefaultXmlPayloadCo nverter.java:66)
at org.springframework.integration.xml.DefaultXmlPayl oadConverter.convertToNode(DefaultXmlPayloadConver ter.java:73)
at org.springframework.integration.xml.router.XPathSi ngleChannelRouter.getChannelIndicatorList(XPathSin gleChannelRouter.java:81)
at org.springframework.integration.router.AbstractCha nnelNameResolvingMessageRouter.determineTargetChan nels(AbstractChannelNameResolvingMessageRouter.jav a:110)
at org.springframework.integration.router.AbstractMes sageRouter.handleMessageInternal(AbstractMessageRo uter.java:72)
at org.springframework.integration.handler.AbstractMe ssageHandler.handleMessage(AbstractMessageHandler. java:59)
at org.springframework.integration.dispatcher.Unicast ingDispatcher.doDispatch(UnicastingDispatcher.java :103)
at org.springframework.integration.dispatcher.Unicast ingDispatcher.dispatch(UnicastingDispatcher.java:9 0)
at org.springframework.integration.channel.AbstractSu bscribableChannel.doSend(AbstractSubscribableChann el.java:43)
I believe the DOMSource should be used and the getNode() method called to get the Node object. Is this a bug? or am I missing a step.
thanks
Rob