Ask a Question

#RawResponse not working on open source version ?

SOLVED
francisbrochu
Occasional Contributor

#RawResponse not working on open source version ?

Hi, is it possible that the following line works on SoapUI Pro only ? I tried the same on the open source version and my variable is empty.

 

def rawResponse = context.expand( '${REST Service#RawResponse}' )
5 REPLIES 5
nmrao
Community Hero

What exactly you want? Headers or just content of response?


Regards,
Rao.
nmrao
Community Hero

If you using it in Script Assertion the following should work?

 

log.info messageExchange.rawResponseData


Regards,
Rao.
francisbrochu
Occasional Contributor

Well, I have a REST request who doesn't return JSON response. I can only know if it works by looking at HTTP 204 code. If it not works, I have a code 400. So, in Pro Version I was able to get all the raw response with the line I posted in my first message. It doesn't work in open source version.

 

I tried your line, but I get the message : groovy.lang.MissingPropertyException No such property messageExchange for class.

 

Do I have to import some libraries in order to work ?

francisbrochu
Occasional Contributor

Nevermind... I was using a Groovy Script step after my REST request. I didn't realize that I can add an script assertion directly in the REST request.

So did the above line helped?


Regards,
Rao.
cancel
Showing results for 
Search instead for 
Did you mean: