Forum Discussion
ilpeppino
New Contributor
Hi, I can't post raw data for the non-working messsage (Add SoapAction = false in JMS Headers).
For the working message, find it below:
TextMessage={ Header={ JMSMessageID={ID:vsvlnxtes000450.FD356190D19BB3F26:2} JMSDestination={Queue[blablabla]} JMSReplyTo={Queue[$TMP$.vsvlnxtes000450.FD356190D19BB3F26.2]} JMSDeliveryMode={NON_PERSISTENT} JMSRedelivered={false} JMSCorrelationID={null} JMSType={null} JMSTimestamp={Fri Dec 04 11:47:08 CET 2015} JMSExpiration={0} JMSPriority={4} } Properties={ SOAPJMS_soapAction={String:UpdateDebitCardBlock_001} SOAPAction={String:DNL_CRDS_DebitCardBlock_001/UpdateDebitCardBlock_001} }
I think the Add SoapAction as property setting in JMS Headers, if true, adds the two lines in Properties, but I'm not sure.
nmrao
10 years agoChampion Level 3
Like you mentioned, one should be able to add the custom headers with required values for jms soap request test step when it is required to set otherthan default value. In this case, you may add 'JMSDeliveryMode' with required value. Please try it and post the result if you still have issue.
- ilpeppino10 years agoNew ContributorBut that is what I'm looking for! :)
How can I change these jms header attributes with Groovy?- nmrao10 years agoChampion Level 3You could do that with soap request test step. See here if not already.
http://www.soapui.org/jms/working-with-jms-messages.html
Groovy step may not be required. Of course you could do that too.- nmrao10 years agoChampion Level 3
Ok, Here is the code you might be interested in:
def setMessageProperties(javax.jms.TextMessage textMessageSend, def messageProperties) { if (messageProperties && messageProperties instanceof Map) { messageProperties.each { key, value -> if (value instanceof String) { textMessageSend.setStringProperty(key, value) } else if (value instanceof Boolean) { textMessageSend.setBooleanProperty(key, value) } else if (value instanceof Integer) { textMessageSend.setIntProperty(key, value) } else { log.error("Could not find data type for value") } } } }
You need to pass the objects of TextMessage, and Properties map (say JMSDeliveryMode, SOAPAction ) to above method.
Hope this is helpful.
Related Content
- 10 months ago
- 10 years ago
Recent Discussions
- 15 years ago