I was testing the SOAP over JMS Web Services built with Apache CXF. In particular, I was following the "jms_specs_demo": a WSDL-fist sample describing the consumer required call, the SOAP service implementation and the Queue needed for the message persistence.
The client call is equals to a SOAP over HTTP call (the endpoint is on the WSDL file). However, the JMS JNDI address uses the MQ maker's library (org.apache.activemq.jndi.ActiveMQInitialContextFactory) and it's also required on the client:
<soap:address location="jms:jndi:dynamicQueues/test.cxf.jmstransport.queue?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61616"/>
I have built an independent client for testing it:
JMSGreeterService service = new JMSGreeterService();
JMSGreeterPortType greeter = service.getGreeterPort();
greeter.greetMeOneWay("hello World");
But effectively, this code only works if the ApacheMQ dependency is added:
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<version>5.13.3</version>
</dependency>
Is there any way to create a SOAP over JMS service without needing to add the MQ maker's library (JAR) on the consumer? I thought JMS API would manage the transport and to push the message into the remote queue without extra libraries.