12 years ago
parsing a POST request with a MockService
Hey there,
im actually new to this terrain, so i am sorry for missing perhaps some common knowledge.
i am trying to get content of a xml that was send per POST to the MockService. actually... thats all. later on i want to get some special nodes parsed and written down to a file. but thats actually not the point. first i need to get the content of sent xml. i tried using things like the following:
but mockRequest.requestContent seems be to always a null value. i placed the code in "onRequest Script".
i have even tried to use XmlSlurper and XmlParser, but i am just not able to get any content out of that request.
im actually new to this terrain, so i am sorry for missing perhaps some common knowledge.
i am trying to get content of a xml that was send per POST to the MockService. actually... thats all. later on i want to get some special nodes parsed and written down to a file. but thats actually not the point. first i need to get the content of sent xml. i tried using things like the following:
import com.eviware.soapui.support.XmlHolder
def holder = new XmlHolder( mockRequest.requestContent )
log.info "" + holder
but mockRequest.requestContent seems be to always a null value. i placed the code in "onRequest Script".
i have even tried to use XmlSlurper and XmlParser, but i am just not able to get any content out of that request.