cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karnam, Jayashankar" <>
Subject SOAP Over JMS Dynamic Dispatch
Date Thu, 13 Feb 2014 09:14:52 GMT
Hi Andrei!

I'm in a situation to use Dynamic dispatch for SOAP Over JMS, I have been using one of the
samples. Any pointers how to dispatch the soap request dynamically would be really helpful.
Here is the code snippet I'm using
Dispatch<SOAPMessage> dispatch = CXFUtils.getDispatch(
                   + "org.apache.activemq.jndi.ActiveMQInitialContextFactory&jndiConnectionFactoryName="
                   + "ConnectionFactory&jndiURL=tcp://localhost:61616");

              InputStream is = new FileInputStream("C:\\sample2.xml");

               SOAPMessage soapReqMsg = MessageFactory.newInstance().createMessage(null,is);


public static Dispatch<SOAPMessage> getDispatch(String soapBinding,
                     String endpoint) {
              QName serviceName = new QName("", "");
              Service s = Service.create(serviceName);

              QName portName = new QName("", "");

              s.addPort(portName, soapBinding, endpoint);

              Dispatch<SOAPMessage> dispatch = s.createDispatch(portName,
                           SOAPMessage.class, Service.Mode.MESSAGE);
              StringWriter sw = new StringWriter();
              //new Throwable("").printStackTrace(new PrintWriter(sw));
       //     String stackTrace = sw.toString();
              return dispatch;

The XML that is being used here is

<soap:Envelope xmlns:soap="" xmlns:typ="">
</soap:Envelope> (SOAP 11 version)

<soap:Envelope xmlns:soap="" xmlns:typ="">
</soap:Envelope>(SOAP 12)

Are there any other flags that needs to be set in the soap envelope for SOAP over JMS ?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message