Hi,
I am having a problem getting a header from a pub-sub channel that get it's message from a web service inbound gateway. I have this working when the message is from a tcp-inbound-channel-adapter. So I am following a working pattern. I get the following error message when I try to get a header from the ws:inbound-gateway's request-channel:
09:07:12,018 WARN [MarshallingWebServiceInboundGateway] failure occurred in gateway sendAndReceive
org.springframework.integration.MessageHandlingExc eption: org.springframework.expression.spel.SpelEvaluation Exception: EL1004E
pos 8): Method call: Method setHeader(org.springframework.integration.core.Mes sagingTemplate$TemporaryReplyChannel) cannot be found on com.intrado.isg2.bl.SaveHeader type
Here is the part of my config that is part of this issue:
Code:
<!-- SNR Socket section -->
<!-- Out-bound Message channel -->
<int:channel id="tcpSNRSend">
</int:channel>
<!-- Opens a socket on the host/port specified and creates a connection factory -->
<int-ip:tcp-connection-factory id="cfSNRClient"
type="client"
host="10.100.211.80"
port="10854"
deserializer="connectionSerializeDeserialize"
/>
<int-ip:tcp-outbound-channel-adapter
id="tcpSNROutbound" channel="tcpSNRSend" connection-factory="cfSNRClient" />
<int-ip:tcp-inbound-channel-adapter
id="tcpSNRInbound" channel="tcpSNRReceive" connection-factory="cfSNRClient" />
<int:publish-subscribe-channel id="channelSourceRegInput">
<int:interceptors>
<int:wire-tap channel="logger" />
</int:interceptors>
</int:publish-subscribe-channel>
<int:channel id="channelSourceRegOutput">
<int:interceptors>
<int:wire-tap channel="logger" />
</int:interceptors>
</int:channel>
<int-ws:inbound-gateway id="wsSourceRegistration"
request-channel="channelSourceRegInput"
reply-channel="channelSourceRegOutput"
marshaller="xmlBeansMarshaller"
unmarshaller="xmlBeansMarshaller" />
<int:service-activator id="sourceRegRequestService"
input-channel="channelSourceRegInput"
output-channel="tcpSNRSend"
ref="sourceRegistrationService"
method="sourceRegistration"
order="2"/>
<int:service-activator id="sourceRegResponseService"
input-channel="tcpSNRReceive"
output-channel="channelSourceRegOutputWithoutHeader"
ref="sourceRegistrationService"
method="sourceRegistrationResponse"/>
<!-- Routes the message received on the input-channel to multiple channels -->
<int:recipient-list-router input-channel="channelSourceRegInput"
order="1">
<int:recipient channel="saveSNRSourceRegHeader" />
</int:recipient-list-router>
<int:channel id="saveSNRSourceRegHeader" />
<!-- Calls the method setHeader on the object rgHeaderSaver with the data
from the header replyChannel -->
<int:chain input-channel="saveSNRSourceRegHeader">
<int:transformer expression="headers.replyChannel" />
<int:service-activator ref="snrSourceRegHeaderSaver"
method="setHeader" />
</int:chain>
<int:message-history/>
<int:header-enricher input-channel="channelSourceRegOutputWithoutHeader"
output-channel="channelSourceRegOutput">
<int:header name="replyChannel" expression="@snrSourceRegHeaderSaver.header" />
</int:header-enricher>
<!-- Simple calls with a getter/setter -->
<bean id="snrSourceRegHeaderSaver" class="com.intrado.isg2.bl.SaveHeader" />
<!-- This channel will allow multiple subscribers to receive a message from this channel -->
<int:channel id="tcpSNRReceive" >
<int:interceptors>
<int:wire-tap channel="logger"/>
</int:interceptors>
</int:channel>
Here is the SaveHeader class
Code:
package com.intrado.isg2.bl;
public class SaveHeader {
private volatile String header;
public String getHeader() {
return header;
}
public void setHeader(String header) {
this.header = header;
}
}
The issue is with the channel "channelSourceRegInput" I am trying to get the replayHeader so I can add it to the message that goes to the channel "channelSourceRegOutput".
I need to know if this error is a bug as I can do this successfully with a tcp adapter.
Thanks,
Frank