ContributionsMost RecentMost LikesSolutionsRe: Is it possible setup MockResponse Properties using groovy There is no methodsetResponseHttpStatus() inhttp://www.soapui.org/apidocs/com/eviware/soapui/impl/wsdl/teststeps/WsdlMockResponseTestStep.html. At least not in 5.0 version . My sollution for this is groovy script def testStep = testRunner.testCase.getTestStepByName('ResponseMessage') testStep.config.objectValue().config.response.httpResponseStatus = 200; Re: Is it possible setup MockResponse Properties using groovy This should be accesisble from test step editor. More controle over JMS message type neededHello, JMS support for JMS test cases and mock service (as described in http://www.eviware.com/forums/index.php?topic=3129.0 ) works well with JMS services using JMS Text message. You can easy switch between http and jms transport and all your test case are still useful. Problem is when a (not soapui ) client or service use jms byte messages (such as IBM WCF Channel for MQ) as transport. The problem in soapui is that response soap message which is of type byte message is put in response attachment. That makes it impossible for use with response assertions. Also when we call (from a soapui test case) a JMS service which requires jms byte message we have to make a test request with soap message in attachment which makes the usage of request validation and dynamic params impossible. In http://www.soapui.org/tutorials/jms/jms-tutorial.html is described how soapui decides when to make byte message. Why is JMSMessagType request param ignored in this case? That should be the way to control what type of message is made. How can I prevent soapui to set soap response from byte message in a attachment (in response)?Re: [RESOLVED]Correlating messages (request/response) using JMS supportHello man, this really works good, thanks for adding this. grRe: Validation of incoming SOAP Request to a mock endpointHello Just use SCRIPT as Dispatch in MockOperation and add following in your script: // START SCRIPT def wsdlcontext = new com.eviware.soapui.impl.wsdl.support.wsdl.WsdlContext("file:\\D:\mypath\mywsdl.wsdl"); def validator = new com.eviware.soapui.impl.wsdl.support.wsdl.WsdlValidator(wsdlcontext); def msgExchange = new com.eviware.soapui.impl.wsdl.panels.mockoperation.WsdlMockRequestMessageExchange(mockRequest, mockOperation); def errors = validator.assertRequest(msgExchange, false); if (errors.length > 0 ) return "Response 2" // END SCRIPT Change url in line 1 to point to your wsdl and define "Response 2" mock response with soap fault in it reporting validation error.Re: [RESOLVED]Correlating messages (request/response) using JMS supportThanks Nebojsa, that's what I already did but. That makes two request steps. That makes it difficult to switch between http and jms. For now I found a way to make my mock available on http and jms address. I want to achieve the same with test case to easy switch between jms and http. Your example uses two request and if we run it on http one is enough. Maybe we should add a checkbox "Correlate Messages" to JMS Headers tab and use it in implementation of HermesJmsRequestSendReceiveTransport in execute method.Re: Mock services over JMShi , I have made (a little bit) more elegant solution. I have in my project very nice HTTP mock with a number of response messages in it. I also have testcases using http to test services but also to test mock. I want to easy switch to JMS in my testcase, and using same http mock logic voor JMS Mock. Make TestSuite and TestCase with next test steps; 1. testRequest named “JMS receive” – with empty request message, (like described by Nebojsa ) 2. testRequest named “Send request to HTTPMock” – with this XML tab ${ JMS receive #Response} and endpoint to my http mock service. 3. testRequest named "JMS send" with jms endpoint that will send message to a reply queue, like jms://activeMQSession::queue_testQ2 . In XML tab just write this ${ Send request to HTTPMock #Response} . In JMS Header in CorrelationID write ${=context.testCase.testSteps["JMS receive "].testRequest.response.responseHeaders.JMSMessageID}. This wil set correlationid of response message with value from messageid of request message (Correlation pattern). 4. Goto step (like Nebojsa described). Run you http mock , run jms (mock ) test case , and you have the same mock available on http and on jms. Switch of endpoint in testcase give you possibility to easy test these mock’s on both transports.Re: [RESOLVED]Correlating messages (request/response) using JMS supportHi Nebojsa, I use beta 2 and I can use message selector but... I have to specify in message selector something like “JMSCorrelationID =${=context.testCase.testSteps["…"].testRequest.JMSMessageID} Response message has it’s own JMSMessageID but it contians in JMSCorrelationID the JMSMessageID of request message. So if we work with multiple threads any thread should do something like this (pseudo code): make message // message is at this point without JMSMessageID send message to request queue // after send message object gets JMSMessageID obtain id from the message make selector “JMSMessageID= + ‘requestMessage.JMSMessageID’ receive response using selector. So in Soapui I must specify message selector , but I have to know message id of request. Messageid of request is know after sending request message to request queue. Property expansion can’t help here (this is my question) because property is expanded before teststep execution (so before request message is sent).[RESOLVED]Correlating messages (request/response) using JMS supportHello, I am very happy with JMS support (icw HermesJMS) in Soapui. I am using it with WebSphere MQ (6 and 7) and it works wel (in some cases). My question is how can I configure correlation of request and response messages? I am using Soapui as mq web service client. Soapui puts a request message in request queue and listens for response message o reply queue. But it those not correlate messages, it reads first message from de reply queue as response. So when I have more threads in test case there is no guaranty on which thread gets which response. In other JMS clients (also not JMS clients) we use correlatinid when consuming response (like explained in http://www.eaipatterns.com/RequestReplyJmsExample.html ). This means that we must be able to specify message selector in soapui in such a way that jmscorrelationid = requestmessage.messageid. Any idea how to solve this without changing Java Source of soapui.