0

I've followed the tutorial on the soap ui mocking page to return back dynamic xml responses based on a Groovy script created in soap ui.

The sample responses live in the project root. i.e. Where the Groovy script returns a response the code in the script looks like this ...

import com.eviware.soapui.support.GroovyUtils
import groovy.xml.XmlUtil

def groovyUtils = new GroovyUtils(context)
def xmlParser = new XmlParser()

def responseContent = xmlParser.parse(groovyUtils.projectPath + "/responses/get-veh-details-response-one.xml")

context.content = XmlUtil.serialize(responseContent)

I now need to export the mock as a .war file and get it deployed to a server. Does soap ui allow me somehow to include my "/responses/get-veh-details-response-one.xml" inside the war?

Richie
  • 4,989
  • 24
  • 90
  • 177
  • 1
    Can you please check this - https://stackoverflow.com/questions/34835395/how-to-access-file-resources-in-soapui-mock-service-which-is-going-to-be-deploye – Rao Jun 05 '17 at 08:08
  • Richie, have you checked the above? Looks almost the same. – Rao Jun 06 '17 at 03:50
  • yup i did. Thanks. It helped me a lot. We did that as a quick fix. After the quick fix we spent some time dockerizing soap ui. – Richie Jun 06 '17 at 06:24
  • 1
    Appreciate if you can upvote that answer and question – Rao Jun 06 '17 at 07:22

0 Answers0