Hi,
I am working with CXF/Spring JMS transport and am attempting to configure
multiple services to read from a single JMS queue. With only one service
configured all works fine but if I attempt to have more than one service
running I intermittently receive the following exception:
Caused by: org.apache.cxf.binding.soap.SoapFault: Message part
{http://www.acme.com/ws}GetIdRequest was not recognized. (Does it exist in
service WSDL?)
at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:70)
at
org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
at
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:96)
at
org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
at
org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:633)
at
org.apache.cxf.transport.jms.JMSConduit.onMessage(JMSConduit.java:191)
at
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:510)
The ChainInitiationObserver appears to pick up the incorrect service
bus/endpoint and so searches the wrong wsdl for the service. This only
occurs intermittently under moderate load.
Is it possible to have multiple services using the same
MessageListenerContainer or am I missing something here?
Thanks
Mike
================================================================
Code snippet:
.
..
....
// Setup JMSConfiguration
JMSConfiguration jmsConfiguration = new JMSConfiguration();
jmsConfiguration.setConnectionFactory(connectionFactory);
jmsConfiguration.setTargetDestination("jms/requestQ");
jmsConfiguration.setReplyDestination("jms/responseQ");
jmsConfiguration.setDestinationResolver(new JndiDestinationResolver());
jmsConfiguration.setConcurrentConsumers(1);
jmsConfiguration.setSessionTransacted(true);
// Create and start first service on JMS queue
JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
svrFactory.setAddress("jms://serviceAddress1");
svrFactory.setServiceBean("serviceBean1");
svrFactory.setServiceClass(serviceClass1);
svrFactory.setProperties(new HashMap<String, Object>());
svrFactory.getProperties().put("mtom-enabled", Boolean.TRUE);
svrFactory.getProperties().put("schema-validation-enabled", Boolean.TRUE);
svrFactory.setStart(false);
Server server = svrFactory.create();
JMSDestination jmsDestination = (JMSDestination)server.getDestination();
jmsDestination.setJmsConfig(jmsConfiguration);
server.start();
// Create and start second service on JMS queue
JaxWsServerFactoryBean svrFactory2 = new JaxWsServerFactoryBean();
svrFactory2.setAddress("jms://serviceAddress2");
svrFactory2.setServiceBean("serviceBean2");
svrFactory2.setServiceClass(serviceClass2);
svrFactory2.setProperties(new HashMap<String, Object>());
svrFactory2.getProperties().put("mtom-enabled", Boolean.TRUE);
svrFactory2.getProperties().put("schema-validation-enabled", Boolean.TRUE);
svrFactory2.setStart(false);
Server server2 = svrFactory2.create();
JMSDestination jmsDestination2 = (JMSDestination)server.getDestination();
jmsDestination.setJmsConfig(jmsConfiguration2);
server2.start();
...
..
.
Snippet from - cxf.init
.
..
...
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-local.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-jms.xml" />
...
..
.
--
View this message in context:
http://www.nabble.com/Error-when-configuring-multiple-services-to-listen-on-single-JMS-Queue-tp21296646p21296646.html
Sent from the cxf-user mailing list archive at Nabble.com.