Hi,

I'm trying to send a one-way SOAP request over IBM MQ. Unfortunately I know nothing about MQ and have no access to the broker or its tools. My contact who manages the MQ instance knows lots about MQ but nothing about JMS or CXF.

He's complaining that the messages I'm sending have a format of MQHRF2. I _think_ he wants them to have a format of MQSTR.

How can I persuade CXF to generate messages with that format?

In case it's relevant, I'm using Spring Boot, with the IBM MQ Spring Boot starter (v2.0.0), and I'm using the Maven CXF plugin to generate the SOAP stubs. I instantiate the generated Port like so:

   @Bean
   public SessionQueryBindingPort sessionQueryBindingPort(ConnectionFactory connectionFactory,
QueueConfig queueConfig) {
       JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setTransportId(JMSSpecConstants.SOAP_JMS_SPECIFICATION_TRANSPORTID);
       factory.setServiceClass(SessionQueryBindingPort.class);
       factory.setAddress(queueConfig.getQueue());

       ConnectionFactoryFeature connectionFactoryFeature = new ConnectionFactoryFeature(connectionFactory);
factory.setFeatures(Collections.singletonList(connectionFactoryFeature));

       return (SessionQueryBindingPort) factory.create();
   }

I'm using the Port directly, rather than the generated Service, because the WSDL I've been provided with is configured for HTTP transport, and apparently the other party is unable to give me one configured for JMS.

Any advice - however basic - greatly appreciated.
Dave Payne.

Reply via email to