Forum Discussion

asn_007's avatar
asn_007
Contributor
7 years ago
Solved

Remove RFH2 Headers in Groovy Code/SOAPUI Request Tab properties

Somehow SOAPUI is adding RFH2 headers to the outgoing messages sent to MQ.

How can this be disabled so that it send just plain xml without any additional RFH2 header prefixed to the message.

 

I tried adding a JMS Property called "targetClient" & setting its value to "MQ" or "1" or "MQJMS_CLIENT_JMS_COMPLIANT"

 

But none of it worked.

 

  • I could not make it to work by setting the JMS properties in the SOAPUI Request tab but in the groovy I could do the below to overcome the issue.

     

    def jmsEndpoint = new JMSEndpoint("jms://${session}::${channelType}_${send}")
    def hermes = HermesUtils.getHermes( context.testCase.testSuite.project, jmsEndpoint.sessionName)
    def jmsConnectionHolder = new JMSConnectionHolder( jmsEndpoint, hermes, false, null ,null ,null)
    Session queueSession = jmsConnectionHolder.getSession();
    Queue queueSend = jmsConnectionHolder.getQueue( jmsConnectionHolder.getJmsEndpoint().getSend() );
    queueSend.setTargetClient(1);

1 Reply

  • I could not make it to work by setting the JMS properties in the SOAPUI Request tab but in the groovy I could do the below to overcome the issue.

     

    def jmsEndpoint = new JMSEndpoint("jms://${session}::${channelType}_${send}")
    def hermes = HermesUtils.getHermes( context.testCase.testSuite.project, jmsEndpoint.sessionName)
    def jmsConnectionHolder = new JMSConnectionHolder( jmsEndpoint, hermes, false, null ,null ,null)
    Session queueSession = jmsConnectionHolder.getSession();
    Queue queueSend = jmsConnectionHolder.getQueue( jmsConnectionHolder.getJmsEndpoint().getSend() );
    queueSend.setTargetClient(1);