I'm sending a message from a custom HttpSoapInOutBinding (that doesn't use
the Xfire stuff). The idea is to provide the functionality of HttpEndpoint
in a servlet based war deployment since some of our customers are not going
to be comfortable launching a Jetty http server inside of Websphere. It
determines the destination service/operation using the url and soapAction,
then takes the content of the request, creates a MessageExchange for the
service and calls sendSync(). This is probably not a great general
solution, but it works for what we need.
Debugging through the sendSync() call, I can see that the Broker finds the
correct destination endpoint ("echoComponent" in this case), but nothing
ever calls BaseLifecycle.onMessageExchange() so the message doesn't go
anywhere.
Here's the complete configuration:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
xmlns:edgenet="http://edgenet.com/services"
xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0">
<bean id="deliveryChannelProvider"
class="com.edgenet.service.messaging.jbi.ServiceMixDeliveryChannelProvider"/>
<sm:container id="jbi" useMBeanServer="true" createMBeanServer="true"
embedded="true">
<sm:activationSpecs>
<sm:activationSpec componentName="httpBinding"
service="edgenet:httpBinding">
<sm:component>
<bean
class="com.edgenet.service.messaging.http.HttpSoapInOutBinding">
<property
name="destinationServices">
<set>
<value>EchoService</value>
</set>
</property>
</bean>
</sm:component>
</sm:activationSpec>
<sm:activationSpec componentName="echoComponent"
service="edgenet:EchoService" endpoint="testService">
<sm:component>
<jsr181:component>
<jsr181:endpoints>
<jsr181:endpoint
pojoClass="com.edgenet.test.TestEchoService"
service="edgenet:EchoService"
annotations="none"
endpoint="testService" />
</jsr181:endpoints>
</jsr181:component>
</sm:component>
</sm:activationSpec>
</sm:activationSpecs>
</sm:container>
</beans>
The code from HttpSoapInOutBinding that's doing the send is:
DeliveryChannel channel = this.getDeliveryChannel();
MessageExchangeFactory factory = channel.createExchangeFactory(service);
InOptionalOut exchange;
exchange = (InOptionalOut) factory.createExchange(service, operation);
NormalizedMessage inMessage = exchange.createMessage();
if (message != null && message.length() > 0) {
inMessage.setContent(new StringSource(message));
}
exchange.setInMessage(inMessage);
channel.sendSync(exchange);
--
View this message in context:
http://www.nabble.com/NM-Routing-Problems-t1798899.html#a4906117
Sent from the ServiceMix - User forum at Nabble.com.