Forum Discussion

mchayat's avatar
mchayat
New Contributor
15 years ago

Unable to access JMS properties

I am trying to access the message properties using the following Groovy code.

def response = context.expand( '${ReceiveRequestMessage#Response}' )

def myTestStep = testRunner.testCase.getTestStepByName("ReceiveRequestMessage")

def testCaseID = null;


log.info("property list size " + myTestStep.testRequest.getJMSPropertiesConfig().getJMSProperties().size())

myTestStep.testRequest.getJMSPropertiesConfig().getJMSProperties().each { prop ->
log.info(prop.name + " = " + prop.value)
if (prop.name == "Testcase") {
testCaseID = prop.value
log.info("Found Testcase property in the incoming message with value " + testCaseID)
}
}


the size() function always returns 0 and the message proeprties closure is never run. The original message contains a "Testcase" property with some textual value. I am using SOAPUI 3.5.1 Pro.

sample message saved as XML from Hermes is attached.

PS: We purchased the license, but I have no idea how to get access to the PRO reporting boards. Please, IM me with instructions.

1 Reply

  • mchayat's avatar
    mchayat
    New Contributor
    Tested it with 3.6.1 Pro - same result.

    Forgot to add - I am using Tibco EMS 5.1 as a JMS provider.