Contributions
Re: Creating soap request in Groovy script
Hi Rub, yes indeed, just importing the namespaces. This is my first task ever using Soap ui, apprently I need to do my homework :) , I`ll find a resource -most likely your book- to understand more on how does it work. Yet I have another question if possible, aboutthisline callBackRequest.testRequest.setEndpoint(ReplyTo) Are you setting the endpoint dynamically based somoe custom headers from the request ? kind of routing Ipresume! Thanks and best regards, Abdelwahab13KViews0likes3CommentsRe: Creating soap request in Groovy script
I replacedStringToObjectMap() with what I assume is the full qualified namenew com.eviware.soapui.support.types.StringToObjectMap() and it worked. I`ll dig more now for more behaviors like passing parameters to the case and resolve this classWsdlTestRequestStep. Again thank you so much for your help.13KViews0likes5CommentsRe: Creating soap request in Groovy script
Thank you for answering. However I still have issues trying to make the first solution work. for example I get the following error: Unable to resolveStringToObjectMap() and couldn`t find any descent solution or clear docuemntation. I am sure I am missing something here or just being stupid. Here is what i have so far // create XmlHolder for request content def holder = new com.eviware.soapui.support.XmlHolder( mockRequest.requestContent ) // get arguments def synReplyTo = holder["//syn:ReplyTo"]; def synMessageId = holder["//syn:MessageId"]; // log the information log.info("Reply to: "+synReplyTo); log.info("Message Id: "+synMessageId); // create a rerquest for the reply to header def map = new StringToObjectMap() map.put("messageID", synMessageId) map.put("ReplyTo", synReplyTo) def testSuite = context.mockService.project.getTestSuiteByName("TestSuiteCallingService") def callBackTestCase = testSuite.getTestCaseByName("SOAP Request") def callBackRequest = (WsdlTestRequestStep) callBackTestCase.getTestStepsOfType(WsdlTestRequestStep.class).get(0) //callBackRequest.testRequest.setEndpoint(replyTo) callBackTestCase.run(map,true) return "EmptySoapResponse"13KViews0likes6CommentsCreating soap request in Groovy script
Hi, I have the following scenario that I am trying to replicate in Soap UI: 1-Client initate request. 2-Service resposes with an empty soap message 3-Service invokes another request based on a custom header in the initial request. So i figured I need to set my Mock service dispatcher to a groovy script. now is there a way to invoke a request from the Groovy script? // create XmlHolder for request content def holder = new com.eviware.soapui.support.XmlHolder( mockRequest.requestContent ) // get arguments def replyto = holder["//replyto"] log.info("Reply to: "+replyto); // create a rerquest for the reply to header ???? return "EmptySoapMessage"Solved13KViews0likes8CommentsHow to run soapUI mock service from visual studio post build events
I am new to soapui. I am trying to run a service mock in from visual studio in the after build event. first, I tried to run the command from the cmd and it worked fine. then I tried the post-build event, the project starts to build but never run. I checked thesoapui.log file and it seems that the mock service worked normally. any ideas? PS! the command I am using is "call "MyfileFullPath\*.bat" -m"CalcServiceMock" "FullMockProjectPath\*.xml""837Views0likes1Comment